Overview#

Travis CI uses 2 containers to build and run tests:

Ways to build Container Images#

There are 2 ways to build a container image:

Manual Triggering#

1. To trigger a manual build, go to the Build Settings from the repo you want to build as shown below:

1-docker-manual.png

1-docker-manual.png#

  1. Click on Trigger button to trigger the build against that image

  2. You can view the status under Build Details

2-Docker-manual.png

2-Docker-manual.png#

Automated Triggering#

The build for existing images are auto-triggered when a change to Dockerfile is pushed to the linked github repo.

For building new image that doesn’t exist:

  1. Clone the corresponding repo.

  2. Create a folder (for this example, we will call f27_test).

  3. Create a Dockerfile and write the required script.

4. Create a new entry under Build Settings in the corresponding repo in Dockerhub. For example:

Docker_automated_1.png

Docker_automated_1.png#

Here:

  • Type - Select the corresponding tag or branch against which automated trigger should be build.

  • Name - Enter the corresponding tag’s or branch’s name

  • Docker File Location - Enter the location of the Dockerfile you created. In our cases, it’s /f27_test

  • Docker Tag Name - Enter the tag name of the image. In our case, it will be dogtagpki/dogtag-freeipa-ci-containers:f27_test

  1. Click on Save Changes

  2. Push the local repo to the github repo.

  3. You can see the details under Build Details. Shown below:

2-Docker-manual.png

2-Docker-manual.png#

References#