gitlab-ci: Make Debian Docker image version easier to change and branch-aware
This is needed otherwise if we have a branch that relies on Debian testing and other that relies on Debian stable their images would mix in the actual status.
This commit is contained in:
@ -67,7 +67,7 @@ workflow:
|
|||||||
- 'runner_system_failure'
|
- 'runner_system_failure'
|
||||||
- 'scheduler_failure'
|
- 'scheduler_failure'
|
||||||
# Default Docker image (unless otherwise defined)
|
# Default Docker image (unless otherwise defined)
|
||||||
image: debian:bookworm
|
image: debian:${DEB_VERSION}
|
||||||
# Caching support
|
# Caching support
|
||||||
variables:
|
variables:
|
||||||
CCACHE_BASEDIR: "$CI_PROJECT_DIR"
|
CCACHE_BASEDIR: "$CI_PROJECT_DIR"
|
||||||
@ -82,6 +82,7 @@ workflow:
|
|||||||
when: always
|
when: always
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
|
DEB_VERSION: "bookworm"
|
||||||
# Common cloning procedure
|
# Common cloning procedure
|
||||||
GIT_DEPTH: "1"
|
GIT_DEPTH: "1"
|
||||||
GIT_SUBMODULE_STRATEGY: none
|
GIT_SUBMODULE_STRATEGY: none
|
||||||
@ -109,7 +110,7 @@ stages:
|
|||||||
- RUNNER: [aarch64, x86_64_v2]
|
- RUNNER: [aarch64, x86_64_v2]
|
||||||
tags:
|
tags:
|
||||||
- $RUNNER
|
- $RUNNER
|
||||||
image: $CI_REGISTRY_IMAGE:build-debian-latest-${RUNNER}
|
image: $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}
|
||||||
variables:
|
variables:
|
||||||
CC: "ccache clang"
|
CC: "ccache clang"
|
||||||
CXX: "ccache clang++"
|
CXX: "ccache clang++"
|
||||||
@ -166,7 +167,7 @@ image-debian:
|
|||||||
- export container=docker
|
- export container=docker
|
||||||
- mkdir -p /kaniko/.docker
|
- mkdir -p /kaniko/.docker
|
||||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
||||||
- echo "FROM debian:bookworm" > Dockerfile
|
- echo "FROM debian:${DEB_VERSION}" > Dockerfile
|
||||||
- echo "RUN apt-get update" >> Dockerfile
|
- echo "RUN apt-get update" >> Dockerfile
|
||||||
# 'ca-certificates' is NOT a gimp dep, it is installed only to our Docker image work
|
# 'ca-certificates' is NOT a gimp dep, it is installed only to our Docker image work
|
||||||
- echo "RUN apt-get install -y --no-install-recommends ca-certificates" >> Dockerfile
|
- echo "RUN apt-get install -y --no-install-recommends ca-certificates" >> Dockerfile
|
||||||
@ -239,7 +240,7 @@ image-debian:
|
|||||||
poppler-data
|
poppler-data
|
||||||
python3
|
python3
|
||||||
python3-gi" >> Dockerfile
|
python3-gi" >> Dockerfile
|
||||||
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:build-debian-latest-${RUNNER} --cache=true --cache-ttl=120h
|
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER} --cache=true --cache-ttl=120h
|
||||||
|
|
||||||
image-debian-x64:
|
image-debian-x64:
|
||||||
extends: .debian-x64
|
extends: .debian-x64
|
||||||
@ -252,7 +253,7 @@ image-debian-x64:
|
|||||||
script:
|
script:
|
||||||
- !reference [image-debian, script]
|
- !reference [image-debian, script]
|
||||||
|
|
||||||
## GNU/Linux 64-bit CIs (Debian bookworm) ##
|
## GNU/Linux 64-bit CIs (Debian) ##
|
||||||
|
|
||||||
deps-debian:
|
deps-debian:
|
||||||
extends: .debian
|
extends: .debian
|
||||||
|
Reference in New Issue
Block a user