Further dry run trigger refinements

The dry run should now be configured if changes to .gitlab-ci.yml,
Earthfile, contents of scripts/cicd, or contents of package arrive
as the result of a push OR merge but NOT when a tag is present. I
think that will prevent the dry run executing alongside the actual
release process when a new release tag is pushed but that also
contains changes to the above mentioned files. <fingers crossed emoji>
This commit is contained in:
TC Johnson 2024-04-29 16:03:38 -05:00
parent c33f0f19da
commit fa1ca77d35
No known key found for this signature in database

View File

@ -191,11 +191,12 @@ dryrun_create_build_machines:
- bash scripts/cicd/build-orchestration/build-machine-ctrl.sh create arm64-deb
- bash scripts/cicd/build-orchestration/build-machine-ctrl.sh create amd64-rpm
rules:
- if: $CI_PIPELINE_SOURCE == "push"
- if: ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event") && $CI_COMMIT_TAG == NULL
changes:
- .gitlab-ci.yml
- scripts/cicd/**/*
- Earthfile
- package/**/*
dryrun_package_amd64_deb:
stage: build_packages
@ -208,11 +209,12 @@ dryrun_package_amd64_deb:
- earthly +package-linux-amd64-deb
- bash scripts/cicd/build-machine/scp-to-orchestrator.sh
rules:
- if: $CI_PIPELINE_SOURCE == "push"
- if: ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event") && $CI_COMMIT_TAG == NULL
changes:
- .gitlab-ci.yml
- scripts/cicd/**/*
- Earthfile
- package/**/*
dryrun_package_arm64_deb:
stage: build_packages
@ -225,12 +227,13 @@ dryrun_package_arm64_deb:
- earthly +package-linux-arm64-deb
- bash scripts/cicd/build-machine/scp-to-orchestrator.sh
rules:
- if: $CI_PIPELINE_SOURCE == "push"
- if: ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event") && $CI_COMMIT_TAG == NULL
changes:
- .gitlab-ci.yml
- scripts/cicd/**/*
- Earthfile
- package/**/*
dryrun_package_amd64_rpm:
stage: build_packages
needs:
@ -242,11 +245,12 @@ dryrun_package_amd64_rpm:
- earthly +package-linux-amd64-rpm
- bash scripts/cicd/build-machine/scp-to-orchestrator.sh
rules:
- if: $CI_PIPELINE_SOURCE == "push"
- ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event") && $CI_COMMIT_TAG == NULL
changes:
- .gitlab-ci.yml
- scripts/cicd/**/*
- Earthfile
- package/**/*
# dryrun_publish_crates:
# stage: build_packages
@ -259,11 +263,12 @@ dryrun_package_amd64_rpm:
# - vlt run --command="cargo publish -p veilid-tools --dry-run"
# - vlt run --command="cargo publish -p veilid-core --dry-run"
# rules:
# - if: $CI_PIPELINE_SOURCE == "push"
# - if: ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event") && $CI_COMMIT_TAG == NULL
# changes:
# - .gitlab-ci.yml
# - scripts/cicd/**/*
# - Earthfile
# - package/**/*
dryrun_publish_python:
stage: build_packages
@ -272,14 +277,14 @@ dryrun_publish_python:
tags:
- build-amd64-deb
script:
- vlt login
- cd veilid-python && /home/gitlab-runner/.local/bin/poetry build
rules:
- if: $CI_PIPELINE_SOURCE == "push"
- if: ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event") && $CI_COMMIT_TAG == NULL
changes:
- .gitlab-ci.yml
- scripts/cicd/**/*
- Earthfile
- package/**/*
dryrun_build_repositories:
stage: distribute
@ -291,11 +296,12 @@ dryrun_build_repositories:
- cp scripts/cicd/build-orchestration/generate-release.sh ~
- bash scripts/cicd/build-orchestration/distribute-packages.sh
rules:
- if: $CI_PIPELINE_SOURCE == "push"
- if: ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event") && $CI_COMMIT_TAG == NULL
changes:
- .gitlab-ci.yml
- scripts/cicd/**/*
- Earthfile
- package/**/*
dryrun_deploy_repos:
stage: distribute
@ -306,11 +312,12 @@ dryrun_deploy_repos:
script:
- ls -al repo.tar
rules:
- if: $CI_PIPELINE_SOURCE == "push"
- if: ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event") && $CI_COMMIT_TAG == NULL
changes:
- .gitlab-ci.yml
- scripts/cicd/**/*
- Earthfile
- package/**/*
dryrun_delete_build_machines:
stage: distribute
@ -323,8 +330,9 @@ dryrun_delete_build_machines:
- bash scripts/cicd/build-orchestration/build-machine-ctrl.sh delete arm64-deb
- bash scripts/cicd/build-orchestration/build-machine-ctrl.sh delete amd64-rpm
rules:
- if: $CI_PIPELINE_SOURCE == "push"
- if: ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event") && $CI_COMMIT_TAG == NULL
changes:
- .gitlab-ci.yml
- scripts/cicd/**/*
- Earthfile
- Earthfile
- package/**/*