From 9ba6c00b2a3f3a0c6e5bd025145c704fd68b039d Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 7 Jun 2023 09:40:31 -0400 Subject: [PATCH 1/6] Update driver.sh no op change for test --- ci/scripts/driver.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/scripts/driver.sh b/ci/scripts/driver.sh index d688e8fc61..f861acb71b 100755 --- a/ci/scripts/driver.sh +++ b/ci/scripts/driver.sh @@ -13,6 +13,7 @@ set -eux # PR number and calls clone-build_ci.sh to perform a clone and full build from $(HOMEgfs)/sorc # of the PR. It then is ready to run a suite of regression tests with various # configurations with run_tests.py. +# No-op for test ####################################################################################### ################################################################# From e6fb30bf10d89a6ab4159972f2e3e7c0d996d382 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 7 Jun 2023 09:40:31 -0400 Subject: [PATCH 2/6] Update driver.sh no op change for test --- ci/scripts/driver.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/scripts/driver.sh b/ci/scripts/driver.sh index 425d5fbbfd..c913a4aa96 100755 --- a/ci/scripts/driver.sh +++ b/ci/scripts/driver.sh @@ -13,6 +13,7 @@ set -eux # PR number and calls clone-build_ci.sh to perform a clone and full build from $(HOMEgfs)/sorc # of the PR. It then is ready to run a suite of regression tests with various # configurations with run_tests.py. +# No-op for test ####################################################################################### ################################################################# From daf3f90ff899e3273f2069414b9fee0e39653096 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 28 Jun 2023 20:34:58 +0000 Subject: [PATCH 3/6] added selfhosted.yaml test file --- .github/workflows/selfhosted.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/selfhosted.yaml diff --git a/.github/workflows/selfhosted.yaml b/.github/workflows/selfhosted.yaml new file mode 100644 index 0000000000..41d633ba25 --- /dev/null +++ b/.github/workflows/selfhosted.yaml @@ -0,0 +1,18 @@ +name: test-self-hosted-runner + +on: workflow_dispatch + +defaults: + run: + shell: bash + +jobs: + + test-self-hosted-runner: + + runs-on: amzonlinx_tmcg + timeout-minutes: 600 + + steps: + - name: validate-workflow + run: /home/tmcguinness/temp/hello.sh \ No newline at end of file From 9481e51e4754e7618712c652c590afae28c4434e Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 28 Jun 2023 20:52:37 +0000 Subject: [PATCH 4/6] updated for merge --- .github/workflows/selfhosted.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/selfhosted.yaml b/.github/workflows/selfhosted.yaml index 41d633ba25..e3dbfc39ea 100644 --- a/.github/workflows/selfhosted.yaml +++ b/.github/workflows/selfhosted.yaml @@ -1,3 +1,4 @@ +# Test Self-hosted-Runner name: test-self-hosted-runner on: workflow_dispatch @@ -15,4 +16,4 @@ jobs: steps: - name: validate-workflow - run: /home/tmcguinness/temp/hello.sh \ No newline at end of file + run: /home/tmcguinness/temp/hello.sh From e018b99e215cc62e143e38bfcbf33c3117b5d0f6 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 28 Jun 2023 21:29:20 +0000 Subject: [PATCH 5/6] changed name of Action --- .github/workflows/selfhosted.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/selfhosted.yaml b/.github/workflows/selfhosted.yaml index e3dbfc39ea..6967ee824a 100644 --- a/.github/workflows/selfhosted.yaml +++ b/.github/workflows/selfhosted.yaml @@ -1,7 +1,7 @@ # Test Self-hosted-Runner -name: test-self-hosted-runner +name: SelfRunner -on: workflow_dispatch +on: push defaults: run: From 6b64b585c5f65262598b54634bc0b16a72aadc15 Mon Sep 17 00:00:00 2001 From: Terry McGuinness Date: Thu, 29 Jun 2023 10:22:36 -0500 Subject: [PATCH 6/6] Added GitHub action for running build script on Orion --- .github/workflows/selfhosted.yaml | 36 +++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/selfhosted.yaml b/.github/workflows/selfhosted.yaml index 6967ee824a..e64a5e18b5 100644 --- a/.github/workflows/selfhosted.yaml +++ b/.github/workflows/selfhosted.yaml @@ -1,7 +1,8 @@ -# Test Self-hosted-Runner -name: SelfRunner +name: OrionRunner -on: push +on: + label: + types: [created, deleted] defaults: run: @@ -9,11 +10,32 @@ defaults: jobs: - test-self-hosted-runner: + getlabels: + runs-on: ubuntu-latest + outputs: + labels: ${{ steps.id.outputs.labels }} + steps: + - name: Get Label Steps + id: id + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OWNER: ${{ github.repository_owner }} + REPO_NAME: ${{ github.event.repository.name }} + PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} + run: | + LABELS1="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" + LABELS=$(echo "$LABELS1" | tr '\n' ' ') + echo "labels=$LABELS" >> $GITHUB_OUTPUT - runs-on: amzonlinx_tmcg + clone-build: + if: contains( needs.getlabels.outputs.labels, 'CI-Orion-Build') + runs-on: [self-hosted, orion-ready] timeout-minutes: 600 + needs: + - getlabels steps: - - name: validate-workflow - run: /home/tmcguinness/temp/hello.sh + - name: build-clone + env: + REPO_URL: ${{ github.server_url }}/${{ github.repository }} + run: /work2/noaa/global/mterry/global-workflow/ci/scripts/clone-build_ci.sh -p ${{ github.event.pull_request.number }} -d /work2/noaa/stmp/GFS_CI_ROOT/PR/${{ github.event.pull_request.number }} -o /work2/noaa/stmp/GFS_CI_ROOT/PR/output_${{ github.run_id }}