From: Lott, Christopher (cl778h) Date: Tue, 24 Mar 2020 09:53:23 +0000 (-0400) Subject: Run docker-merge job weekly by default X-Git-Tag: v0.53.0~15^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F88%2F63488%2F2;p=releng%2Fglobal-jjb.git Run docker-merge job weekly by default Use @weekly cron default value in docker_merge_common anchor, no longer empty. The merge job for docker images is like the stage job for java artifacts, every docker image is a release candidate. Run the merge job regularly to check dependencies like base images and to push updated images to the Nexus3 staging registry. Change-Id: Ic26f534953c77047515d2678fa654e21ac9d6336 Signed-off-by: Lott, Christopher (cl778h) --- diff --git a/docs/jjb/lf-docker-jobs.rst b/docs/jjb/lf-docker-jobs.rst index ba65b29d..9ab7d842 100644 --- a/docs/jjb/lf-docker-jobs.rst +++ b/docs/jjb/lf-docker-jobs.rst @@ -73,7 +73,8 @@ Job Templates Docker Verify ------------- -Executes a docker build task. +Executes a docker build task to verify that an image can be constructed, +and discards the image upon completion. :Template Names: @@ -92,7 +93,7 @@ Executes a docker build task. :docker-name: Name of the Docker image. :jenkins-ssh-credential: Credential to use for SSH. (Generally should be configured in defaults.yaml) - :mvn-settings: Maven settings.xml file containing credentials to use. + :mvn-settings: Maven settings.xml file containing Docker credentials. :Optional parameters: @@ -101,13 +102,15 @@ Executes a docker build task. :build-timeout: Timeout in minutes before aborting build. (default: 60) :container-tag-method: Specifies the docker tag-choosing method. Options are "latest", "git-describe" or "yaml-file". - Option git-describe requires a git tag to exist in the repository. - Option yaml-file requires a file "container-tag.yaml" to exist in the repository. - (default: latest) + Option latest simply applies that string. + Option git-describe uses the string returned by git-describe, + which requires a tag to exist in the repository. + Option yaml-file uses the string from file "container-tag.yaml" + in the repository. (default: latest) :container-tag-yaml-dir: Directory with container-tag.yaml. (default: $DOCKER_ROOT) :docker-build-args: Additional arguments for the docker build command. :docker-get-container-tag-script: Path to script that chooses docker tag. - (default: ../shell/docker-get-container-tag.sh) + (default: ../shell/docker-get-container-tag.sh in global-jjb) :docker-root: Build directory within the repo. (default: $WORKSPACE, the repo root) :git-url: URL clone project from. (default: $GIT_URL/$PROJECT) :pre_docker_build_script: Build script to execute before the main verify @@ -139,7 +142,9 @@ container-tag.yaml example: Docker Merge ------------ -Executes a docker build task and publishes the resulting images to a specified Docker registry. +Executes a docker build task and pushes the resulting image to the specified +Docker registry. If every image is a release candidate, this should use a +staging repository and should also run regularly to check dependencies. :Template Names: @@ -155,11 +160,11 @@ Executes a docker build task and publishes the resulting images to a specified D :build-node: The node to run build on. :container-public-registry: Docker registry source with base images. - :container-push-registry: Docker registry target for the deploy action. + :container-push-registry: Docker registry target for the push action. :docker-name: Name of the Docker image. :jenkins-ssh-credential: Credential to use for SSH. (Generally should be configured in defaults.yaml) - :mvn-settings: Maven settings.xml file containing credentials to use. + :mvn-settings: Maven settings.xml file containing Docker credentials. :Optional parameters: @@ -168,17 +173,19 @@ Executes a docker build task and publishes the resulting images to a specified D :build-timeout: Timeout in minutes before aborting build. (default: 60) :container-tag-method: Specifies the docker tag-choosing method. Options are "latest", "git-describe" or "yaml-file". - Option git-describe requires a git tag to exist in the repository. - Option yaml-file requires a file "container-tag.yaml" to exist in the repository. - (default: latest) + Option latest simply applies that string. + Option git-describe uses the string returned by git-describe, + which requires a tag to exist in the repository. + Option yaml-file uses the string from file "container-tag.yaml" + in the repository. (default: latest) :container-tag-yaml-dir: Directory with container-tag.yaml. (default: $DOCKER_ROOT) :cron: Cron schedule when to trigger the job. This parameter also supports multiline input via YAML pipe | character in cases where - one may want to provide more than 1 cron timer. No default. Use - '@daily' to run daily or 'H H * * 0' to run weekly. + one may want to provide more than 1 cron timer. Use '@daily' to run + daily or '@weekly' to run weekly. (default: @weekly) :docker-build-args: Additional arguments for the docker build command. :docker-get-container-tag-script: Path to script that chooses docker tag. - (default: ../shell/docker-get-container-tag.sh) + (default: ../shell/docker-get-container-tag.sh in global-jjb) :docker-root: Build directory within the repo. (default: $WORKSPACE, the repo root) :git-url: URL clone project from. (default: $GIT_URL/$PROJECT) :pre_docker_build_script: Build script to execute before the main merge diff --git a/jjb/lf-docker-jobs.yaml b/jjb/lf-docker-jobs.yaml index 402d8678..0e1f1a1e 100644 --- a/jjb/lf-docker-jobs.yaml +++ b/jjb/lf-docker-jobs.yaml @@ -151,7 +151,7 @@ - docker_merge_common: &docker_merge_common name: docker-merge-common - cron: "" + cron: "@weekly" # check dependencies regularly scm: - lf-infra-gerrit-scm: diff --git a/releasenotes/notes/lf-docker-merge-cron-weekly-3575c6048e5b62ce.yaml b/releasenotes/notes/lf-docker-merge-cron-weekly-3575c6048e5b62ce.yaml new file mode 100644 index 00000000..578addf9 --- /dev/null +++ b/releasenotes/notes/lf-docker-merge-cron-weekly-3575c6048e5b62ce.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + Add @weekly cron default value to docker_merge_common anchor, no longer + empty. The merge job for docker images is like the stage job for java + artifacts, every docker image is a release candidate. Run the merge job + regularly to check dependencies like base images and to push updated + images to the Nexus3 staging registry.