Page MenuHomePhorge

D75.1732660161.diff
No OneTemporary

Size
4 KB
Referenced Files
None
Subscribers
None

D75.1732660161.diff

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -49,7 +49,7 @@
- '**/*.in'
- 'src/tests/resources/**'
-'build:debug':
+.build:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
@@ -58,31 +58,44 @@
mkdir -p /kaniko/.docker
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
if [ "$CI_PIPELINE_SOURCE" == "trigger" ]; then
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --build-arg JOBS=1 --no-push
+ /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --build-arg JOBS=1 --build-arg BASE_IMG_TAG=$BASE_IMG_TAG --build-arg BUILD_TYPE=$BUILD_TYPE --no-push
else
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --build-arg JOBS=1 --destination $CI_REGISTRY_IMAGE/libkazv:$CI_COMMIT_REF_SLUG --destination $CI_REGISTRY_IMAGE/libkazv:$CI_COMMIT_REF_SLUG-debug
+ /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --build-arg JOBS=1 --build-arg BASE_IMG_TAG=$BASE_IMG_TAG --build-arg BUILD_TYPE=$BUILD_TYPE $PUSH_TAGS
fi
rules: *build-rules
-'build:production':
- stage: build
- image:
- name: gcr.io/kaniko-project/executor:debug
- entrypoint: [""]
- script: |
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- if [ "$CI_PIPELINE_SOURCE" == "trigger" ]; then
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --build-arg JOBS=1 --build-arg BUILD_TYPE=Release --no-push
- else
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --build-arg JOBS=1 --build-arg BUILD_TYPE=Release --destination $CI_REGISTRY_IMAGE/libkazv:$CI_COMMIT_REF_SLUG-prod
- fi
- rules: *build-rules
+'build:debug:20.04':
+ extends: .build
+ before_script:
+ - BASE_IMG_TAG=servant-ubuntu20.04
+ - BUILD_TYPE=Debug
+ - PUSH_TAGS="--destination $CI_REGISTRY_IMAGE/libkazv:$CI_COMMIT_REF_SLUG --destination $CI_REGISTRY_IMAGE/libkazv:$CI_COMMIT_REF_SLUG-debug --destination $CI_REGISTRY_IMAGE/libkazv:$CI_COMMIT_REF_SLUG-ubuntu20.04 --destination $CI_REGISTRY_IMAGE/libkazv:$CI_COMMIT_REF_SLUG-ubuntu20.04-debug"
+
+'build:production:20.04':
+ extends: .build
+ before_script:
+ - BASE_IMG_TAG=servant-ubuntu20.04
+ - BUILD_TYPE=Release
+ - PUSH_TAGS="--destination $CI_REGISTRY_IMAGE/libkazv:$CI_COMMIT_REF_SLUG-prod --destination $CI_REGISTRY_IMAGE/libkazv:$CI_COMMIT_REF_SLUG-ubuntu20.04-prod"
+
+'build:debug:22.04':
+ extends: .build
+ before_script:
+ - BASE_IMG_TAG=servant-ubuntu22.04
+ - BUILD_TYPE=Debug
+ - PUSH_TAGS="--destination $CI_REGISTRY_IMAGE/libkazv:$CI_COMMIT_REF_SLUG-ubuntu22.04 --destination $CI_REGISTRY_IMAGE/libkazv:$CI_COMMIT_REF_SLUG-ubuntu22.04-debug"
+
+'build:production:22.04':
+ extends: .build
+ before_script:
+ - BASE_IMG_TAG=servant-ubuntu22.04
+ - BUILD_TYPE=Release
+ - PUSH_TAGS="--destination $CI_REGISTRY_IMAGE/libkazv:$CI_COMMIT_REF_SLUG-ubuntu22.04-prod"
'build:coverage':
stage: build
image:
- name: reg.lily.kazv.moe/kazv/libkazv-deps/deps:servant
+ name: reg.lily.kazv.moe/kazv/libkazv-deps/deps:servant-ubuntu22.04
entrypoint: [""]
script: |
export BUILD_TYPE=Debug
@@ -90,7 +103,6 @@
export DEPS_INSTALL_DIR=/opt/libkazv-deps
export LIBKAZV_INSTALL_DIR=/opt/libkazv
mkdir build && cd build && \
- export CC=gcc-9 CXX=g++-9 && \
cmake .. -DCMAKE_INSTALL_PREFIX="$LIBKAZV_INSTALL_DIR" -DCMAKE_PREFIX_PATH="$DEPS_INSTALL_DIR" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -Dlibkazv_BUILD_TESTS=ON \
-Dlibkazv_BUILD_EXAMPLES=ON -Dlibkazv_BUILD_KAZVJOB=ON -Dlibkazv_ENABLE_COVERAGE=ON -DCMAKE_CXX_FLAGS=-fsanitize=address && \
make -j$JOBS && \
diff --git a/Dockerfile b/Dockerfile
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,5 @@
-FROM reg.lily.kazv.moe/kazv/libkazv-deps/deps:servant
+ARG BASE_IMG_TAG=servant
+FROM reg.lily.kazv.moe/kazv/libkazv-deps/deps:$BASE_IMG_TAG
RUN mkdir -pv /build
COPY . /build/libkazv

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 2:29 PM (15 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40655
Default Alt Text
D75.1732660161.diff (4 KB)

Event Timeline