From 9091991ad79b00e902fbf0714a265852c403499e Mon Sep 17 00:00:00 2001 From: TC Johnson Date: Sun, 16 Mar 2025 17:17:03 -0500 Subject: [PATCH 1/2] Further adventures in CICD evolving Set the create build machine job to save the python config.json as an artifact so that it can be used by the delete build machines job to have the current machine's ID. I do not know where the artifact pops into existence in subsequent jobs, either in its original path or in the project root so tweaks will likely be needed. --- .gitlab-ci.yml | 5 +++++ .../distribute-stable-packages.sh | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dd00073f..d6f822af 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -263,6 +263,9 @@ dryrun_create_build_machines: script: - uv --directory scripts/cicd-python sync - uv --directory scripts/cicd-python run veilid_release_utils.py --create-build-machine + artifacts: + paths: scripts/cicd-python/config.json + expire_in: 6 hours rules: - if: $CI_COMMIT_MESSAGE =~ /\[ci dryrun]/ @@ -338,8 +341,10 @@ dryrun_delete_build_machines: tags: - build-orchestration script: + - cp config.json /scripts/cicd-python/config.json - uv --directory scripts/cicd-python sync - uv --directory scripts/cicd-python run veilid_release_utils.py --delete-build-machine + dependencies: [dryrun_create_build_machines] rules: - if: $CI_COMMIT_MESSAGE =~ /\[ci dryrun]/ diff --git a/scripts/cicd/build-orchestration/distribute-stable-packages.sh b/scripts/cicd/build-orchestration/distribute-stable-packages.sh index 37b14305..81f8f8b3 100644 --- a/scripts/cicd/build-orchestration/distribute-stable-packages.sh +++ b/scripts/cicd/build-orchestration/distribute-stable-packages.sh @@ -15,9 +15,9 @@ gpg --armor --export admin@veilid.org > $HOME/srv/gpg/veilid-packages-key.public # Copy .deb files into the workspace and generate repo files echo "Starting deb process" -cd $HOME -tar -xf amd64-debs.tar -tar -xf arm64-debs.tar +#cd $HOME +#tar -xf amd64-debs.tar +#tar -xf arm64-debs.tar cp *.deb $HOME/srv/apt/pool/stable/main cd $HOME/srv/apt echo "Creating Packages file" @@ -34,8 +34,8 @@ cat $HOME/srv/apt/dists/stable/Release | gpg --default-key admin@veilid.org -abs # Copy .rpm files into the workspace and generate repo files echo "Starting rpm process" -cd $HOME -tar -xf amd64-rpms.tar +#cd $HOME +#tar -xf amd64-rpms.tar echo "Copying rpms to container workspace" cp *x86_64.rpm $HOME/rpm-build-container/mount/repo/stable/x86_64 echo "Copying signing material to container workspace" @@ -72,7 +72,7 @@ rsync --archive --delete $HOME/srv/* gitlab-runner@10.116.0.3:/srv # Cleanup echo "Cleaning up the workspace" rm -rf $GNUPGHOME -rm $HOME/*.tar +#rm $HOME/*.tar rm $HOME/*.deb rm $HOME/*.rpm rm -rf $HOME/rpm-build-container/mount/keystore/* From c429ee926000c0550d490b42c2675189122ba958 Mon Sep 17 00:00:00 2001 From: TC Date: Sun, 16 Mar 2025 22:27:01 +0000 Subject: [PATCH 2/2] Update .gitlab-ci.yml file [ci dryrun] --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d6f822af..24383164 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -264,7 +264,8 @@ dryrun_create_build_machines: - uv --directory scripts/cicd-python sync - uv --directory scripts/cicd-python run veilid_release_utils.py --create-build-machine artifacts: - paths: scripts/cicd-python/config.json + paths: + - scripts/cicd-python/config.json expire_in: 6 hours rules: - if: $CI_COMMIT_MESSAGE =~ /\[ci dryrun]/ @@ -340,11 +341,11 @@ dryrun_delete_build_machines: - dryrun_deploy_repos tags: - build-orchestration + - dryrun_create_build_machines] script: - cp config.json /scripts/cicd-python/config.json - uv --directory scripts/cicd-python sync - uv --directory scripts/cicd-python run veilid_release_utils.py --delete-build-machine - dependencies: [dryrun_create_build_machines] rules: - if: $CI_COMMIT_MESSAGE =~ /\[ci dryrun]/