build-sc-git-utilities-image ○ success

Duration: 16s
Queued: 3s
📁 Stage: docker-image
🖥 Runner: linux-2
Average Duration
30s
This job: 16s
Failure Rate
11.8%
last 30 days

Job Execution Phases

💡 Tip: Click on any phase bar to jump to that section in the log below

Job Analysis

Job Status: Passed

Status: Job passed successfully

Full Job Log

258 lines
Match - of 0
1 14:27:23 Running with gitlab-runner 18.5.0 (bda84871)
2 14:27:23 on gitlab-runner-linux-2-5677d87478-dtkch TC7X7l-mC, system ID: r_vzvfqLUZvzJc
3 14:27:23 feature flags: FF_USE_FASTZIP:true, FF_USE_NEW_BASH_EVAL_STRATEGY:true, FF_SCRIPT_SECTIONS:true, FF_USE_ADVANCED_POD_SPEC_CONFIGURATION:true, FF_PRINT_POD_EVENTS:true, FF_USE_DUMB_INIT_WITH_KUBERNETES_EXECUTOR:true, FF_LOG_IMAGES_CONFIGURED_FOR_JOB:true, FF_CLEAN_UP_FAILED_CACHE_EXTRACT:true, FF_TIMESTAMPS:true, FF_GIT_URLS_WITHOUT_TOKENS:true
4 14:27:23 Resolving secrets
5 14:27:23 section_start:1765290443:prepare_executor
6 14:27:23 +Preparing the "kubernetes" executor
7 14:27:23 "CPURequest" overwritten with "2"
8 14:27:23 "MemoryRequest" overwritten with "4G"
9 14:27:23 Using Kubernetes namespace: gitlab-runner
10 14:27:23 Using Kubernetes executor with image registry.scandit.com/dockerfiles/kaniko:v1.26.3-crane@sha256:15e0e485d8fe32a3e4f08116e163a6e5473014e297910cfdec3c58e2880a0e66 ...
11 14:27:23 Using attach strategy to execute scripts...
12 14:27:23 Using effective pull policy of [Always] for container helper
13 14:27:23 Using effective pull policy of [Always] for container init-permissions
14 14:27:23 Using effective pull policy of [Always] for container build
15 14:27:23 section_end:1765290443:prepare_executor
16 14:27:23 +section_start:1765290443:prepare_script
17 14:27:23 +Preparing environment
18 14:27:23 Using FF_USE_POD_ACTIVE_DEADLINE_SECONDS, the Pod activeDeadlineSeconds will be set to the job timeout: 1h0m0s...
19 14:27:23 WARNING: Advanced Pod Spec configuration enabled, merging the provided PodSpec to the generated one. This is a beta feature and is subject to change. Feedback is collected in this issue: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/29659 ...
20 14:27:24 Subscribing to Kubernetes Pod events...
21 14:27:24 Type Reason Message
22 14:27:24 Normal Scheduled Successfully assigned gitlab-runner/runner-tc7x7l-mc-project-621-concurrent-1-cvofnx2i to ci5
23 14:27:31 Normal Pulled Container image "registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper:x86_64-v18.5.0" already present on machine
24 14:27:31 Normal Created Created container: init-permissions
25 14:27:31 Normal Started Started container init-permissions
26 14:27:32 Normal Pulling Pulling image "registry.scandit.com/dockerfiles/kaniko:v1.26.3-crane@sha256:15e0e485d8fe32a3e4f08116e163a6e5473014e297910cfdec3c58e2880a0e66"
27 14:27:33 Normal Pulled Successfully pulled image "registry.scandit.com/dockerfiles/kaniko:v1.26.3-crane@sha256:15e0e485d8fe32a3e4f08116e163a6e5473014e297910cfdec3c58e2880a0e66" in 978ms (978ms including waiting). Image size: 46487061 bytes.
28 14:27:33 Normal Created Created container: build
29 14:27:33 Normal Started Started container build
30 14:27:33 Normal Pulled Container image "registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper:x86_64-v18.5.0" already present on machine
31 14:27:34 Normal Created Created container: helper
32 14:27:34 Normal Started Started container helper
33 14:27:36 Running on runner-tc7x7l-mc-project-621-concurrent-1-cvofnx2i via gitlab-runner-linux-2-5677d87478-dtkch...
34 14:27:36
35 14:27:36 section_end:1765290456:prepare_script
36 14:27:36 +section_start:1765290456:get_sources
37 14:27:36 +Getting source from Git repository
38 14:27:37 Gitaly correlation ID: 01KC1R50R6S6V7Z1F4MT1K6J3G
39 14:27:37 Fetching changes with git depth set to 1...
40 14:27:37 Initialized empty Git repository in /build/internal/gitlab-templates/.git/
41 14:27:37 Created fresh repository.
42 14:27:37 Checking out 940006cc as detached HEAD (ref is refs/merge-requests/507/merge)...
43 14:27:37
44 14:27:37 Skipping Git submodules setup
45 14:27:37
46 14:27:37 section_end:1765290457:get_sources
47 14:27:37 +section_start:1765290457:step_script
48 14:27:37 +Executing "step_script" stage of the job script
49 14:27:38 section_start:1765290458:section_pre_build_script_0[hide_duration=true,collapsed=true] $ function cleanup {
50 14:27:38 rv=$?
51 14:27:38 if [ $rv -ne 0 ]; then
52 14:27:38 echo ""
53 14:27:38 echo " Failure Cause Analysis might help, please open this link:"
54 14:27:38 echo " https://failure-cause-analysis.zrh.int.scandit.io/analysis/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID}"
55 14:27:38 echo ""
56 14:27:38 fi
57 14:27:38 echo ""
58 14:27:38 echo "Grafana Pod-View: https://grafana.scandit.com/d/k8s_views_pods/kubernetes-views-pods?orgId=1&refresh=1m&var-datasource=${GRAFANA_DATASOURCE}&var-host=${SC_K8S_NODE_NAME}&var-namespace=${SC_K8S_NAMESPACE}&var-pod=${HOSTNAME}&var-resolution=15&from=${__start_time}000&to=${EPOCHSECONDS}000"
59 14:27:38 echo "Grafana Node-View: https://grafana.scandit.com/d/k8s_views_nodes/kubernetes-views-nodes?orgId=1&refresh=1m&var-datasource=${GRAFANA_DATASOURCE}&var-node=${SC_K8S_NODE_NAME}&var-resolution=15s&from=${__start_time}000&to=${EPOCHSECONDS}000"
60 14:27:38 echo ""
61 14:27:38 exit $rv
62 14:27:38 }
63 14:27:38 trap cleanup EXIT
64 14:27:38 echo "INFO: This is the CI job pre_build_script"
65 14:27:38 echo "INFO: It's defined in the backend/infra/onprem/k8s repo."
66 14:27:38 echo "INFO: These additional Scandit variables are available to you:"
67 14:27:38 echo " SC_K8S_NODE_NAME: $SC_K8S_NODE_NAME"
68 14:27:38 echo " SC_K8S_IMAGE_ID: $SC_K8S_IMAGE_ID"
69 14:27:38 echo " SC_K8S_KYVERNO_PATCHES: |"
70 14:27:38 echo "$SC_K8S_KYVERNO_PATCHES" | sed 's/^/ /'
71 14:27:38 echo "cpu (r/l): ${SC_K8S_REQUESTS_CPU}/${SC_K8S_LIMITS_CPU}"
72 14:27:38 if command -v numfmt >/dev/null 2>&1; then
73 14:27:38 echo "memory (r/l): $(numfmt --to=iec --suffix=B $SC_K8S_REQUESTS_MEMORY)/$(numfmt --to=iec --suffix=B $SC_K8S_LIMITS_MEMORY)"
74 14:27:38 else
75 14:27:38 echo "memory (r/l): ${SC_K8S_REQUESTS_MEMORY}/${SC_K8S_LIMITS_MEMORY}"
76 14:27:38 fi
77 14:27:38 __start_time=${EPOCHSECONDS}
78 14:27:38 echo ""
79 14:27:38 echo "Grafana Pod-View: https://grafana.scandit.com/d/k8s_views_pods/kubernetes-views-pods?orgId=1&refresh=1m&var-datasource=${GRAFANA_DATASOURCE}&var-host=${SC_K8S_NODE_NAME}&var-namespace=${SC_K8S_NAMESPACE}&var-pod=${HOSTNAME}&var-resolution=15&from=${__start_time}000&to=now"
80 14:27:38 echo "Grafana Node-View: https://grafana.scandit.com/d/k8s_views_nodes/kubernetes-views-nodes?orgId=1&refresh=1m&var-datasource=${GRAFANA_DATASOURCE}&var-node=${SC_K8S_NODE_NAME}&var-resolution=15s&from=${__start_time}000&to=now"
81 14:27:38 echo ""
82 14:27:38 echo "Setting up credentials for Gitlab Python registries"
83 14:27:38 mkdir -p ~
84 14:27:38 echo "machine gitlab.scandit.com" > ~/.netrc
85 14:27:38 echo "login gitlab-ci-token" >> ~/.netrc
86 14:27:38 echo "password ${CI_JOB_TOKEN}" >> ~/.netrc
87 14:27:38 chmod 600 ~/.netrc
88 14:27:38 if command -v git &> /dev/null && [ "$(id -u)" -ne 0 ]; then
89 14:27:38 git config --global --add safe.directory $CI_PROJECT_DIR
90 14:27:38 fi
91 14:27:38 sleep infinity &
92 14:27:38 echo $! > ~/.bg_pid
93 14:27:38 section_end:1765290458:section_pre_build_script_0
94 14:27:38 INFO: This is the CI job pre_build_script
95 14:27:38 INFO: It's defined in the backend/infra/onprem/k8s repo.
96 14:27:38 INFO: These additional Scandit variables are available to you:
97 14:27:38 SC_K8S_NODE_NAME: ci5
98 14:27:38 SC_K8S_IMAGE_ID:
99 14:27:38 SC_K8S_KYVERNO_PATCHES: |
100 14:27:38
101 14:27:38 cpu (r/l): 2/8
102 14:27:38 memory (r/l): 4000000000/17179869184
103 14:27:38
104 14:27:38 Grafana Pod-View: https://grafana.scandit.com/d/k8s_views_pods/kubernetes-views-pods?orgId=1&refresh=1m&var-datasource=KpIiby5Vz&var-host=ci5&var-namespace=gitlab-runner&var-pod=runner-tc7x7l-mc-project-621-concurrent-1-cvofnx2i&var-resolution=15&from=1765290458000&to=now
105 14:27:38 Grafana Node-View: https://grafana.scandit.com/d/k8s_views_nodes/kubernetes-views-nodes?orgId=1&refresh=1m&var-datasource=KpIiby5Vz&var-node=ci5&var-resolution=15s&from=1765290458000&to=now
106 14:27:38
107 14:27:38 Setting up credentials for Gitlab Python registries
108 14:27:38 $ echo $DOCKER_CONFIG_JSON > /kaniko/.docker/config.json
109 14:27:38 section_start:1765290458:section_script_step_1[hide_duration=true,collapsed=true] $ if [ "$CONTAINER_USER_HOME" != "" ]; then
110 14:27:38 mkdir -p "$CONTAINER_USER_HOME"
111 14:27:38 cp ~/.netrc "$CONTAINER_USER_HOME"
112 14:27:38 if [ "$CONTAINER_USER_UID" != "" ]; then
113 14:27:38 chown "$CONTAINER_USER_UID" "$CONTAINER_USER_HOME/.netrc"
114 14:27:38 fi
115 14:27:38 fi
116 14:27:38 section_end:1765290458:section_script_step_1
117 14:27:38 section_start:1765290458:section_script_step_2[hide_duration=true,collapsed=true] $ function copy_files() {
118 14:27:38 local src="$1"
119 14:27:38 local trg="$2"
120 14:27:38 for f in $src; do
121 14:27:38 t="$trg/`dirname $f`"
122 14:27:38 mkdir -p $t || true
123 14:27:38 echo "Copy $f"
124 14:27:38 cp -pr $f $trg/$f
125 14:27:38 done
126 14:27:38 }
127 14:27:38 function recursive_hash() {
128 14:27:38 local dir="$1"
129 14:27:38 (find $dir -type f -exec sha256sum {} + ; find $dir -type d) | sort | sha256sum | cut -d ' ' -f1
130 14:27:38 }
131 14:27:38 function remote_docker_digest() {
132 14:27:38 local images="$1"
133 14:27:38 echo $images | xargs -n 1 crane digest
134 14:27:38 }
135 14:27:38 function remote_image_exists() {
136 14:27:38 local image="$1"
137 14:27:38 crane manifest $image > /dev/null 2>&1
138 14:27:38 }
139 14:27:38 function remote_images_are_identical() {
140 14:27:38 local imageA="$1"
141 14:27:38 local imageB="$2"
142 14:27:38 if [[ $(remote_docker_digest "$imageA") == $(remote_docker_digest "$imageB") ]]; then
143 14:27:38 return 0
144 14:27:38 else
145 14:27:38 return 1
146 14:27:38 fi
147 14:27:38 }
148 14:27:38 function copy_image() {
149 14:27:38 local image="$1"
150 14:27:38 local remotes="$2"
151 14:27:38 local backup_ext="$3"
152 14:27:38 echo "$image"
153 14:27:38 local source_digest=$(remote_docker_digest $image)
154 14:27:38 local target_digest
155 14:27:38 for registry in $remotes; do
156 14:27:38 if target_digest=$(remote_docker_digest $registry); then
157 14:27:38 if [ "$target_digest" != "$source_digest" ]; then
158 14:27:38 echo "image outdated, overwriting with newest version"
159 14:27:38 crane copy $image $registry
160 14:27:38 crane copy $image ${registry}${backup_ext}
161 14:27:38 fi
162 14:27:38 else
163 14:27:38 echo "image does not exist, writing newest version"
164 14:27:38 crane copy $image $registry
165 14:27:38 crane copy $image ${registry}${backup_ext}
166 14:27:38 fi
167 14:27:38 done
168 14:27:38 }
169 14:27:38 section_end:1765290458:section_script_step_2
170 14:27:38 section_start:1765290458:section_script_step_3[hide_duration=true,collapsed=true] $ if [ "$CONTAINER_SUBDIR" != "" ]; then
171 14:27:38 echo "Entering subpath $CONTAINER_SUBDIR"
172 14:27:38 cd $CONTAINER_SUBDIR
173 14:27:38 fi
174 14:27:38 section_end:1765290458:section_script_step_3
175 14:27:38 $ copy_files "$CONTAINER_IMPLICIT_REQUIREMENTS $CONTAINER_REQUIREMENTS" "$CONTAINER_CONTEXT_PATH"
176 14:27:38 Copy Dockerfile.sc-git-utilities
177 14:27:38 $ echo "$CONTAINER_BUILD_ENVIRONMENT" > $CONTAINER_CONTEXT_PATH/.docker-build-env
178 14:27:38 $ docker_checksum=$(recursive_hash $CONTAINER_CONTEXT_PATH)
179 14:27:38 section_start:1765290458:section_script_step_7[hide_duration=true,collapsed=true] $ if [ "$CONTAINER_IMAGE_NAME" == "" ]; then
180 14:27:38 final_image_name=${CONTAINER_IMAGE_URL}
181 14:27:38 else
182 14:27:38 final_image_name=${CONTAINER_IMAGE_URL}/${CONTAINER_IMAGE_NAME}
183 14:27:38 fi
184 14:27:38 section_end:1765290458:section_script_step_7
185 14:27:38 $ final_image_url=${final_image_name}:${docker_checksum}
186 14:27:38 section_start:1765290458:section_script_step_9[hide_duration=true,collapsed=true] $ if [ "${PIPELINE_IMAGE_REFS}" == "1" ]; then
187 14:27:38 echo $CONTAINER_IMAGE_VARIABLE=${final_image_url}-P${CI_PROJECT_ID}-${CI_PIPELINE_ID} > $CI_PROJECT_DIR/docker_image_build.env
188 14:27:38 else
189 14:27:38 echo $CONTAINER_IMAGE_VARIABLE=$final_image_url > $CI_PROJECT_DIR/docker_image_build.env
190 14:27:38 fi
191 14:27:38 section_end:1765290458:section_script_step_9
192 14:27:38 $ echo ${CONTAINER_IMAGE_VARIABLE}_HASH=$docker_checksum >> $CI_PROJECT_DIR/docker_image_build.env
193 14:27:38 section_start:1765290458:section_script_step_11[hide_duration=true,collapsed=true] $ if [ "${FORCE_BUILD}" != "true" ] || command -v crane &> /dev/null; then
194 14:27:38 echo $REGISTRY_PASSWORD | crane auth login $REGISTRY -u $REGISTRY_USER --password-stdin
195 14:27:38 fi
196 14:27:38 section_end:1765290458:section_script_step_11
197 14:27:38
198 14:27:38 WARNING! Your credentials are stored unencrypted in '/kaniko/.docker/config.json'.
199 14:27:38 Configure a credential helper to remove this warning. See
200 14:27:38 https://docs.docker.com/go/credential-store/
201 14:27:38
202 14:27:38 2025/12/09 14:27:38 logged in via /kaniko/.docker/config.json
203 14:27:38 section_start:1765290458:section_script_step_12[hide_duration=true,collapsed=true] $ if [ "${FORCE_BUILD}" != "true" ] && remote_image_exists "$final_image_url"; then
204 14:27:38 echo "Image already exists, skip the build."
205 14:27:38 echo "$final_image_url"
206 14:27:38 if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
207 14:27:38 _EXT=""
208 14:27:38 _BACKUP_EXT="-CI${CI_JOB_ID}-$(date '+%Y%m%d')"
209 14:27:38 elif [[ -n "$CI_MERGE_REQUEST_ID" ]]; then
210 14:27:38 _EXT="-MR${CI_MERGE_REQUEST_IID}"
211 14:27:38 _BACKUP_EXT=""
212 14:27:38 elif [[ "$CI_COMMIT_REF_PROTECTED" == "true" ]]; then
213 14:27:38 _EXT="-${CI_COMMIT_REF_SLUG}"
214 14:27:38 _BACKUP_EXT="-CI${CI_JOB_ID}-$(date '+%Y%m%d')"
215 14:27:38 else
216 14:27:38 _EXT="-${CI_COMMIT_REF_SLUG}"
217 14:27:38 _BACKUP_EXT=""
218 14:27:38 fi
219 14:27:38 for _TAG in $CONTAINER_IMAGE_TAG; do
220 14:27:38 echo "Copying ${final_image_url} to ${final_image_name}:${_TAG}${_EXT}"
221 14:27:38 copy_image "${final_image_url}" "${final_image_name}:${_TAG}${_EXT}" "${_BACKUP_EXT}"
222 14:27:38 done
223 14:27:38 if [ "${PIPELINE_IMAGE_REFS}" == "1" ]; then
224 14:27:38 _EXT="-P${CI_PROJECT_ID}-${CI_PIPELINE_ID}"
225 14:27:38 echo "Copying ${final_image_url} to ${final_image_url}${_EXT}"
226 14:27:38 copy_image "${final_image_url}" "${final_image_url}${_EXT}"
227 14:27:38 for _TAG in $CONTAINER_IMAGE_TAG; do
228 14:27:38 echo "Copying ${final_image_url} to ${final_image_name}:${_TAG}${_EXT}"
229 14:27:38 copy_image "${final_image_url}" "${final_image_name}:${_TAG}${_EXT}"
230 14:27:38 done
231 14:27:38 fi
232 14:27:38 exit 0
233 14:27:38 fi
234 14:27:38 section_end:1765290458:section_script_step_12
235 14:27:38 Image already exists, skip the build.
236 14:27:38 registry.scandit.com/internal/gitlab-templates/sc-git-utilities:4152c6b0dc890954a62b8ec8456ea9573854932fb4487a581fbd5a074b27d0b7
237 14:27:38 Copying registry.scandit.com/internal/gitlab-templates/sc-git-utilities:4152c6b0dc890954a62b8ec8456ea9573854932fb4487a581fbd5a074b27d0b7 to registry.scandit.com/internal/gitlab-templates/sc-git-utilities:3.12-0.0.7-MR507
238 14:27:38 registry.scandit.com/internal/gitlab-templates/sc-git-utilities:4152c6b0dc890954a62b8ec8456ea9573854932fb4487a581fbd5a074b27d0b7
239 14:27:38
240 14:27:38 Grafana Pod-View: https://grafana.scandit.com/d/k8s_views_pods/kubernetes-views-pods?orgId=1&refresh=1m&var-datasource=KpIiby5Vz&var-host=ci5&var-namespace=gitlab-runner&var-pod=runner-tc7x7l-mc-project-621-concurrent-1-cvofnx2i&var-resolution=15&from=1765290458000&to=1765290458000
241 14:27:38 Grafana Node-View: https://grafana.scandit.com/d/k8s_views_nodes/kubernetes-views-nodes?orgId=1&refresh=1m&var-datasource=KpIiby5Vz&var-node=ci5&var-resolution=15s&from=1765290458000&to=1765290458000
242 14:27:38
243 14:27:38
244 14:27:38 section_end:1765290458:step_script
245 14:27:38 +section_start:1765290458:upload_artifacts_on_success
246 14:27:38 +Uploading artifacts for successful job
247 14:27:38 Uploading artifacts...
248 14:27:38 docker_image_build.env: found 1 matching artifact files and directories
249 14:27:39 Uploading artifacts as "dotenv" to coordinator... 201 Created correlation_id=01KC1R5FHFXB1QEPZGRH771DSF id=46308190 responseStatus=201 Created token=64_1yWUox
250 14:27:39
251 14:27:39 section_end:1765290459:upload_artifacts_on_success
252 14:27:39 +section_start:1765290459:cleanup_file_variables
253 14:27:39 +Cleaning up project directory and file based variables
254 14:27:39
255 14:27:39 section_end:1765290459:cleanup_file_variables
256 14:27:39 +
257 14:27:39 Job succeeded
258