From 2c9591334bf1f7f9b5b6842ce9452dfa811a8284 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Wed, 23 Aug 2023 16:16:41 -0500 Subject: [PATCH 1/2] Made deployment-tests workflow usable by other projects Ticket: ENT-9170 Changelog: none --- .github/workflows/deployment-tests.yml | 7 +++++-- ci/package-sha.sh | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deployment-tests.yml b/.github/workflows/deployment-tests.yml index 6867c8ac7..3a18161fa 100644 --- a/.github/workflows/deployment-tests.yml +++ b/.github/workflows/deployment-tests.yml @@ -46,10 +46,12 @@ jobs: path: masterfiles ref: ${{steps.together.outputs.masterfiles || github.base_ref}} - - name: Checkout Buildscripts (current project) + - name: Checkout Buildscripts uses: actions/checkout@v3 with: + repository: cfengine/buildscripts path: buildscripts + ref: ${{steps.together.outputs.buildscripts || github.base_ref}} fetch-depth: 20 - name: Checkout Nova @@ -107,6 +109,7 @@ jobs: deps - name: Build package in docker + id: build_package env: GH_ACTIONS_SSH_KEY_BUILD_ARTIFACTS_CACHE: ${{ secrets.GH_ACTIONS_SSH_KEY_BUILD_ARTIFACTS_CACHE }} run: | @@ -130,7 +133,7 @@ jobs: key: packages-${{ env.PACKAGE_SHA }} - name: Save artifacts - if: success() || failure() + if: ${{ success() || failure() && steps.build_package.conclusion != 'success' }} uses: actions/upload-artifact@v3 with: name: artifacts diff --git a/ci/package-sha.sh b/ci/package-sha.sh index 0cb5a8426..83ffca824 100755 --- a/ci/package-sha.sh +++ b/ci/package-sha.sh @@ -10,7 +10,7 @@ CORE_SHA=$(git -C "${NTECH_ROOT}/core" log --pretty='format:%h' -1 -- .) echo "CORE_SHA: ${CORE_SHA}" >&2 ENTERPRISE_SHA=$(git -C "${NTECH_ROOT}/enterprise" log --pretty='format:%h' -1 -- .) echo "ENTERPRISE_SHA: ${ENTERPRISE_SHA}" >&2 -NOVA_SHA=$(git -C "${NTECH_ROOT}/nova" log --pretty='format:%h' -1 -- .) +NOVA_SHA=$("${NTECH_ROOT}/nova/ci/code-sha.sh") echo "NOVA_SHA: ${NOVA_SHA}" >&2 MASTERFILES_SHA=$(git -C "${NTECH_ROOT}/masterfiles" log --pretty='format:%h' -1 -- .) echo "MASTERFILES_SHA: ${MASTERFILES_SHA}" >&2 From 7ee26e1d8ceb7fd1d2c6172d14356adc054dcf6f Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Wed, 23 Aug 2023 16:17:20 -0500 Subject: [PATCH 2/2] temporary change for testing, will remove after green jobs are seen by code reviewers --- .github/workflows/deployment-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deployment-tests.yml b/.github/workflows/deployment-tests.yml index 3a18161fa..11aa7856d 100644 --- a/.github/workflows/deployment-tests.yml +++ b/.github/workflows/deployment-tests.yml @@ -20,8 +20,8 @@ jobs: - name: Checkout Together Action uses: actions/checkout@v3 with: - repository: cfengine/together-javascript-action - ref: main + repository: craigcomstock/together-javascript-action + ref: 8379a8ca4425acd35c164d808031c91c2da2fb78 ssh-key: ${{ secrets.GH_ACTIONS_SSH_DEPLOY_KEY_TOGETHER_REPO }} ssh-known-hosts: github.com