Skip to content

Commit 38190e5

Browse files
Added AWS credentials via Github OIDC
* Added aws credentials via oidc * Changed role name * Changed to ireland arn in existingvpc-ubuntu-tue * Added logger and removed push for few workflows * Changed keypairname for ireland * Updated ssl certificate arn * Changed role duration to 2hrs * Added aws credentials via oids for all workflows * Added aws credentials via oidc for all workflows * Changed role duration to 2 hrs for all workflows * Updated python version to 3.13 * Added run for newvpc-win-wed workflow
1 parent 9568454 commit 38190e5

File tree

5 files changed

+43
-19
lines changed

5 files changed

+43
-19
lines changed

.github/workflows/healthcheck-app-existingVpc-Ubuntu-Tue.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
workflow_dispatch:
77
schedule:
88
- cron: '0 15 * * 2'
9+
permissions:
10+
id-token: write
11+
contents: read
912
jobs:
1013
build:
1114
runs-on: ubuntu-latest
@@ -16,6 +19,12 @@ jobs:
1619
uses: actions/setup-python@v2
1720
with:
1821
python-version: '3.13'
22+
- name: Configure AWS credentials via OIDC
23+
uses: aws-actions/configure-aws-credentials@v4
24+
with:
25+
role-to-assume: ${{ secrets.oidc_role_arn }}
26+
aws-region: eu-west-1
27+
role-duration-seconds: 7200
1928
- name: Install dependencies
2029
run: |
2130
python -m pip install --upgrade pip
@@ -31,8 +40,5 @@ jobs:
3140
- name: MPS Ref Arch AWS existing VPC Health Check Test eu-west on Ubuntu
3241
run: |
3342
cd healthcheck
34-
export AWS_ACCESS_KEY_ID=${{ secrets.aws_access_key_id }}
35-
export AWS_SECRET_ACCESS_KEY=${{ secrets.aws_secret_access_key }}
36-
export AWS_REGION=eu-west-1
37-
python test_healthcheck_existing_vpc.py ${{ secrets.KeyPairNameIreland }} ${{ secrets.lmpassword }} ${{ secrets.ipaddress }} ${{ secrets.SSLCertificateARNIreland }} "eu-west-1" "Ubuntu"
43+
python test_healthcheck_existing_vpc.py ${{ secrets.OIDCKeyPairNameIreland }} ${{ secrets.lmpassword }} ${{ secrets.ipaddress }} ${{ secrets.OIDCSSLCertificateARNIreland }} "eu-west-1" "Ubuntu"
3844

.github/workflows/healthcheck-app-existingVpc-Win-Thurs.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
workflow_dispatch:
77
schedule:
88
- cron: '0 15 * * 4'
9+
permissions:
10+
id-token: write
11+
contents: read
912
jobs:
1013
build:
1114
runs-on: ubuntu-latest
@@ -16,6 +19,12 @@ jobs:
1619
uses: actions/setup-python@v4
1720
with:
1821
python-version: '3.13'
22+
- name: Configure AWS credentials via OIDC
23+
uses: aws-actions/configure-aws-credentials@v4
24+
with:
25+
role-to-assume: ${{ secrets.oidc_role_arn }}
26+
aws-region: us-east-1
27+
role-duration-seconds: 7200
1928
- name: Install dependencies
2029
run: |
2130
python -m pip install --upgrade pip
@@ -31,8 +40,5 @@ jobs:
3140
- name: MPS Ref Arch AWS existing VPC Health Check Test us-east on Windows
3241
run: |
3342
cd healthcheck
34-
export AWS_ACCESS_KEY_ID=${{ secrets.aws_access_key_id }}
35-
export AWS_SECRET_ACCESS_KEY=${{ secrets.aws_secret_access_key }}
36-
export AWS_REGION=us-east-1
37-
python test_healthcheck_existing_vpc.py ${{ secrets.KeyPairName }} ${{ secrets.lmpassword }} ${{ secrets.ipaddress }} ${{ secrets.SSLCertificateARN }} "us-east-1" "Windows"
43+
python test_healthcheck_existing_vpc.py ${{ secrets.OIDCKeyPairNameVirginia }} ${{ secrets.lmpassword }} ${{ secrets.ipaddress }} ${{ secrets.OIDCSSLCertificateARNVirginia }} "us-east-1" "Windows"
3844

.github/workflows/healthcheck-app-newVpc-Ubuntu-Mon.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
# This workflow will install Python dependencies, run tests and lint with a single version of Python
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3-
name: MATLAB Production Server Ref Arch AWS new VPC Health Check Test us-east on Ubuntu
3+
name: MATLAB Production Server Ref Arch AWS new VPC Health Check Test us-west on Ubuntu
44

55
on:
66
workflow_dispatch:
77
push:
88
schedule:
99
- cron: '0 15 * * 1'
10+
permissions:
11+
id-token: write
12+
contents: read
1013
jobs:
1114
build:
1215
runs-on: ubuntu-latest
@@ -17,6 +20,12 @@ jobs:
1720
uses: actions/setup-python@v2
1821
with:
1922
python-version: '3.13'
23+
- name: Configure AWS credentials via OIDC
24+
uses: aws-actions/configure-aws-credentials@v4
25+
with:
26+
role-to-assume: ${{ secrets.oidc_role_arn }}
27+
aws-region: us-west-2
28+
role-duration-seconds: 7200
2029
- name: Install dependencies
2130
run: |
2231
python -m pip install --upgrade pip
@@ -29,11 +38,8 @@ jobs:
2938
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3039
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3140
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
32-
- name: MPS Ref Arch AWS new VPC Health Check Test us-east on Ubuntu
41+
- name: MPS Ref Arch AWS new VPC Health Check Test us-west on Ubuntu
3342
run: |
3443
cd healthcheck
35-
export AWS_ACCESS_KEY_ID=${{ secrets.aws_access_key_id }}
36-
export AWS_SECRET_ACCESS_KEY=${{ secrets.aws_secret_access_key }}
37-
export AWS_REGION=us-east-1
38-
python test_healthcheck_new_vnet.py ${{ secrets.KeyPairName }} ${{ secrets.lmpassword }} ${{ secrets.ipaddress }} ${{ secrets.SSLCertificateARN }} "us-east-1" "Ubuntu"
44+
python test_healthcheck_new_vnet.py ${{ secrets.OIDCKeyPairNameOregon }} ${{ secrets.lmpassword }} ${{ secrets.ipaddress }} ${{ secrets.OIDCSSLCertificateARNOregon }} "us-west-2" "Ubuntu"
3945

.github/workflows/healthcheck-app-newVpc-Win-Wed.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
workflow_dispatch:
77
schedule:
88
- cron: '0 15 * * 3'
9+
permissions:
10+
id-token: write
11+
contents: read
912
jobs:
1013
build:
1114
runs-on: ubuntu-latest
@@ -16,6 +19,12 @@ jobs:
1619
uses: actions/setup-python@v2
1720
with:
1821
python-version: '3.13'
22+
- name: Configure AWS credentials via OIDC
23+
uses: aws-actions/configure-aws-credentials@v4
24+
with:
25+
role-to-assume: ${{ secrets.oidc_role_arn }}
26+
aws-region: ap-northeast-1
27+
role-duration-seconds: 7200
1928
- name: Install dependencies
2029
run: |
2130
python -m pip install --upgrade pip
@@ -31,8 +40,5 @@ jobs:
3140
- name: MPS Ref Arch AWS new VPC Health Check Test ap-northeast on Windows
3241
run: |
3342
cd healthcheck
34-
export AWS_ACCESS_KEY_ID=${{ secrets.aws_access_key_id }}
35-
export AWS_SECRET_ACCESS_KEY=${{ secrets.aws_secret_access_key }}
36-
export AWS_REGION=ap-northeast-1
37-
python test_healthcheck_new_vnet.py ${{ secrets.KeyPairNameTokyo }} ${{ secrets.lmpassword }} ${{ secrets.ipaddress }} ${{ secrets.SSLCertificateARNTokyo }} "ap-northeast-1" "Windows"
43+
python test_healthcheck_new_vnet.py ${{ secrets.OIDCKeyPairNameTokyo }} ${{ secrets.lmpassword }} ${{ secrets.ipaddress }} ${{ secrets.OIDCSSLCertificateARNTokyo }} "ap-northeast-1" "Windows"
3844

healthcheck/refarch_testtools/deploy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from botocore.exceptions import WaiterError
1212

1313
_logger = logging.getLogger("deploy")
14-
14+
logging.basicConfig(level=logging.INFO)
1515

1616
def deploy_stack(template_url, template_parameters, region, stack_base_name="refArchTest", extra_parameters={}):
1717
stack_name = _create_stack_name(stack_base_name)

0 commit comments

Comments
 (0)