build-python3-image-with-context ○ success

Duration: 51s
Queued: 1s
📁 Stage: docker-image
🖥 Runner: linux-aws-1
Average Duration
47s
This job: 51s
Failure Rate
2.3%
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

442 lines
Match - of 0
1 10:47:56 Running with gitlab-runner 18.9.0 (07e534ba)
2 10:47:56 on gitlab-runner-linux-1-746bdd58fd-nmzv5 wRxjPbsJX, system ID: r_32gpkwQMMrQU
3 10:47:56 feature flags: FF_USE_FASTZIP:true, FF_USE_NEW_BASH_EVAL_STRATEGY:true, FF_USE_DYNAMIC_TRACE_FORCE_SEND_INTERVAL: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_GIT_URLS_WITHOUT_TOKENS:true, FF_WAIT_FOR_POD_TO_BE_REACHABLE:true, FF_USE_FLEETING_ACQUIRE_HEARTBEATS:true, FF_USE_JOB_ROUTER:true
4 10:47:56 Resolving secrets
5 10:47:56 section_start:1778237276:prepare_executor
6 10:47:56 +Preparing the "kubernetes" executor
7 10:47:56 "CPURequest" overwritten with "2"
8 10:47:56 "MemoryRequest" overwritten with "4G"
9 10:47:56 Using Kubernetes namespace: gitlab-runner
10 10:47:56 Using Kubernetes executor with image registry.scandit.com/dockerfiles/kaniko:v1.27.3-crane@sha256:72bdc063db14f38a45910d33ccf066ecb088d4833fb2437fef336e49b81fd4ac ...
11 10:47:56 Using attach strategy to execute scripts...
12 10:47:56 Using effective pull policy of [Always] for container build
13 10:47:56 Using effective pull policy of [Always] for container helper
14 10:47:56 Using effective pull policy of [Always] for container init-permissions
15 10:47:56 section_end:1778237276:prepare_executor
16 10:47:56 +section_start:1778237276:prepare_script
17 10:47:56 +Preparing environment
18 10:47:56 Using FF_USE_POD_ACTIVE_DEADLINE_SECONDS, the Pod activeDeadlineSeconds will be set to the job timeout: 1h0m0s...
19 10:47:56 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 10:47:57 Subscribing to Kubernetes Pod events...
21 10:47:57 Type Reason Message
22 10:47:57 Normal Scheduled Successfully assigned gitlab-runner/runner-wrxjpbsjx-project-621-concurrent-2-17t76iys to ip-10-0-47-123.eu-central-1.compute.internal
23 10:47:59 Normal Pulled Container image "gitlab/gitlab-runner-helper:x86_64-v18.8.0" already present on machine
24 10:48:00 Normal Created Created container: init-permissions
25 10:48:01 Normal Started Started container init-permissions
26 10:48:14 Normal Pulled Container image "498954711405.dkr.ecr.eu-central-1.amazonaws.com/dockerfiles/kaniko@sha256:72bdc063db14f38a45910d33ccf066ecb088d4833fb2437fef336e49b81fd4ac" already present on machine
27 10:48:15 Normal Created Created container: build
28 10:48:15 Normal Started Started container build
29 10:48:15 Normal Pulled Container image "gitlab/gitlab-runner-helper:x86_64-v18.8.0" already present on machine
30 10:48:15 Normal Created Created container: helper
31 10:48:16 Normal Started Started container helper
32 10:48:19 Running on runner-wrxjpbsjx-project-621-concurrent-2-17t76iys via gitlab-runner-linux-1-746bdd58fd-nmzv5...
33 10:48:19
34 10:48:19 section_end:1778237299:prepare_script
35 10:48:19 +section_start:1778237299:get_sources
36 10:48:19 +Getting source from Git repository
37 10:48:20 Gitaly correlation ID: 01KR3K6YNT94MWTZ7EPBNPDBR3
38 10:48:20 Fetching changes with git depth set to 1...
39 10:48:20 Initialized empty Git repository in /build/internal/gitlab-templates/.git/
40 10:48:20 Created fresh repository.
41 10:48:21 Checking out 6e76a6a0 as detached HEAD (ref is refs/merge-requests/641/merge)...
42 10:48:21
43 10:48:21 Skipping Git submodules setup
44 10:48:21
45 10:48:21 section_end:1778237301:get_sources
46 10:48:21 +section_start:1778237301:step_script
47 10:48:21 +Executing "step_script" stage of the job script
48 10:48:21 section_start:1778237301:section_pre_build_script_0[hide_duration=true,collapsed=true] $ function cleanup {
49 10:48:21 rv=$?
50 10:48:21 if [ $rv -ne 0 ]; then
51 10:48:21 echo ""
52 10:48:21 echo " Failure Cause Analysis might help, please open this link:"
53 10:48:21 echo " https://scout.scandit.io/analysis/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID}"
54 10:48:21 echo ""
55 10:48:21 fi
56 10:48:21 echo ""
57 10:48:21 echo "Scout Analysis: https://scout.scandit.io/analysis/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID}"
58 10:48:21 echo ""
59 10:48:21 echo ""
60 10:48:21 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"
61 10:48:21 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"
62 10:48:21 echo "Loki Logs: https://grafana.scandit.com/a/grafana-lokiexplore-app/explore/log_group/gitlab-runner/logs?var-ds=${LOKI_DATASOURCE}&var-filters=log_group|=|gitlab-runner&var-filters=source|=|${LOKI_LOGSOURCE}&var-filters=namespace|=|${SC_K8S_NAMESPACE}&var-filters=CI_PROJECT_ID|=|${CI_PROJECT_ID}&var-filters=CI_PIPELINE_ID|=|${CI_PIPELINE_ID}&var-filters=CI_JOB_ID|=|${CI_JOB_ID}&sortOrder=Ascending&from=${__start_time}000&to=${EPOCHSECONDS}000"
63 10:48:21 echo "Lilibet Statistics: https://lilibet.scandit.io/dashboard/204-job-drill-down?date_range=$(date -d '-7 days' +%Y-%m-%d)~$(date -d '+7 days' +%Y-%m-%d)&job_name=${CI_JOB_NAME}&project=${CI_PROJECT_PATH}"
64 10:48:21 echo ""
65 10:48:21 exit $rv
66 10:48:21 }
67 10:48:21 trap cleanup EXIT
68 10:48:21 echo "INFO: This is the CI job pre_build_script"
69 10:48:21 echo "INFO: It's defined in the backend/infra/aws repo."
70 10:48:21 echo "INFO: These additional Scandit variables are available to you:"
71 10:48:21 echo " SC_K8S_NODE_NAME: $SC_K8S_NODE_NAME"
72 10:48:21 echo " SC_K8S_IMAGE_ID: $SC_K8S_IMAGE_ID"
73 10:48:21 echo " SC_K8S_KYVERNO_PATCHES: |"
74 10:48:21 echo "$SC_K8S_KYVERNO_PATCHES" | sed 's/^/ /'
75 10:48:21 echo "cpu (r/l): ${SC_K8S_REQUESTS_CPU}/${SC_K8S_LIMITS_CPU}"
76 10:48:21 if command -v numfmt >/dev/null 2>&1; then
77 10:48:21 echo "memory (r/l): $(numfmt --to=iec --suffix=B $SC_K8S_REQUESTS_MEMORY)/$(numfmt --to=iec --suffix=B $SC_K8S_LIMITS_MEMORY)"
78 10:48:21 else
79 10:48:21 echo "memory (r/l): ${SC_K8S_REQUESTS_MEMORY}/${SC_K8S_LIMITS_MEMORY}"
80 10:48:21 fi
81 10:48:21 __start_time=${EPOCHSECONDS}
82 10:48:21 echo ""
83 10:48:21 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"
84 10:48:21 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"
85 10:48:21 echo "Loki Logs: https://grafana.scandit.com/a/grafana-lokiexplore-app/explore/log_group/gitlab-runner/logs?var-ds=${LOKI_DATASOURCE}&var-filters=log_group|=|gitlab-runner&var-filters=source|=|${LOKI_LOGSOURCE}&var-filters=namespace|=|${SC_K8S_NAMESPACE}&var-filters=CI_PROJECT_ID|=|${CI_PROJECT_ID}&var-filters=CI_PIPELINE_ID|=|${CI_PIPELINE_ID}&var-filters=CI_JOB_ID|=|${CI_JOB_ID}&sortOrder=Ascending&from=${__start_time}000&to=now"
86 10:48:21 echo "Lilibet Statistics: https://lilibet.scandit.io/dashboard/204-job-drill-down?date_range=$(date -d '-7 days' +%Y-%m-%d)~$(date -d '+7 days' +%Y-%m-%d)&job_name=${CI_JOB_NAME}&project=${CI_PROJECT_PATH}"
87 10:48:21 echo ""
88 10:48:21 echo "Setting up credentials for Gitlab Python registries"
89 10:48:21 mkdir -p ~
90 10:48:21 echo "machine gitlab.scandit.com" > ~/.netrc
91 10:48:21 echo "login gitlab-ci-token" >> ~/.netrc
92 10:48:21 echo "password ${CI_JOB_TOKEN}" >> ~/.netrc
93 10:48:21 chmod 600 ~/.netrc
94 10:48:21 if command -v git &> /dev/null && [ "$(id -u)" -ne 0 ]; then
95 10:48:21 git config --global --add safe.directory $CI_PROJECT_DIR
96 10:48:21 fi
97 10:48:21 # Sonarqube server is running on the same cluster. Use internal address
98 10:48:21 export SONAR_HOST_URL="http://sonarqube.sonarqube.svc.cluster.local:9000"
99 10:48:21 section_end:1778237301:section_pre_build_script_0
100 10:48:21 INFO: This is the CI job pre_build_script
101 10:48:21 INFO: It's defined in the backend/infra/aws repo.
102 10:48:21 INFO: These additional Scandit variables are available to you:
103 10:48:21 SC_K8S_NODE_NAME: ip-10-0-47-123.eu-central-1.compute.internal
104 10:48:21 SC_K8S_IMAGE_ID:
105 10:48:21 SC_K8S_KYVERNO_PATCHES: |
106 10:48:21
107 10:48:21 cpu (r/l): 2/4
108 10:48:21 memory (r/l): 4000000000/17179869184
109 10:48:21
110 10:48:21 Grafana Pod-View: https://grafana.scandit.com/d/k8s_views_pods/kubernetes-views-pods?orgId=1&refresh=1m&var-datasource=lu1rmx27z&var-host=ip-10-0-47-123.eu-central-1.compute.internal&var-namespace=gitlab-runner&var-pod=runner-wrxjpbsjx-project-621-concurrent-2-17t76iys&var-resolution=15&from=1778237301000&to=now
111 10:48:21 Grafana Node-View: https://grafana.scandit.com/d/k8s_views_nodes/kubernetes-views-nodes?orgId=1&refresh=1m&var-datasource=lu1rmx27z&var-node=ip-10-0-47-123.eu-central-1.compute.internal&var-resolution=15s&from=1778237301000&to=now
112 10:48:21 Loki Logs: https://grafana.scandit.com/a/grafana-lokiexplore-app/explore/log_group/gitlab-runner/logs?var-ds=nVsAo7UVk&var-filters=log_group|=|gitlab-runner&var-filters=source|=|k8s-ci.aws.scandit.io&var-filters=namespace|=|gitlab-runner&var-filters=CI_PROJECT_ID|=|621&var-filters=CI_PIPELINE_ID|=|1585539&var-filters=CI_JOB_ID|=|54677889&sortOrder=Ascending&from=1778237301000&to=now
113 10:48:21 date: invalid date '-7 days'
114 10:48:21 date: invalid date '+7 days'
115 10:48:21 Lilibet Statistics: https://lilibet.scandit.io/dashboard/204-job-drill-down?date_range=~&job_name=build-python3-image-with-context&project=internal/gitlab-templates
116 10:48:21
117 10:48:21 Setting up credentials for Gitlab Python registries
118 10:48:21 $ mkdir -p arbitrary_path
119 10:48:21 $ mv Dockerfile.python-3 arbitrary_path
120 10:48:21 $ mv requirements.txt arbitrary_path
121 10:48:21 $ mv .python-version arbitrary_path
122 10:48:21 $ mv .pip-version arbitrary_path
123 10:48:21 $ echo $DOCKER_CONFIG_JSON > /kaniko/.docker/config.json
124 10:48:21 $ mv /root/.netrc /kaniko/.netrc
125 10:48:21 section_start:1778237301:section_script_step_7[hide_duration=true,collapsed=true] $ function copy_files() {
126 10:48:21 local src="$1"
127 10:48:21 local trg="$2"
128 10:48:21 for f in $src; do
129 10:48:21 t="$trg/`dirname $f`"
130 10:48:21 mkdir -p $t || true
131 10:48:21 echo "Copy $f"
132 10:48:21 cp -pr $f $trg/$f
133 10:48:21 done
134 10:48:21 }
135 10:48:21 function recursive_hash() {
136 10:48:21 local dir="$1"
137 10:48:21 find "$dir" -exec stat -c '%F|%a|%u:%g|%n' {} + -type f -exec sha256sum {} + | sort | sha256sum | cut -d ' ' -f1
138 10:48:21 }
139 10:48:21 function remote_docker_digest() {
140 10:48:21 local images="$1"
141 10:48:21 echo $images | xargs -n 1 crane digest
142 10:48:21 }
143 10:48:21 function remote_image_exists() {
144 10:48:21 local image="$1"
145 10:48:21 crane manifest $image > /dev/null 2>&1
146 10:48:21 }
147 10:48:21 function remote_images_are_identical() {
148 10:48:21 local imageA="$1"
149 10:48:21 local imageB="$2"
150 10:48:21 if [[ $(remote_docker_digest "$imageA") == $(remote_docker_digest "$imageB") ]]; then
151 10:48:21 return 0
152 10:48:21 else
153 10:48:21 return 1
154 10:48:21 fi
155 10:48:21 }
156 10:48:21 function copy_image() {
157 10:48:21 local image="$1"
158 10:48:21 local remotes="$2"
159 10:48:21 local backup_ext="$3"
160 10:48:21 echo "$image"
161 10:48:21 local source_digest=$(remote_docker_digest $image)
162 10:48:21 local target_digest
163 10:48:21 for registry in $remotes; do
164 10:48:21 if target_digest=$(remote_docker_digest $registry); then
165 10:48:21 if [ "$target_digest" != "$source_digest" ]; then
166 10:48:21 echo "image outdated, overwriting with newest version"
167 10:48:21 crane copy $image $registry
168 10:48:21 crane copy $image ${registry}${backup_ext}
169 10:48:21 fi
170 10:48:21 else
171 10:48:21 echo "image does not exist, writing newest version"
172 10:48:21 crane copy $image $registry
173 10:48:21 crane copy $image ${registry}${backup_ext}
174 10:48:21 fi
175 10:48:21 done
176 10:48:21 }
177 10:48:21 section_end:1778237301:section_script_step_7
178 10:48:21 section_start:1778237301:section_script_step_8[hide_duration=true,collapsed=true] $ if [ "$CONTAINER_SUBDIR" != "" ]; then
179 10:48:21 echo "Entering subpath $CONTAINER_SUBDIR"
180 10:48:21 cd $CONTAINER_SUBDIR
181 10:48:21 fi
182 10:48:21 section_end:1778237301:section_script_step_8
183 10:48:21 Entering subpath arbitrary_path
184 10:48:21 $ copy_files "$CONTAINER_IMPLICIT_REQUIREMENTS $CONTAINER_REQUIREMENTS" "$CONTAINER_CONTEXT_PATH"
185 10:48:21 Copy Dockerfile.python-3
186 10:48:21 Copy .pip-version
187 10:48:21 Copy .python-version
188 10:48:21 Copy requirements.txt
189 10:48:21 $ echo "$CONTAINER_BUILD_ENVIRONMENT" > $CONTAINER_CONTEXT_PATH/.docker-build-env
190 10:48:21 $ docker_checksum=$(recursive_hash $CONTAINER_CONTEXT_PATH)
191 10:48:21 section_start:1778237301:section_script_step_12[hide_duration=true,collapsed=true] $ if [ "$CONTAINER_IMAGE_NAME" == "" ]; then
192 10:48:21 final_image_name=${CONTAINER_IMAGE_URL}
193 10:48:21 else
194 10:48:21 final_image_name=${CONTAINER_IMAGE_URL}/${CONTAINER_IMAGE_NAME}
195 10:48:21 fi
196 10:48:21 section_end:1778237301:section_script_step_12
197 10:48:21 $ final_image_url=${final_image_name}:${docker_checksum}
198 10:48:21 section_start:1778237301:section_script_step_14[hide_duration=true,collapsed=true] $ if [ "${PIPELINE_IMAGE_REFS}" == "1" ]; then
199 10:48:21 echo $CONTAINER_IMAGE_VARIABLE=${final_image_url}-P${CI_PROJECT_ID}-${CI_PIPELINE_ID} > $CI_PROJECT_DIR/docker_image_build.env
200 10:48:21 else
201 10:48:21 echo $CONTAINER_IMAGE_VARIABLE=$final_image_url > $CI_PROJECT_DIR/docker_image_build.env
202 10:48:21 fi
203 10:48:21 section_end:1778237301:section_script_step_14
204 10:48:21 $ echo ${CONTAINER_IMAGE_VARIABLE}_HASH=$docker_checksum >> $CI_PROJECT_DIR/docker_image_build.env
205 10:48:21 section_start:1778237301:section_script_step_16[hide_duration=true,collapsed=true] $ if [ "${FORCE_BUILD}" != "true" ] || command -v crane &> /dev/null; then
206 10:48:21 echo $REGISTRY_PASSWORD | crane auth login $REGISTRY -u $REGISTRY_USER --password-stdin
207 10:48:21 fi
208 10:48:21 section_end:1778237301:section_script_step_16
209 10:48:21
210 10:48:21 WARNING! Your credentials are stored unencrypted in '/kaniko/.docker/config.json'.
211 10:48:21 Configure a credential helper to remove this warning. See
212 10:48:21 https://docs.docker.com/go/credential-store/
213 10:48:21
214 10:48:21 2026/05/08 10:48:21 logged in via /kaniko/.docker/config.json
215 10:48:21 section_start:1778237301:section_script_step_17[hide_duration=true,collapsed=true] $ if [ "${FORCE_BUILD}" != "true" ] && remote_image_exists "$final_image_url"; then
216 10:48:21 echo "Image already exists, skip the build."
217 10:48:21 echo "$final_image_url"
218 10:48:21 if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
219 10:48:21 _EXT=""
220 10:48:21 _BACKUP_EXT="-CI${CI_JOB_ID}-$(date '+%Y%m%d')"
221 10:48:21 elif [[ -n "$CI_MERGE_REQUEST_ID" ]]; then
222 10:48:21 _EXT="-MR${CI_MERGE_REQUEST_IID}"
223 10:48:21 _BACKUP_EXT=""
224 10:48:21 elif [[ "$CI_COMMIT_REF_PROTECTED" == "true" ]]; then
225 10:48:21 _EXT="-${CI_COMMIT_REF_SLUG}"
226 10:48:21 _BACKUP_EXT="-CI${CI_JOB_ID}-$(date '+%Y%m%d')"
227 10:48:21 fi
228 10:48:21 for _TAG in $CONTAINER_IMAGE_TAG; do
229 10:48:21 echo "Copying ${final_image_url} to ${final_image_name}:${_TAG}${_EXT}"
230 10:48:21 copy_image "${final_image_url}" "${final_image_name}:${_TAG}${_EXT}" "${_BACKUP_EXT}"
231 10:48:21 done
232 10:48:21 if [ "${PIPELINE_IMAGE_REFS}" == "1" ]; then
233 10:48:21 _EXT="-P${CI_PROJECT_ID}-${CI_PIPELINE_ID}"
234 10:48:21 echo "Copying ${final_image_url} to ${final_image_url}${_EXT}"
235 10:48:21 copy_image "${final_image_url}" "${final_image_url}${_EXT}"
236 10:48:21 for _TAG in $CONTAINER_IMAGE_TAG; do
237 10:48:21 echo "Copying ${final_image_url} to ${final_image_name}:${_TAG}${_EXT}"
238 10:48:21 copy_image "${final_image_url}" "${final_image_name}:${_TAG}${_EXT}"
239 10:48:21 done
240 10:48:21 fi
241 10:48:21 exit 0
242 10:48:21 fi
243 10:48:21 section_end:1778237301:section_script_step_17
244 10:48:22 $ DESTINATIONS="--destination=$final_image_url"
245 10:48:22 section_start:1778237301:section_script_step_19[hide_duration=true,collapsed=true] $ if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
246 10:48:22 _EXT=""
247 10:48:22 TIMESTAMP_TAGS=$CONTAINER_IMAGE_TAG
248 10:48:22 elif [[ -n "$CI_MERGE_REQUEST_ID" ]]; then
249 10:48:22 _EXT="-MR${CI_MERGE_REQUEST_IID}"
250 10:48:22 TIMESTAMP_TAGS=""
251 10:48:22 elif [[ "$CI_COMMIT_REF_PROTECTED" == "true" ]]; then
252 10:48:22 _EXT="-${CI_COMMIT_REF_SLUG}"
253 10:48:22 TIMESTAMP_TAGS=$CONTAINER_IMAGE_TAG
254 10:48:22 fi
255 10:48:22 section_end:1778237301:section_script_step_19
256 10:48:22 section_start:1778237301:section_script_step_20[hide_duration=true,collapsed=true] $ for _TAG in $CONTAINER_IMAGE_TAG; do
257 10:48:22 DESTINATIONS="${DESTINATIONS} --destination=${final_image_name}:${_TAG}${_EXT}"
258 10:48:22 done
259 10:48:22 section_end:1778237301:section_script_step_20
260 10:48:22 section_start:1778237301:section_script_step_21[hide_duration=true,collapsed=true] $ if [ "${PIPELINE_IMAGE_REFS}" == "1" ]; then
261 10:48:22 _EXT="-P${CI_PROJECT_ID}-${CI_PIPELINE_ID}"
262 10:48:22 DESTINATIONS="${DESTINATIONS} --destination=${final_image_url}${_EXT}"
263 10:48:22 for _TAG in $CONTAINER_IMAGE_TAG; do
264 10:48:22 DESTINATIONS="${DESTINATIONS} --destination=${final_image_name}:${_TAG}${_EXT}"
265 10:48:22 done
266 10:48:22 fi
267 10:48:22 section_end:1778237301:section_script_step_21
268 10:48:22 section_start:1778237301:section_script_step_22[hide_duration=true,collapsed=true] $ DATE=$(date '+%Y%m%d')
269 10:48:22 for _TAG in $TIMESTAMP_TAGS; do
270 10:48:22 DESTINATIONS="${DESTINATIONS} --destination=${final_image_name}:${_TAG}${_EXT}-CI${CI_JOB_ID}-${DATE}"
271 10:48:22 done
272 10:48:22 section_end:1778237301:section_script_step_22
273 10:48:22 section_start:1778237301:section_script_step_23[hide_duration=true,collapsed=true] $ if [ -n "${CONTAINER_BUILD_ARGS}" ]; then
274 10:48:22 for _BUILD_ARG in $CONTAINER_BUILD_ARGS; do
275 10:48:22 FINAL_BUILD_ARGS="--build-arg $_BUILD_ARG $FINAL_BUILD_ARGS"
276 10:48:22 done
277 10:48:22 fi
278 10:48:22 section_end:1778237301:section_script_step_23
279 10:48:22 section_start:1778237301:section_script_step_24[hide_duration=true,collapsed=true] $ for _PATH in $CONTAINER_IGNORE_PATHS; do
280 10:48:22 FINAL_IGNORE_PATHS="--ignore-path=$_PATH $FINAL_IGNORE_PATHS"
281 10:48:22 done
282 10:48:22 section_end:1778237301:section_script_step_24
283 10:48:22 section_start:1778237301:section_script_step_25[hide_duration=true,collapsed=true] $ if [ -n "${CONTAINER_PLATFORM}" ]; then
284 10:48:22 KANIKO_PLATFORM="--custom-platform=${CONTAINER_PLATFORM}"
285 10:48:22 fi
286 10:48:22 section_end:1778237301:section_script_step_25
287 10:48:22 $ ANNOTATIONS=""
288 10:48:22 section_start:1778237301:section_script_step_27[hide_duration=true,collapsed=true] $ if [[ -n "$CI_COMMIT_REF_NAME" ]]; then
289 10:48:22 ANNOTATIONS="${ANNOTATIONS} $KANIKO_ANNOTATION_KEY org.opencontainers.image.ref.name=${CI_COMMIT_REF_NAME}"
290 10:48:22 fi
291 10:48:22 section_end:1778237301:section_script_step_27
292 10:48:22 section_start:1778237301:section_script_step_28[hide_duration=true,collapsed=true] $ if [[ -n "$CI_COMMIT_SHA" ]]; then
293 10:48:22 ANNOTATIONS="${ANNOTATIONS} $KANIKO_ANNOTATION_KEY org.opencontainers.image.revision=${CI_COMMIT_SHA}"
294 10:48:22 fi
295 10:48:22 section_end:1778237301:section_script_step_28
296 10:48:22 section_start:1778237301:section_script_step_29[hide_duration=true,collapsed=true] $ if [[ -n "$CI_JOB_URL" ]]; then
297 10:48:22 ANNOTATIONS="${ANNOTATIONS} $KANIKO_ANNOTATION_KEY org.opencontainers.image.url=${CI_JOB_URL}"
298 10:48:22 fi
299 10:48:22 section_end:1778237301:section_script_step_29
300 10:48:22 section_start:1778237301:section_script_step_30[hide_duration=true,collapsed=true] $ if [[ -n "$CI_PIPELINE_ID" ]]; then
301 10:48:22 ANNOTATIONS="${ANNOTATIONS} $KANIKO_ANNOTATION_KEY io.gitlab.ci.pipeline_id=${CI_PIPELINE_ID}"
302 10:48:22 fi
303 10:48:22 section_end:1778237301:section_script_step_30
304 10:48:22 section_start:1778237301:section_script_step_31[hide_duration=true,collapsed=true] $ if [[ -n "$CI_JOB_ID" ]]; then
305 10:48:22 ANNOTATIONS="${ANNOTATIONS} $KANIKO_ANNOTATION_KEY io.gitlab.ci.job_id=${CI_JOB_ID}"
306 10:48:22 fi
307 10:48:22 section_end:1778237301:section_script_step_31
308 10:48:22 section_start:1778237301:section_script_step_32[hide_duration=true,collapsed=true] $ if [[ -n "$CI_JOB_IMAGE" ]]; then
309 10:48:22 ANNOTATIONS="${ANNOTATIONS} $KANIKO_ANNOTATION_KEY io.gitlab.ci.job_image=${CI_JOB_IMAGE}"
310 10:48:22 fi
311 10:48:22 section_end:1778237301:section_script_step_32
312 10:48:22 $ ANNOTATIONS="${ANNOTATIONS} $KANIKO_ANNOTATION_KEY org.opencontainers.image.title=${final_image_name}:$(echo $CONTAINER_IMAGE_TAG | cut -d' ' -f1)"
313 10:48:22 $ ANNOTATIONS="${ANNOTATIONS} $KANIKO_ANNOTATION_KEY org.opencontainers.image.created=$(date -u +%Y-%m-%dT%H:%M:%SZ)"
314 10:48:22 $ ANNOTATIONS="${ANNOTATIONS} $KANIKO_ANNOTATION_KEY org.opencontainers.image.vendor=Scandit"
315 10:48:22 $ ANNOTATIONS="${ANNOTATIONS} $KANIKO_ANNOTATION_KEY io.scandit.ci.hash=${docker_checksum}"
316 10:48:22 section_start:1778237301:section_script_step_37[hide_duration=true,collapsed=true] $ if [ -n "${CONTAINER_TARGET_STAGE}" ]; then
317 10:48:22 KANIKO_TARGET="--target $CONTAINER_TARGET_STAGE"
318 10:48:22 fi
319 10:48:22 section_end:1778237301:section_script_step_37
320 10:48:22 $ set -x
321 10:48:22 + echo '$ /kaniko/executor --context $CONTAINER_CONTEXT_PATH --dockerfile $CONTAINER_DOCKERFILE $DESTINATIONS --cache=true --cache-copy-layers --cache-dir /cache/kaniko --cache-repo $CONTAINER_CACHE_REPO --cache-ttl=$CONTAINER_CACHE_TTL $FINAL_IGNORE_PATHS $KANIKO_TARGET $FINAL_BUILD_ARGS $KANIKO_PLATFORM $ANNOTATIONS $KANIKO_DEFAULT_FLAGS $KANIKO_EXTRA_FLAGS'
322 10:48:22 $ /kaniko/executor --context $CONTAINER_CONTEXT_PATH --dockerfile $CONTAINER_DOCKERFILE $DESTINATIONS --cache=true --cache-copy-layers --cache-dir /cache/kaniko --cache-repo $CONTAINER_CACHE_REPO --cache-ttl=$CONTAINER_CACHE_TTL $FINAL_IGNORE_PATHS $KANIKO_TARGET $FINAL_BUILD_ARGS $KANIKO_PLATFORM $ANNOTATIONS $KANIKO_DEFAULT_FLAGS $KANIKO_EXTRA_FLAGS
323 10:48:22 + /kaniko/executor --context /build/internal/gitlab-templates/context/ --dockerfile Dockerfile.python-3 '--destination=registry.scandit.com/internal/gitlab-templates:97732edaa31c705ad4ba1b763f97c3d99b1b3186a2ffa1dc31568e6af8bb13ee' '--destination=registry.scandit.com/internal/gitlab-templates:latest-MR641' '--cache=true' --cache-copy-layers --cache-dir /cache/kaniko --cache-repo registry.scandit.com/internal/gitlab-templates/cache '--cache-ttl=336h' --annotation 'org.opencontainers.image.ref.name=feat/aws-credentials-template' --annotation 'org.opencontainers.image.revision=6e76a6a0c66ea57870d5fd9b25d54de105102fe9' --annotation 'org.opencontainers.image.url=https://gitlab.scandit.com/internal/gitlab-templates/-/jobs/54677889' --annotation 'io.gitlab.ci.pipeline_id=1585539' --annotation 'io.gitlab.ci.job_id=54677889' --annotation 'io.gitlab.ci.job_image=registry.scandit.com/dockerfiles/kaniko:v1.27.3-crane@sha256:72bdc063db14f38a45910d33ccf066ecb088d4833fb2437fef336e49b81fd4ac' --annotation 'org.opencontainers.image.title=registry.scandit.com/internal/gitlab-templates:latest' --annotation 'org.opencontainers.image.created=2026-05-08T10:48:21Z' --annotation 'org.opencontainers.image.vendor=Scandit' --annotation 'io.scandit.ci.hash=97732edaa31c705ad4ba1b763f97c3d99b1b3186a2ffa1dc31568e6af8bb13ee' --preserve-context '--credential-helpers=gitlab' --secret 'id=netrc,src=/kaniko/.netrc' --secret 'id=ci_job_token,env=CI_JOB_TOKEN'
324 10:48:22 INFO[0000] credential providers by priority: [file:/kaniko/.docker/config.json, gitlab]
325 10:48:22 INFO[0000] Retrieving image manifest python:3.12-bookworm
326 10:48:22 INFO[0000] Retrieving image python:3.12-bookworm from registry index.docker.io
327 10:48:22 INFO[0000] credential providers by priority: [file:/kaniko/.docker/config.json, gitlab]
328 10:48:23 INFO[0001] Retrieving image manifest python:3.12-bookworm
329 10:48:23 INFO[0001] Returning cached image manifest
330 10:48:23 INFO[0001] Retrieving image manifest python:3.12-bookworm
331 10:48:23 INFO[0001] Returning cached image manifest
332 10:48:23 INFO[0001] Retrieving image manifest python:3.12-bookworm
333 10:48:23 INFO[0001] Returning cached image manifest
334 10:48:23 INFO[0001] Built cross stage deps: map[]
335 10:48:23 INFO[0001] Skipping context snapshot as no-one requires it
336 10:48:23 INFO[0001] Retrieving image manifest python:3.12-bookworm
337 10:48:23 INFO[0001] Returning cached image manifest
338 10:48:23 INFO[0001] Retrieving image manifest python:3.12-bookworm
339 10:48:23 INFO[0001] Returning cached image manifest
340 10:48:23 INFO[0001] Building stage 'python:3.12-bookworm' [idx: '0', base-idx: '-1']
341 10:48:23 INFO[0001] Checking for cached layer registry.scandit.com/internal/gitlab-templates/cache:4aa82f716f80c2fc0d58cc1f7a315d65fe7859ed520e8f4629aeee5d53138656...
342 10:48:23 INFO[0001] credential providers by priority: [file:/kaniko/.docker/config.json, gitlab]
343 10:48:24 INFO[0001] Using caching version of cmd: RUN git clone https://github.com/pyenv/pyenv.git $PYENV_ROOT
344 10:48:24 INFO[0001] Checking for cached layer registry.scandit.com/internal/gitlab-templates/cache:ba0db3758a565d2d2e2422aa1db025dbb40e077874cd6e1e401d3c49f3fcd62c...
345 10:48:24 INFO[0001] credential providers by priority: [file:/kaniko/.docker/config.json, gitlab]
346 10:48:24 INFO[0002] Using caching version of cmd: RUN cd $PYENV_ROOT && git checkout $PYENV_VER
347 10:48:24 INFO[0002] Checking for cached layer registry.scandit.com/internal/gitlab-templates/cache:5e779da5602a3411aed0b06bc0e08d3c6686e7e5b74cf75ca6cb8dd28794e2e3...
348 10:48:24 INFO[0002] credential providers by priority: [file:/kaniko/.docker/config.json, gitlab]
349 10:48:24 INFO[0002] Using caching version of cmd: COPY /.python-version .python-version
350 10:48:24 INFO[0002] Checking for cached layer registry.scandit.com/internal/gitlab-templates/cache:0b3d4dde0819fcc2180fb45da1885c190c4f446559d871702696eea8b042e275...
351 10:48:24 INFO[0002] credential providers by priority: [file:/kaniko/.docker/config.json, gitlab]
352 10:48:25 INFO[0002] Using caching version of cmd: RUN eval "$(/root/.pyenv/bin/pyenv init --path)" && pyenv install $(cat .python-version) -s && pyenv global $(cat .python-version)
353 10:48:25 INFO[0002] Checking for cached layer registry.scandit.com/internal/gitlab-templates/cache:bfc242ecea63c2c15b384e6069df1a9b8b0ad16b4052294800a11fbf1791b1f7...
354 10:48:25 INFO[0002] credential providers by priority: [file:/kaniko/.docker/config.json, gitlab]
355 10:48:25 INFO[0003] Using caching version of cmd: RUN echo 'eval "$(/root/.pyenv/bin/pyenv init --path)"' >> /root/.profile
356 10:48:25 INFO[0003] Checking for cached layer registry.scandit.com/internal/gitlab-templates/cache:c1786d0b175d4ddb55286e63435f10707815e05ec84ea21598f1412338ca3bd0...
357 10:48:25 INFO[0003] credential providers by priority: [file:/kaniko/.docker/config.json, gitlab]
358 10:48:25 INFO[0003] Using caching version of cmd: RUN pyenv version | grep $(cat .python-version)
359 10:48:25 INFO[0003] Checking for cached layer registry.scandit.com/internal/gitlab-templates/cache:3fea39beb03eec55065a1ea9a20bc9eb37d747ce02dde374ed83c7bdb1dbdd4b...
360 10:48:25 INFO[0003] credential providers by priority: [file:/kaniko/.docker/config.json, gitlab]
361 10:48:25 INFO[0003] Using caching version of cmd: RUN python3 -m pip install --upgrade pip wheel
362 10:48:25 INFO[0003] Checking for cached layer registry.scandit.com/internal/gitlab-templates/cache:11e9f70596055c2fa501c03b19174d11ba15e7065cf19919a4870f6bfb5eb570...
363 10:48:25 INFO[0003] credential providers by priority: [file:/kaniko/.docker/config.json, gitlab]
364 10:48:25 INFO[0003] Using caching version of cmd: COPY /requirements.txt requirements.txt
365 10:48:25 INFO[0003] Checking for cached layer registry.scandit.com/internal/gitlab-templates/cache:1341b5af1710055894c1053022824c20400b076b2a37d3d8dbbab26e7df26e52...
366 10:48:25 INFO[0003] credential providers by priority: [file:/kaniko/.docker/config.json, gitlab]
367 10:48:26 INFO[0004] Using caching version of cmd: RUN --mount=type=secret,id=netrc,target=/root/.netrc python3 -m pip install -r requirements.txt
368 10:48:26 INFO[0004] Skipping unpacking as no commands require it.
369 10:48:26 INFO[0004] ENV PYENV_VER=v2.3.36
370 10:48:26 INFO[0004] Taking snapshot of files...
371 10:48:26 INFO[0004] ENV PYENV_ROOT /root/.pyenv
372 10:48:26 INFO[0004] Taking snapshot of files...
373 10:48:26 INFO[0004] ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
374 10:48:26 INFO[0004] Taking snapshot of files...
375 10:48:26 INFO[0004] RUN git clone https://github.com/pyenv/pyenv.git $PYENV_ROOT
376 10:48:26 INFO[0004] Found cached layer, extracting to filesystem
377 10:48:26 INFO[0004] RUN cd $PYENV_ROOT && git checkout $PYENV_VER
378 10:48:26 INFO[0004] Found cached layer, extracting to filesystem
379 10:48:27 INFO[0005] COPY /.python-version .python-version
380 10:48:27 INFO[0005] Found cached layer, extracting to filesystem
381 10:48:27 INFO[0005] RUN eval "$(/root/.pyenv/bin/pyenv init --path)" && pyenv install $(cat .python-version) -s && pyenv global $(cat .python-version)
382 10:48:27 INFO[0005] Found cached layer, extracting to filesystem
383 10:48:39 INFO[0017] RUN echo 'eval "$(/root/.pyenv/bin/pyenv init --path)"' >> /root/.profile
384 10:48:39 INFO[0017] Found cached layer, extracting to filesystem
385 10:48:39 INFO[0017] SHELL ["/bin/bash", "-c"]
386 10:48:39 INFO[0017] Taking snapshot of files...
387 10:48:39 INFO[0017] RUN pyenv version | grep $(cat .python-version)
388 10:48:39 INFO[0017] Found cached layer, extracting to filesystem
389 10:48:39 INFO[0017] RUN python3 -m pip install --upgrade pip wheel
390 10:48:39 INFO[0017] Found cached layer, extracting to filesystem
391 10:48:41 INFO[0019] COPY /requirements.txt requirements.txt
392 10:48:41 INFO[0019] Found cached layer, extracting to filesystem
393 10:48:41 INFO[0019] RUN --mount=type=secret,id=netrc,target=/root/.netrc python3 -m pip install -r requirements.txt
394 10:48:41 INFO[0019] Found cached layer, extracting to filesystem
395 10:48:42 INFO[0020] credential providers by priority: [file:/kaniko/.docker/config.json, gitlab]
396 10:48:42 INFO[0020] Pushing image to registry.scandit.com/internal/gitlab-templates:97732edaa31c705ad4ba1b763f97c3d99b1b3186a2ffa1dc31568e6af8bb13ee
397 10:48:43 INFO[0021] Pushed registry.scandit.com/internal/gitlab-templates@sha256:5886e7ae95144612f5e75463509d1c5e75373a980524f16c5e2eb4c8d45e4434
398 10:48:43 INFO[0021] credential providers by priority: [file:/kaniko/.docker/config.json, gitlab]
399 10:48:43 INFO[0021] Pushing image to registry.scandit.com/internal/gitlab-templates:latest-MR641
400 10:48:44 INFO[0022] Pushed registry.scandit.com/internal/gitlab-templates@sha256:5886e7ae95144612f5e75463509d1c5e75373a980524f16c5e2eb4c8d45e4434
401 10:48:44 + cleanup
402 10:48:44 + rv=0
403 10:48:44 + '[' 0 -ne 0 ]
404 10:48:44 + echo
405 10:48:44
406 10:48:44 + echo 'Scout Analysis: https://scout.scandit.io/analysis/projects/621/jobs/54677889'
407 10:48:44 Scout Analysis: https://scout.scandit.io/analysis/projects/621/jobs/54677889
408 10:48:44 + echo
409 10:48:44
410 10:48:44 + echo
411 10:48:44
412 10:48:44 + echo 'Grafana Pod-View: https://grafana.scandit.com/d/k8s_views_pods/kubernetes-views-pods?orgId=1&refresh=1m&var-datasource=lu1rmx27z&var-host=ip-10-0-47-123.eu-central-1.compute.internal&var-namespace=gitlab-runner&var-pod=runner-wrxjpbsjx-project-621-concurrent-2-17t76iys&var-resolution=15&from=1778237301000&to=1778237324000'
413 10:48:44 Grafana Pod-View: https://grafana.scandit.com/d/k8s_views_pods/kubernetes-views-pods?orgId=1&refresh=1m&var-datasource=lu1rmx27z&var-host=ip-10-0-47-123.eu-central-1.compute.internal&var-namespace=gitlab-runner&var-pod=runner-wrxjpbsjx-project-621-concurrent-2-17t76iys&var-resolution=15&from=1778237301000&to=1778237324000
414 10:48:44 + echo 'Grafana Node-View: https://grafana.scandit.com/d/k8s_views_nodes/kubernetes-views-nodes?orgId=1&refresh=1m&var-datasource=lu1rmx27z&var-node=ip-10-0-47-123.eu-central-1.compute.internal&var-resolution=15s&from=1778237301000&to=1778237324000'
415 10:48:44 Grafana Node-View: https://grafana.scandit.com/d/k8s_views_nodes/kubernetes-views-nodes?orgId=1&refresh=1m&var-datasource=lu1rmx27z&var-node=ip-10-0-47-123.eu-central-1.compute.internal&var-resolution=15s&from=1778237301000&to=1778237324000
416 10:48:44 + echo 'Loki Logs: https://grafana.scandit.com/a/grafana-lokiexplore-app/explore/log_group/gitlab-runner/logs?var-ds=nVsAo7UVk&var-filters=log_group|=|gitlab-runner&var-filters=source|=|k8s-ci.aws.scandit.io&var-filters=namespace|=|gitlab-runner&var-filters=CI_PROJECT_ID|=|621&var-filters=CI_PIPELINE_ID|=|1585539&var-filters=CI_JOB_ID|=|54677889&sortOrder=Ascending&from=1778237301000&to=1778237324000'
417 10:48:44 Loki Logs: https://grafana.scandit.com/a/grafana-lokiexplore-app/explore/log_group/gitlab-runner/logs?var-ds=nVsAo7UVk&var-filters=log_group|=|gitlab-runner&var-filters=source|=|k8s-ci.aws.scandit.io&var-filters=namespace|=|gitlab-runner&var-filters=CI_PROJECT_ID|=|621&var-filters=CI_PIPELINE_ID|=|1585539&var-filters=CI_JOB_ID|=|54677889&sortOrder=Ascending&from=1778237301000&to=1778237324000
418 10:48:44 + date -d '-7 days' '+%Y-%m-%d'
419 10:48:44 date: invalid date '-7 days'
420 10:48:44 + date -d '+7 days' '+%Y-%m-%d'
421 10:48:44 date: invalid date '+7 days'
422 10:48:44 + echo 'Lilibet Statistics: https://lilibet.scandit.io/dashboard/204-job-drill-down?date_range=~&job_name=build-python3-image-with-context&project=internal/gitlab-templates'
423 10:48:44 Lilibet Statistics: https://lilibet.scandit.io/dashboard/204-job-drill-down?date_range=~&job_name=build-python3-image-with-context&project=internal/gitlab-templates
424 10:48:44 + echo
425 10:48:44
426 10:48:44 + exit 0
427 10:48:44
428 10:48:44 section_end:1778237324:step_script
429 10:48:44 +section_start:1778237324:upload_artifacts_on_success
430 10:48:44 +Uploading artifacts for successful job
431 10:48:45 Uploading artifacts...
432 10:48:45 docker_image_build.env: found 1 matching artifact files and directories
433 10:48:45 Uploading artifacts as "dotenv" to coordinator... 201 Created correlation_id=01KR3K8FSSVH2ZX0THEZ7TZM2X id=54677889 responseStatus=201 Created token=64_j7FmCc
434 10:48:45
435 10:48:45 section_end:1778237325:upload_artifacts_on_success
436 10:48:45 +section_start:1778237325:cleanup_file_variables
437 10:48:45 +Cleaning up project directory and file based variables
438 10:48:46
439 10:48:46 section_end:1778237326:cleanup_file_variables
440 10:48:46 +
441 10:48:46 Job succeeded
442