Page MenuHomePhorge

.gitlab-ci.yml
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

.gitlab-ci.yml

stages:
- lint
- prepare
- build
lint:
stage: lint
script: |
echo 'Verify that no source file contains tabs'
! egrep -R --exclude-dir=resources $'\t' src
rules: &build-rules
- changes:
- Dockerfile
- Dockerfile.cov
- '**/*.cpp'
- '**/*.hpp'
- '**/CMakeLists.txt'
- '**/*.in'
- 'src/tests/resources/**'
prepare-env:
stage: prepare
script: |
tag="$CI_COMMIT_BRANCH"
tag="$(echo "$tag" | sed -e "s/[^a-zA-Z0-9.]/-/g")"
echo "tag=$tag" >> prepare.env
artifacts:
reports:
dotenv: prepare.env
rules: *build-rules
build-debug:
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
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --build-arg JOBS=1 --destination $CI_REGISTRY_IMAGE/libkazv:$tag --destination $CI_REGISTRY_IMAGE/libkazv:$tag-debug
dependencies:
- prepare-env
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
/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:$tag-prod
dependencies:
- prepare-env
rules: *build-rules
build-code-with-coverage:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script: |
mkdir -p /kaniko/.docker
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile.cov --build-arg JOBS=1 --no-push
rules: *build-rules

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 3, 5:35 PM (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
439119
Default Alt Text
.gitlab-ci.yml (1 KB)

Event Timeline