diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4494a1656146337cf7c64c44eb1081ef172d39e1..0f9bf5036e4732c032e72365077ce6c3e0bd71b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,12 @@ +workflow: + rules: + # If the pipeline is triggered by a merge request event then we should + # run. + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + + # If the pipeline is triggered by anything else then we should not run. + - when: "never" + default: # Guide the choice of an appropriate runner for all these jobs. # https://docs.gitlab.com/ee/ci/runners/#runner-runs-only-tagged-jobs @@ -10,7 +19,6 @@ variables: GET_SOURCES_ATTEMPTS: 10 docs: - stage: "build" script: - "nix-build --attr docs --out-link result-docs" # GitLab wants to lchown artifacts. It can't do that to store paths. Get @@ -22,12 +30,10 @@ docs: expose_as: "documentation" unit-tests: - stage: "test" script: - "nix-build --attr unit-tests && cat result" .morph-build: &MORPH_BUILD - stage: "test" timeout: "3 hours" script: @@ -60,7 +66,6 @@ morph-build-production: vulnerability-scan: - stage: "test" script: - "ci-tools/vulnerability-scan security-report.json" - "ci-tools/count-vulnerabilities <security-report.json" @@ -71,14 +76,12 @@ vulnerability-scan: system-tests: - stage: "test" timeout: "3 hours" script: - "nix-build --attr system-tests" # A template for a job that can update one of the grids. .update-grid: &UPDATE_GRID - stage: "deploy" script: | env --ignore-environment - \ NIX_PATH="$NIX_PATH" \