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 test: stage: build script: export rules: - if: $CI_MERGE_REQUEST_ID 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_APPROVED != "true" - 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_APPROVED != "true" - 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: - 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" artifacts: paths: - tarballs/ - versions/* make-documents: stage: release before_script: - apk add bash git curl jq make py3-jinja2 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" artifacts: paths: - versions/* - documentations/*.md publish-documents: stage: release before_script: - apk add bash git curl jq make script: - make publish-documents needs: - job: make-documents rules: - if: $CI_COMMIT_TAG - if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build" 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" 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" artifacts: reports: metrics: metrics.txt code_quality: rules: - if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_APPROVED != "true"