Verified Commit 774f8639 authored by tr's avatar tr
Browse files

Extend build pipeline

parent 7cb839a4
Pipeline #6405 passed with stages
in 21 minutes and 12 seconds
---
image:
name: "registry.code.immerda.ch/netlab/apps/base/centos-stream:8"
include:
- project: 'netlab/apps/base'
file: '/gitlab-ci.buildah.yml'
stages:
- build
- test
- deploy
Build Image:
stage: build
tags:
- buildah
script:
- buildah bud --isolation=chroot --format docker -f Dockerfile -t "${CI_PROJECT_NAME,,}:$CI_COMMIT_SHORT_SHA"
- skopeo copy
--authfile ./cred.json
"containers-storage:localhost/${CI_PROJECT_NAME,,}:$CI_COMMIT_SHORT_SHA"
"docker://$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
file: '/gitlab-ci.build.yml'
Test Image:
stage: test
tags:
- container
image:
name: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
entrypoint: [""]
before_script: []
extends: .test-image
script:
- echo "Image $CI_JOB_IMAGE"
- touch /etc/modsecurity/rules/site-rules.conf
- nginx -t 2>&1 | grep ModSecurity-nginx
- test -x /usr/local/bin/modsec-rules-check
- test -f /etc/modsecurity/coreruleset/crs-setup.conf
Deploy Image:
stage: deploy
tags:
- container
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
script:
- skopeo copy
--authfile ./cred.json
"docker://$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
"docker://$CI_REGISTRY_IMAGE:latest"
# vim: set ts=2 sw=2 :
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment