Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Image Labels

The build process labels our images so both images and containers can be inspected from the command line to see what is running and where and when it was built. 

{
   "com.transformuk.hee.tis.artifact_id": "trainee-id",
   "com.transformuk.hee.tis.build_number": "1335",
   "com.transformuk.hee.tis.build_url": "https://build-hee.transformcloud.net/jenkins/job/mvn2docker/1335/",
   "com.transformuk.hee.tis.build_version": "0.0.5-1335",
   "com.transformuk.hee.tis.date": "2017-01-12 15:05:51.435232",
   "com.transformuk.hee.tis.git_branch": "master",
   "com.transformuk.hee.tis.git_commit": "unknown",
   "com.transformuk.hee.tis.git_url": "unknown",
   "com.transformuk.hee.tis.group_id": "com.transformuk.hee",
   "com.transformuk.hee.tis.image": "trainee-id",
   "com.transformuk.hee.tis.job_name": "mvn2docker",
   "com.transformuk.hee.tis.packaging": "jar",
   "com.transformuk.hee.tis.version": "0.0.5",
   "com.transformuk.hee.tis.workspace": "/home/jenkins/data/jenkins/workspace/mvn2docker"
}


Validating Docker Versions

The build pipeline now tags the Docker images so both images and containers can be inspected to validate their build settings. The Common image is the only exception to this but this will be brought in line with the rest of the builds.

To inspect the concerns image, for example, run the following on the dev server; 

$ export SERVICE=concerns
$ docker inspect -f '{{ index .Config.Labels "com.transformuk.hee.tis.build_version" }}' docker-hee.transformcloud.net:5000/hee/${SERVICE}:latest

To inspect the build version of a container is a bit eaiser; 

$ docker inspect -f '{{ index .Config.Labels "com.transformuk.hee.tis.build_version" }}' concerns_concerns_1

It is a useful sanity check to make sure that the latest tag on dev is the version you expect.

Once you have established the versions of the images, they can be added to the stage/platform.yml or prod/platform.yml if they are ready to release.

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.