couchbaselabs / sdk-doctor

Application-server-side cluster connection diagnostics.
https://couchbase.com/
Apache License 2.0
18 stars 12 forks source link

Add Docker build to Travis CI process #18

Closed brantburnett closed 5 years ago

brantburnett commented 6 years ago

Motivation

Ensure that the Docker build is successful on pull requests, and also publish the image to Docker Hub on tags.

Modifications

Add Docker build to the build script.

Add a Docker publish process on tags to the deploy steps.

Results

A Docker image is always built, but it is also published when tagged using the tagged version as well as the ":latest" tag.

The deploy process expects the DOCKER_USERNAME and DOCKER_PASSWORD environment variables to be present in the Travis configuration. See https://docs.travis-ci.com/user/docker/#Pushing-a-Docker-Image-to-a-Registry.

brantburnett commented 6 years ago

@brett19

I'm pretty sure this pull request will do all of the Docker stuff for you, as long as you add the environment variables to your Travis configuration first. You can either encrypt them and add them to the yml file in this pull, or just add them to the config via the web UI. The user and password will need push access to "couchbase/sdk-doctor" in Docker Hub.

Unfortunately, I can't fully test it without the env vars and making a tag. But the build part is working, and the deploy part is pretty straightforward and based on another repo I have that is working.

Brant