From c525a757fdc47983825bc82a93454c96081a5e15 Mon Sep 17 00:00:00 2001 From: TC Johnson Date: Tue, 22 Aug 2023 14:36:33 -0500 Subject: [PATCH 1/4] Move tests off of Digital Ocean Experimenting with using GitLab SaaS runners to do test CI stages. --- .gitlab-ci.yml | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 507fef24..c909d11c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,16 +13,16 @@ stages: #before_script: # - earthly bootstrap -create_test_machine: - stage: test - only: - - main - - merge_requests - tags: - - build-orchestration - script: - - /home/gitlab-runner/build-machine-ctl.sh create amd64-deb - when: manual +# create_test_machine: +# stage: test +# only: +# - main +# - merge_requests +# tags: +# - build-orchestration +# script: +# - /home/gitlab-runner/build-machine-ctl.sh create amd64-deb +# when: manual test_amd64: stage: test @@ -38,17 +38,17 @@ test_amd64: - earthly bootstrap - earthly --ci +unit-tests-linux-amd64 -delete_test_machine: - stage: test - only: - - main - - merge_requests - needs: - - test_amd64 - tags: - - build-orchestration - script: - - /home/gitlab-runner/build-machine-ctl.sh delete amd64-deb +# delete_test_machine: +# stage: test +# only: +# - main +# - merge_requests +# needs: +# - test_amd64 +# tags: +# - build-orchestration +# script: +# - /home/gitlab-runner/build-machine-ctl.sh delete amd64-deb release_job: stage: release From 5d714dcf58ac0d13fec9cb2caa2772a9a83307ba Mon Sep 17 00:00:00 2001 From: TC Date: Tue, 22 Aug 2023 19:40:31 +0000 Subject: [PATCH 2/4] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c909d11c..0af3a719 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,16 +26,19 @@ stages: test_amd64: stage: test - image: earthly/earthly:v0.6.30 + image: docker + services: + - docker:dind only: - main - merge_requests - needs: - - create_test_machine - tags: - - earthly-tests + before_script: + - apk update && apk add git + - wget https://github.com/earthly/earthly/releases/download/v0.6.2/earthly-linux-amd64 -O /usr/local/bin/earthly + - chmod +x /usr/local/bin/earthly + - export FORCE_COLOR=1 + - /usr/local/bin/earthly bootstrap script: - - earthly bootstrap - earthly --ci +unit-tests-linux-amd64 # delete_test_machine: From 9429d3de6e8cd2f3cffbaac4800c1283e44fae12 Mon Sep 17 00:00:00 2001 From: TC Date: Tue, 22 Aug 2023 19:59:59 +0000 Subject: [PATCH 3/4] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0af3a719..ecb32884 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,19 +26,12 @@ stages: test_amd64: stage: test - image: docker - services: - - docker:dind - only: - - main - - merge_requests - before_script: - - apk update && apk add git - - wget https://github.com/earthly/earthly/releases/download/v0.6.2/earthly-linux-amd64 -O /usr/local/bin/earthly - - chmod +x /usr/local/bin/earthly - - export FORCE_COLOR=1 - - /usr/local/bin/earthly bootstrap + image: earthly/earthly:v0.7.15 + # only: + # - main + # - merge_requests script: + - earthly bootstrap - earthly --ci +unit-tests-linux-amd64 # delete_test_machine: From b77beeb3be68da25efbc8e802d79347667445c6e Mon Sep 17 00:00:00 2001 From: TC Date: Tue, 22 Aug 2023 21:49:55 +0000 Subject: [PATCH 4/4] Tests passed. This commit is a clean up of .gitlab-ci.yml --- .gitlab-ci.yml | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ecb32884..de5403c1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,41 +10,16 @@ stages: - release - distribute -#before_script: -# - earthly bootstrap - -# create_test_machine: -# stage: test -# only: -# - main -# - merge_requests -# tags: -# - build-orchestration -# script: -# - /home/gitlab-runner/build-machine-ctl.sh create amd64-deb -# when: manual - test_amd64: stage: test image: earthly/earthly:v0.7.15 - # only: - # - main - # - merge_requests + only: + - main + - merge_requests script: - earthly bootstrap - earthly --ci +unit-tests-linux-amd64 - -# delete_test_machine: -# stage: test -# only: -# - main -# - merge_requests -# needs: -# - test_amd64 -# tags: -# - build-orchestration -# script: -# - /home/gitlab-runner/build-machine-ctl.sh delete amd64-deb + when: manual release_job: stage: release