Summary of the complete workflow is as follows:
Goal: A docker image built for each commit of Ruby and the build should be triggered when we push to our fork of Ruby.
Approach: Firstly, we have our base Dockerfile which is to be manually built for a start. Tag this with the latest commit's sha1.
Now our stage is set. As soon as there is a commit in ruby, we reach
github_event_handler.rb through the github hook. I have modified this file to run
script.sh and wait in the while loop till our
.travis.yml completes its build.
script.sh contains the api code to trigger the travis ci build. So here we first run our script to trigger the build. .travis.yml runs this Dockerfile. It first changes the base image to the previously built image on dockerhub, runs the
runner script, builds our new image tagging it with latest commit's sha1 and pushes it to the dockerhub. As we wait for this process to complete, on completion we can safely run our benchmarks.
Same process follows when there is next commit in ruby.