Modified path to CICD scripts in CI config

I thought CICD's working directory was in the project root but the release
failed to find the scripts. I've changed the script executions to absolute
paths. There's a directory is named for the runner's ID, is different on
each machine, and changes if the runner is replaced. There's a variable
that should overcome this, CI_RUNNER_ID, which I've used in the asbolute
paths. Fingers crossed, let's try it again.
This commit is contained in:
TC Johnson 2024-04-28 18:21:39 -05:00
parent bdb7ad32f2
commit 2a73946246
No known key found for this signature in database
2 changed files with 14 additions and 13 deletions

View File

@ -71,9 +71,9 @@ create_build_machines:
tags:
- build-orchestration
script:
- scripts/cicd/build-orchestration/build-machine-ctl.sh create amd64-deb
- scripts/cicd/build-orchestration/build-machine-ctl.sh create arm64-deb
- scripts/cicd/build-orchestration/build-machine-ctl.sh create amd64-rpm
- /home/gitlab-runner/builds/$CI_RUNNER_ID/0/veilid/veilid/scripts/cicd/build-orchestration/build-machine-ctl.sh create amd64-deb
- /home/gitlab-runner/builds/$CI_RUNNER_ID/0/veilid/veilid/scripts/cicd/build-orchestration/build-machine-ctl.sh create arm64-deb
- /home/gitlab-runner/builds/$CI_RUNNER_ID/0/veilid/veilid/scripts/cicd/build-orchestration/build-machine-ctl.sh create amd64-rpm
rules:
- if: '$CI_COMMIT_TAG =~ /v\d.+/'
@ -86,7 +86,7 @@ package_amd64_deb:
script:
- earthly bootstrap
- earthly +package-linux-amd64-deb
- scripts/cicd/build-machine/scp-to-orchestrator.sh
- /home/gitlab-runner/builds/$CI_RUNNER_ID/0/veilid/veilid/scripts/cicd/build-machine/scp-to-orchestrator.sh
rules:
- if: '$CI_COMMIT_TAG =~ /v\d.+/'
@ -99,7 +99,7 @@ package_arm64_deb:
script:
- earthly bootstrap
- earthly +package-linux-arm64-deb
- scripts/cicd/build-machine/scp-to-orchestrator.sh
- /home/gitlab-runner/builds/$CI_RUNNER_ID/0/veilid/veilid/scripts/cicd/build-machine/scp-to-orchestrator.sh
rules:
- if: '$CI_COMMIT_TAG =~ /v\d.+/'
@ -112,7 +112,7 @@ package_amd64_rpm:
script:
- earthly bootstrap
- earthly +package-linux-amd64-rpm
- - scripts/cicd/build-machine/scp-to-orchestrator.sh
- /home/gitlab-runner/builds/$CI_RUNNER_ID/0/veilid/veilid/scripts/cicd/build-machine/scp-to-orchestrator.sh
rules:
- if: '$CI_COMMIT_TAG =~ /v\d.+/'
@ -121,6 +121,7 @@ publish_crates:
tags:
- build-amd64-deb
script:
- cd /home/gitlab-runner/builds/$CI_RUNNER_ID/0/veilid/veilid/
- vlt login
- vlt run --command="cargo publish -p veilid-tools --dry-run"
- vlt run --command="cargo publish -p veilid-tools"
@ -135,7 +136,7 @@ publish_python:
- build-amd64-deb
script:
- vlt login
- cd veilid-python && /home/gitlab-runner/.local/bin/poetry build
- cd /home/gitlab-runner/builds/$CI_RUNNER_ID/0/veilid/veilid/veilid-python && /home/gitlab-runner/.local/bin/poetry build
- vlt run --command="/home/gitlab-runner/.local/bin/poetry publish"
rules:
- if: '$CI_COMMIT_TAG =~ /v\d.+/'
@ -149,8 +150,8 @@ build_repositories:
variables:
SECURE_FILES_DOWNLOAD_PATH: './'
script:
- cp scripts/cicd/build-orchestration/generate-release.sh ~
- scripts/cicd/build-orchestration/distribute-packages.sh
- cp /home/gitlab-runner/builds/$CI_RUNNER_ID/0/veilid/veilid/scripts/cicd/build-orchestration/generate-release.sh ~
- /home/gitlab-runner/builds/$CI_RUNNER_ID/0/veilid/veilid/scripts/cicd/build-orchestration/distribute-packages.sh
rules:
- if: '$CI_COMMIT_TAG =~ /v\d.+/'
@ -161,7 +162,7 @@ deploy_repos:
tags:
- repo-server
script:
- scripts/cicd/repo-server/deploy-repo.sh
- /home/gitlab-runner/builds/$CI_RUNNER_ID/0/veilid/veilid/scripts/cicd/repo-server/deploy-repo.sh
rules:
- if: '$CI_COMMIT_TAG =~ /v\d.+/'
@ -172,8 +173,8 @@ delete_build_machines:
tags:
- build-orchestration
script:
- scripts/cicd/build-orchestration/build-machine-ctl.sh delete amd64-deb
- scripts/cicd/build-orchestration/build-machine-ctl.sh delete arm64-deb
- scripts/cicd/build-orchestration/build-machine-ctl.sh delete amd64-rpm
- /home/gitlab-runner/builds/$CI_RUNNER_ID/0/veilid/veilid/scripts/cicd/build-orchestration/build-machine-ctl.sh delete amd64-deb
- /home/gitlab-runner/builds/$CI_RUNNER_ID/0/veilid/veilid/scripts/cicd/build-orchestration/build-machine-ctl.sh delete arm64-deb
- /home/gitlab-runner/builds/$CI_RUNNER_ID/0/veilid/veilid/scripts/cicd/build-orchestration/build-machine-ctl.sh delete amd64-rpm
rules:
- if: '$CI_COMMIT_TAG =~ /v\d.+/'