Skip to content

Commit f4606bf

Browse files
Merge branch 'develop' into feature/jcb-obsbias
2 parents 5e8bd8e + ca8cd7a commit f4606bf

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

.github/workflows/pw_aws_ci.yaml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,57 @@ env:
3131
MACHINE_ID: noaacloud
3232

3333
jobs:
34+
35+
run-start-clusters:
36+
runs-on: ubuntu-latest
37+
env:
38+
PW_PLATFORM_HOST: noaa.parallel.works
39+
steps:
40+
- name: Checkout pw-cluster-automation repository
41+
uses: actions/checkout@v4
42+
with:
43+
repository: TerrenceMcGuinness-NOAA/pw-cluster-automation
44+
path: pw-cluster-automation
45+
ref: pw_cluster_noaa
46+
47+
- name: Run startClusters
48+
run: |
49+
mkdir -p ~/.ssh
50+
echo "${{ secrets.ID_RSA_AWS }}" > ~/.ssh/id_rsa
51+
echo "${{ secrets.PW_API_KEY }}" > ~/.ssh/pw_api.key
52+
chmod 700 ~/.ssh
53+
chmod 600 ~/.ssh/id_rsa
54+
chmod 600 ~/.ssh/pw_api.key
55+
if [ "${{ github.event.inputs.os }}" == "rocky" ]; then
56+
clustername="globalworkflowciplatformrocky8"
57+
elif [ "${{ github.event.inputs.os }}" == "centos" ]; then
58+
clustername="awsemctmcgc7i48xlargeciplatform"
59+
fi
60+
python3 pw-cluster-automation/startClusters.py $clustername
61+
3462
fetch-branch:
63+
needs: run-start-clusters
3564
runs-on: ubuntu-latest
3665
env:
3766
GH_TOKEN: ${{ secrets.GITHUBTOKEN }}
3867
outputs:
3968
branch: ${{ steps.get-branch.outputs.branch }}
69+
repo: ${{ steps.get-branch.outputs.repo }}
4070
steps:
41-
- name: Fetch branch name for PR
71+
- name: Fetch branch name and repo for PR
4272
id: get-branch
4373
run: |
4474
pr_number=${{ github.event.inputs.pr_number }}
4575
repo=${{ github.repository }}
4676
if [ "$pr_number" -eq "0" ]; then
4777
branch=${{ github.event.inputs.ref }}
78+
repo_url="https://github.com/${{ github.repository_owner }}/${{ github.repository }}.git"
4879
else
4980
branch=$(gh pr view $pr_number --repo $repo --json headRefName --jq '.headRefName')
81+
repo_url=$(gh pr view $pr_number --repo $repo --json headRepository --jq '.headRepository.url')
5082
fi
5183
echo "::set-output name=branch::$branch"
84+
echo "::set-output name=repo::$repo_url"
5285
5386
checkout:
5487
needs: fetch-branch
@@ -64,6 +97,7 @@ jobs:
6497
with:
6598
path: ${{ github.run_id }}/HOMEgfs
6699
submodules: 'recursive'
100+
repository: ${{ needs.fetch-branch.outputs.repo }}
67101
ref: ${{ needs.fetch-branch.outputs.branch }}
68102

69103
build-link:

0 commit comments

Comments
 (0)