8 .. include:: ../job-groups.rst
10 Below is a list of Docker job groups:
12 .. literalinclude:: ../../jjb/lf-docker-job-groups.yaml
19 lf-docker-get-container-tag
20 ---------------------------
22 Chooses a container tag to label the image based on the 'container-tag-method'
23 parameter. If container-tag-method: latest, the tag 'latest' is used.
24 If container-tag-method: git-describe, the tag is obtained using
25 the git describe command, which requires that the repository has a git tag.
26 If container-tag-method: yaml-file, the tag is obtained using
27 the yq command, which requires that the repository has a YAML file named
28 'container-tag.yaml'. The script checks the docker-root directory by
29 default or the directory specified by parameter container-tag-yaml-dir.
30 An example file appears below.
36 Calls docker build to build the container.
41 Calls docker-push.sh script to push docker images.
49 Executes a docker build task.
53 - {project-name}-docker-verify-{stream}
54 - gerrit-docker-verify
55 - github-docker-verify
57 :Comment Trigger: recheck|reverify
61 :build-node: The node to run build on.
62 :container-public-registry: Docker registry source with base images.
63 :docker-name: Name of the Docker image.
64 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
65 be configured in defaults.yaml)
66 :mvn-settings: Maven settings.xml file containing credentials to use.
70 :branch: Git branch to fetch for the build. (default: master)
71 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
72 :build-timeout: Timeout in minutes before aborting build. (default: 60)
73 :container-tag-method: Specifies the docker tag-choosing method.
74 Options are "latest", "git-describe" or "yaml-file".
75 Option git-describe requires a git tag to exist in the repository.
76 Option yaml-file requires a file "container-tag.yaml" to exist in the repository.
78 :container-tag-yaml-dir: Directory with container-tag.yaml. (default: $DOCKER_ROOT)
79 :docker-build-args: Additional arguments for the docker build command.
80 :docker-root: Build directory within the repo. (default: $WORKSPACE, the repo root)
81 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
82 :pre_docker_build_script: Build script to execute before the main verify
83 builder steps. (default: a string with only a comment)
84 :post_docker_build_script: Build script to execute after the main verify
85 builder steps. (default: a string with only a comment)
86 :stream: Keyword that can be used to represent a release code-name.
87 Often the same as the branch. (default: master)
88 :submodule-recursive: Whether to checkout submodules recursively.
90 :submodule-timeout: Timeout (in minutes) for checkout operation.
93 :gerrit_verify_triggers: Override Gerrit Triggers.
94 :gerrit_trigger_file_paths: Override Gerrit file paths which can be
95 used to filter which file modifications will trigger a build.
96 :github_included_regions: Override Github file paths which can be
97 used to filter which file modifications will trigger a build;
98 must match parameter gerrit_trigger_file_paths
101 container-tag.yaml example:
111 Executes a docker build task and publishes the resulting images to a specified Docker registry.
115 - {project-name}-docker-merge-{stream}
116 - gerrit-docker-merge
117 - github-docker-merge
119 :Comment Trigger: remerge
121 :Required parameters:
123 :build-node: The node to run build on.
124 :container-public-registry: Docker registry source with base images.
125 :container-push-registry: Docker registry target for the deploy action.
126 :docker-name: Name of the Docker image.
127 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
128 be configured in defaults.yaml)
129 :mvn-settings: Maven settings.xml file containing credentials to use.
131 :Optional parameters:
133 :branch: Git branch to fetch for the build. (default: master)
134 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
135 :build-timeout: Timeout in minutes before aborting build. (default: 60)
136 :container-tag-method: Specifies the docker tag-choosing method.
137 Options are "latest", "git-describe" or "yaml-file".
138 Option git-describe requires a git tag to exist in the repository.
139 Option yaml-file requires a file "container-tag.yaml" to exist in the repository.
141 :container-tag-yaml-dir: Directory with container-tag.yaml. (default: $DOCKER_ROOT)
142 :cron: Cron schedule when to trigger the job. This parameter also
143 supports multiline input via YAML pipe | character in cases where
144 one may want to provide more than 1 cron timer. No default. Use
145 '@daily' to run daily or 'H H * * 0' to run weekly.
146 :docker-build-args: Additional arguments for the docker build command.
147 :docker-root: Build directory within the repo. (default: $WORKSPACE, the repo root)
148 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
149 :pre_docker_build_script: Build script to execute before the main merge
150 builder steps. (default: a string with only a comment)
151 :post_docker_build_script: Build script to execute after the main merge
152 builder steps. (default: a string with only a comment)
153 :stream: Keyword that can be used to represent a release code-name.
154 Often the same as the branch. (default: master)
155 :submodule-recursive: Whether to checkout submodules recursively.
157 :submodule-timeout: Timeout (in minutes) for checkout operation.
160 :gerrit_merge_triggers: Override Gerrit Triggers.
161 :gerrit_trigger_file_paths: Override Gerrit file paths which can be
162 used to filter which file modifications will trigger a build.
163 :github_included_regions: Override Github file paths which can be
164 used to filter which file modifications will trigger a build;
165 must match parameter gerrit_trigger_file_paths
167 Sample container-tag.yaml File
168 ------------------------------