X

The Wercker blog covers continuous delivery to the cloud

Recent Posts

Announcing new built-in steps for building, testing and pushing docker images in your Wercker pipelines

We're delighted to announce that we've added three new built-in steps to Wercker that make it easy to build a Docker image, test it, and then push it to an image registry, all in a Wercker pipeline.   To build an image all you need to do is to create a Dockerfile and add it to your source code repository. Dockerfiles are the standard way to build docker images, so if you're moving an existing project to Wercker you've probably already created one. You can now run that Dockerfile directly in Wercker using the new internal/docker-build step. Simply add the following to your wercker.yml: - internal/docker-build: dockerfile: Dockerfile image-name: my-new-image Having created your docker image you probably want to start it and run some tests. You can start your new image using the new internal/docker-build step: - internal/docker-run: image: my-new-image image-name is a temporary name which we will use to refer to the image in subsequent steps. This starts a new container using the image you just created. Your pipeline can now connect to it and run whatever tests you like. Imagine that your image runs a web server which returns "Hello World" (see an example here). Here's a simple script step that connects to the container and uses the curl command to verify that it returns the expected response: - script: name: Test the container code: | if curlOutput=`curl -s myTestContainer:5000`; then if [ "$curlOutput" == "Hello World!!" ]; then echo "Test passed: expected response" else echo "Test failed: unexpected response" exit 1 fi else echo "Test failed: container did not respond" exit 1 fi If the tests pass you probably want your pipeline to push the image to a registry such as Docker Hub so that others can use it. We've extended the existing internal/docker-push step to allow you to push an image created by a prior internal/docker-build step to any registry you choose: - internal/docker-push: image-name: my-new-image username: $USERNAME # You can configure user and password password: $PASSWORD # securely in wercker.com repository: docker.io/$USERNAME/docker-build-golang tag: latest That's all there is to it! Read the product documentation, or try the example on GitHub.

We're delighted to announce that we've added three new built-in steps to Wercker that make it easy to build a Docker image, test it, and then push it to an image registry, all in a Wercker pipeline.   To...

Wercker

Did you know you can access reports, logs, screenshots, etc., from your build?

Often we create various data during a build that we might want access to after the build is finished.  Examples include logs, test results, maybe even screenshots.  This kind of information is often especially important if the build failed.  Wercker has a feature that allows you to make this kind of data easily available from the web UI.  If you place data into the special directory $WERCKER_REPORT_ARTIFACTS_DIR during your build, Wercker will save that data for you and make it available to download (in a tarball) by pressing the "Download artifact" button which you can find under the step that created the data, as you can see in the image below. In the past, this feature worked when a step passed, but if the step failed, we did not collect the data.  In response to user requests, we have just updated this feature so that it will also capture this data when a step fails.  So now you can write data into the reports directory during your step, and if the step fails you can easily get access to that data, which is very useful for troubleshooting issues in the step.  To use this feature, you can just place data into that directory in your wercker.yml.  Here is an example: build: steps: # Run the test and save the output - script: name: Run my test code: | run_test.sh > $WERCKER_REPORT_ARTIFACTS_DIR/some-output.txt # Take a screenshot of the application's home page - screenshot: url: https://www.myapp.com filename: myapp.png After the step has completed, you can download the artifacts from the web UI.  You will get a tarball with any data that was written into that directory.  In the example above, this would contain the file some-output.txt and the screenshot myapp.png.  

Often we create various data during a build that we might want access to after the build is finished.  Examples include logs, test results, maybe even screenshots.  This kind of information is often...

The new Steps Store has landed!

Team Oracle + Wercker would like to invite you to try out the next generation of Steps!  What's different? We have completely re-designed our Steps functionality, migrated it away from our Classic Stack and implemented a brand new UI that should greatly improve your interactions with the feature. This is both in response to feedback from users, and part of our plan to deprecate Wercker Classic in favor of our well-established current platform, Wercker Workflows. The future As we've updated the interface around Steps, we're going to be adding a ton of new features to Steps in the coming months, so stay tuned. Don't know what steps are? You're in the right place! Steps are small, self-contained automation scripts that can be used in your Wercker Runs to save you time on repeatable, common tasks. They are written by both our users and Oracle+Wercker, and are exposed on a shared marketplace, available for all! They are: Implementable with a couple of lines inside your wercker.yml files Searchable on our Steps Store Completely free and open-source Steps allow you to: Carry out common tasks inside of your CI/CD flows without duplicating code. (They work just like plugins) Instill good engineering conventions within your company (share your Steps with your team!) Take advantage of Wercker's wider community. (Steps are always being improved!) We revamped our documentation to reflect these changes. We'll be adding more documentation as we go along, but you can check out what you need to get started here.  A flavor of how to use Steps (please note that due to our UI upgrade the pictures are not 100% accurate, but none-the-less describe what you can do with Steps while we make some new content) Roll bar notify  Chat ops development Steps in Wercker  A tale of two python bots  Having trouble? Reach out to us on our public slack channel

Team Oracle + Wercker would like to invite you to try out the next generation of Steps!  What's different? We have completely re-designed our Steps functionality, migrated it away from our Classic...

Oracle

Integrated Cloud Applications & Platform Services