- Benefits:
- No waiting for docker container release on LF support
- Better tagging of releases in gerrit
- Separate jars and docker releases
- Prereqs:
- Docker containers must follow name convention: acumos/container-name
- Must have release job enabled in your Jenkins job builder configuration
- example jenkins configuration:
- documentation from the linux foundation- https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/jjb/lf-release-jobs.html
- 2 example projects have self release jobs enabled
- https://gerrit.acumos.org/r/gitweb?p=ci-management.git;a=blob;f=jjb/license-usage-manager/license-usage-manager.yaml;h=bfe1e94163737b65bfd93e09c14f1e9e28d22ae6;hb=HEAD#l83
- https://gerrit.acumos.org/r/gitweb?p=ci-management.git;a=blob;f=jjb/license-manager/license-manager.yaml;h=9b95e653bdee1724cebbdaa236db8dd89d056b70;hb=HEAD#l84
- example jenkins configuration:
- Ideally you want to have separate Jenkins job for each docker image so you don't have to wait for all the docker builds complete.
- If you separate jar/docker builds such as having multiple submodules one for jar and one for docker you need to make sure you separate out the the javadocs job otherwise javadocs job will fail.
- Steps for release
- For maven based docker builds
- Add releases folder into the top level directory of your repository - one time change
- Add release-docker.yaml to your repo (you can name it anything just a suggestion) – just make sure you only have one file change per gerrit commit.
- Example:
distribution_type: container container_release_tag: 0.26.2 container_pull_registry: nexus3.acumos.org:10004 container_push_registry: nexus3.acumos.org:10002 project: license-usage-manager ref: d1b9cd2dd345fbeec0d3e2162e008358b8b663b2 containers: - name: lum-db version: 0.26.2 - name: lum-server version: 0.26.2
- ref – the gerrit commit sha for the tagging of the gerrit repo
- containers – can have 1 to many docker images, container names do not need to have acumos/ in the name property.
- container-release-tag - should match the version you have in pom.xml or in container-tag.yaml
- Example release in gerrit for docker
- For maven based docker builds