162 lines
3.4 KiB
YAML
162 lines
3.4 KiB
YAML
image: docker:latest
|
|
|
|
services:
|
|
- docker:dind
|
|
|
|
.parallel:
|
|
parallel:
|
|
matrix:
|
|
- TARGET: [oldstable, stable, unstable]
|
|
|
|
stages:
|
|
- schedule
|
|
- build
|
|
- test
|
|
- release
|
|
|
|
include:
|
|
- template: Jobs/Code-Quality.gitlab-ci.yml
|
|
- template: Jobs/SAST.latest.gitlab-ci.yml
|
|
|
|
build:
|
|
stage: build
|
|
before_script:
|
|
- apk add bash git curl jq make
|
|
script:
|
|
- make build
|
|
- make save
|
|
extends: .parallel
|
|
rules:
|
|
- if: $CI_COMMIT_TAG
|
|
- if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TITLE !~ /^Draft/
|
|
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build"
|
|
artifacts:
|
|
paths:
|
|
- "tarballs/"
|
|
|
|
test:
|
|
stage: test
|
|
before_script:
|
|
- apk add bash git curl jq make
|
|
script:
|
|
- make load
|
|
- make build-test
|
|
- make test
|
|
extends: .parallel
|
|
needs:
|
|
- job: build
|
|
parallel:
|
|
matrix:
|
|
- TARGET: oldstable
|
|
- TARGET: stable
|
|
- TARGET: unstable
|
|
rules:
|
|
- if: $CI_COMMIT_TAG
|
|
- if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TITLE !~ /^Draft/
|
|
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build"
|
|
artifacts:
|
|
paths:
|
|
- tarballs/
|
|
|
|
publish-images:
|
|
stage: release
|
|
before_script:
|
|
- apk add bash git curl jq make
|
|
script:
|
|
- export
|
|
- make load
|
|
- make publish-images
|
|
needs:
|
|
- job: build
|
|
parallel:
|
|
matrix:
|
|
- TARGET: oldstable
|
|
- TARGET: stable
|
|
- TARGET: unstable
|
|
- job: test
|
|
extends: .parallel
|
|
rules:
|
|
- if: $CI_COMMIT_TAG
|
|
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build"
|
|
- when: never
|
|
artifacts:
|
|
paths:
|
|
- tarballs/
|
|
- versions/*
|
|
variables:
|
|
CI_DEBUG_TRACE: "true"
|
|
|
|
make-documents:
|
|
stage: release
|
|
before_script:
|
|
- apk add bash git curl jq make py3-jinja2 py3-gitlab
|
|
script:
|
|
- make documents
|
|
needs:
|
|
- job: publish-images
|
|
parallel:
|
|
matrix:
|
|
- TARGET: oldstable
|
|
- TARGET: stable
|
|
- TARGET: unstable
|
|
rules:
|
|
- if: $CI_COMMIT_TAG
|
|
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build"
|
|
- when: never
|
|
artifacts:
|
|
paths:
|
|
- versions/*
|
|
- documentations/*.md
|
|
|
|
publish-documents:
|
|
stage: release
|
|
before_script:
|
|
- apk add bash git curl jq make py3-gitlab
|
|
script:
|
|
- make publish-documents
|
|
needs:
|
|
- job: make-documents
|
|
rules:
|
|
- if: $CI_COMMIT_TAG
|
|
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build"
|
|
- when: never
|
|
artifacts:
|
|
paths:
|
|
- documentations/*.md
|
|
|
|
weekly-build-disable:
|
|
stage: release
|
|
needs:
|
|
- job: publish-documents
|
|
before_script:
|
|
- apk add bash git curl jq make py3-requests py3-gitlab
|
|
script:
|
|
- make unschedule-weekly-build
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build"
|
|
- when: never
|
|
|
|
|
|
weekly-build-scheduler:
|
|
stage: schedule
|
|
before_script:
|
|
- apk add bash git curl jq make py3-requests py3-gitlab
|
|
script:
|
|
- make schedule-weekly-build
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build-scheduler"
|
|
- when: never
|
|
artifacts:
|
|
reports:
|
|
metrics: metrics.txt
|
|
|
|
code_quality:
|
|
rules:
|
|
- if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TITLE !~ /^Draft/
|
|
- when: never
|
|
|
|
semgrep-sast:
|
|
rules:
|
|
- if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TITLE !~ /^Draft/
|
|
- when: never
|