scissor-project / open-scissor

OpenSCISSOR provisioning and orchestration
Apache License 2.0
2 stars 0 forks source link

Upload Docker Images on Docker Hub #68

Closed ferrarimarco closed 6 years ago

ferrarimarco commented 6 years ago

Description of the Change

This PR implements the following features:

  1. Upload every docker image on https://hub.docker.com/r/scissorproject/openscissor
  2. Each docker image we upload is tagged with the Travis build number that uploaded them
  3. During the integration test we download the images from Docker Hub instead of building them one more time (this was implemented to overcome a limitation of Travis: build stages do not share storage)

Note that we use the same docker-compose.yml for local development and Travis builds but we change the latest tag of each image to the Travis build number when building in the Travis environment (see test/test-docker-images.sh script).

Benefits

  1. Push images on Docker Hub
  2. Avoid rebuilding the images in the integration test phase
  3. Containers wait for dependencies to start before running (by opening a connection with netcat)
  4. Test script waits for containers to start before running InSpec tests (by inspecting each container log and searching for relevant lines)
  5. Build finally fixed! 🎉

Possible Drawbacks

This PR does not take care of tagging docker images that may be suitable for a release. Docker Hub is used only as a "bridge" between Travis build stages.

Applicable Issues

N/A

ferrarimarco commented 6 years ago

@StefanoSalsano I'll squash the commits as soon as I'm done developing.