From 4d9787fb86f4b96a5947c49db59c5bd3ac945cae Mon Sep 17 00:00:00 2001 From: TC Johnson Date: Mon, 29 Apr 2024 17:07:40 -0500 Subject: [PATCH] Fixes scp from build machines to orchestrator Each machine needed a script this specified that machine's arch and OS type. Also added a rule on the cache and test jobs to not run if the dry run trigger is present. [ci dryrun] --- .gitlab-ci.yml | 20 ++++++++++++------- ...r.sh => scp-amd64-debs-to-orchestrator.sh} | 0 .../scp-amd64-rpms-to-orchestrator.sh | 9 +++++++++ .../scp-arm64-debs-to-orchestrator.sh | 9 +++++++++ 4 files changed, 31 insertions(+), 7 deletions(-) rename scripts/cicd/build-machine/{scp-to-orchestrator.sh => scp-amd64-debs-to-orchestrator.sh} (100%) create mode 100644 scripts/cicd/build-machine/scp-amd64-rpms-to-orchestrator.sh create mode 100644 scripts/cicd/build-machine/scp-arm64-debs-to-orchestrator.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2ef0b8c6..3dc2cd4a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,6 +40,10 @@ build_cache: - else - echo "No need to rebuild" - fi + rules: + - if: $CI_COMMIT_MESSAGE =~ /\[ci dryrun]/ + - when: never + # Runs a basic unit test build, this task will use the `build-cache:latest` as set up in the projects Container Registry test_build: @@ -53,7 +57,9 @@ test_build: - *earthly_setup - earthly --use-inline-cache +unit-tests-linux --BASE=container $project_args resource_group: test - # when: manual + rules: + - if: $CI_COMMIT_MESSAGE =~ /\[ci dryrun]/ + - when: never # Actual release -- triggered by pushing a new version tag @@ -88,7 +94,7 @@ package_amd64_deb: script: - earthly bootstrap - earthly +package-linux-amd64-deb - - bash scripts/cicd/build-machine/scp-to-orchestrator.sh + - bash scripts/cicd/build-machine/scp-amd64-debs-to-orchestrator.sh rules: - if: '$CI_COMMIT_TAG =~ /v\d.+/' @@ -101,7 +107,7 @@ package_arm64_deb: script: - earthly bootstrap - earthly +package-linux-arm64-deb - - bash scripts/cicd/build-machine/scp-to-orchestrator.sh + - bash scripts/cicd/build-machine/scp-arm64-debs-to-orchestrator.sh rules: - if: '$CI_COMMIT_TAG =~ /v\d.+/' @@ -114,7 +120,7 @@ package_amd64_rpm: script: - earthly bootstrap - earthly +package-linux-amd64-rpm - - bash scripts/cicd/build-machine/scp-to-orchestrator.sh + - bash scripts/cicd/build-machine/scp-amd64-rmps-to-orchestrator.sh rules: - if: '$CI_COMMIT_TAG =~ /v\d.+/' @@ -202,7 +208,7 @@ dryrun_package_amd64_deb: script: - earthly bootstrap - earthly +package-linux-amd64-deb - - bash scripts/cicd/build-machine/scp-to-orchestrator.sh + - bash scripts/cicd/build-machine/scp-amd64-debs-to-orchestrator.sh rules: - if: $CI_COMMIT_MESSAGE =~ /\[ci dryrun]/ @@ -215,7 +221,7 @@ dryrun_package_arm64_deb: script: - earthly bootstrap - earthly +package-linux-arm64-deb - - bash scripts/cicd/build-machine/scp-to-orchestrator.sh + - bash scripts/cicd/build-machine/scp-arm64-debs-to-orchestrator.sh rules: - if: $CI_COMMIT_MESSAGE =~ /\[ci dryrun]/ @@ -228,7 +234,7 @@ dryrun_package_amd64_rpm: script: - earthly bootstrap - earthly +package-linux-amd64-rpm - - bash scripts/cicd/build-machine/scp-to-orchestrator.sh + - bash scripts/cicd/build-machine/scp-amd64-rmps-to-orchestrator.sh rules: - if: $CI_COMMIT_MESSAGE =~ /\[ci dryrun]/ diff --git a/scripts/cicd/build-machine/scp-to-orchestrator.sh b/scripts/cicd/build-machine/scp-amd64-debs-to-orchestrator.sh similarity index 100% rename from scripts/cicd/build-machine/scp-to-orchestrator.sh rename to scripts/cicd/build-machine/scp-amd64-debs-to-orchestrator.sh diff --git a/scripts/cicd/build-machine/scp-amd64-rpms-to-orchestrator.sh b/scripts/cicd/build-machine/scp-amd64-rpms-to-orchestrator.sh new file mode 100644 index 00000000..1f616f8d --- /dev/null +++ b/scripts/cicd/build-machine/scp-amd64-rpms-to-orchestrator.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +mkdir workspace +cd workspace +cp ~/builds/C6yRimG-M/0/veilid/veilid/target/packages/*.rpm . +tar -cf amd64-rpms.tar *.rpm +scp *.tar gitlab-runner@10.116.0.5:~ +cd ~ +rm -rf workspace \ No newline at end of file diff --git a/scripts/cicd/build-machine/scp-arm64-debs-to-orchestrator.sh b/scripts/cicd/build-machine/scp-arm64-debs-to-orchestrator.sh new file mode 100644 index 00000000..7216ec59 --- /dev/null +++ b/scripts/cicd/build-machine/scp-arm64-debs-to-orchestrator.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +mkdir workspace +cd workspace +cp ~/builds/7TYBLKUtG/0/veilid/veilid/target/packages/*.deb . +tar -cf arm64-debs.tar *.deb +scp *.tar gitlab-runner@10.116.0.5:~ +cd ~ +rm -rf workspace \ No newline at end of file