From b3df5b114be80ddbab2abb77e0c37ba6b8ee38df Mon Sep 17 00:00:00 2001 From: rrigato Date: Sun, 7 Apr 2024 08:17:48 -0500 Subject: [PATCH 1/4] setup pipeline stub --- .github/workflows/tvratings_pipeline.yml | 14 ++++++++++++++ scripts/tvratings_build_test.sh | 1 + 2 files changed, 15 insertions(+) create mode 100644 scripts/tvratings_build_test.sh diff --git a/.github/workflows/tvratings_pipeline.yml b/.github/workflows/tvratings_pipeline.yml index 26e54e8..6317ba2 100644 --- a/.github/workflows/tvratings_pipeline.yml +++ b/.github/workflows/tvratings_pipeline.yml @@ -28,3 +28,17 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.11 + + - name: make-scripts-executable + run: | + chmod +x 'scripts/tvratings_build_test.sh' + + + + - name: test-and-build-deployment-archive + shell: bash + env: + AWS_ACCOUNT_ID: ${{secrets.AWS_ACCOUNT_ID}} + PROJECT_NAME: ${{vars.PROJECT_NAME}} + REGION_NAME: ${{vars.REGION_NAME}} + run: 'scripts/tvratings_build_test.sh' diff --git a/scripts/tvratings_build_test.sh b/scripts/tvratings_build_test.sh new file mode 100644 index 0000000..bacf9ae --- /dev/null +++ b/scripts/tvratings_build_test.sh @@ -0,0 +1 @@ +echo "to do" \ No newline at end of file From 9e8602d4ccb84781b2c7e4db8da415acbd70c322 Mon Sep 17 00:00:00 2001 From: rrigato Date: Sun, 7 Apr 2024 10:31:56 -0500 Subject: [PATCH 2/4] setup pipeline stub --- .github/workflows/tvratings_pipeline.yml | 9 ++++++--- scripts/tvratings_build_test.sh | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tvratings_pipeline.yml b/.github/workflows/tvratings_pipeline.yml index 6317ba2..f576267 100644 --- a/.github/workflows/tvratings_pipeline.yml +++ b/.github/workflows/tvratings_pipeline.yml @@ -1,4 +1,8 @@ name: application pipeline + +env: + AWS_ACCOUNT_ID: ${{secrets.AWS_ACCOUNT_ID}} + on: push: branches: @@ -33,12 +37,11 @@ jobs: run: | chmod +x 'scripts/tvratings_build_test.sh' - + - name: test-and-build-deployment-archive shell: bash env: AWS_ACCOUNT_ID: ${{secrets.AWS_ACCOUNT_ID}} - PROJECT_NAME: ${{vars.PROJECT_NAME}} - REGION_NAME: ${{vars.REGION_NAME}} + run: 'scripts/tvratings_build_test.sh' diff --git a/scripts/tvratings_build_test.sh b/scripts/tvratings_build_test.sh index bacf9ae..43a164b 100644 --- a/scripts/tvratings_build_test.sh +++ b/scripts/tvratings_build_test.sh @@ -1 +1,2 @@ -echo "to do" \ No newline at end of file +echo "to do" +echo $AWS_ACCOUNT_ID \ No newline at end of file From 5a2a1247246f8c04751d8e5920a0bed5270234a2 Mon Sep 17 00:00:00 2001 From: rrigato Date: Sun, 7 Apr 2024 10:36:56 -0500 Subject: [PATCH 3/4] remove env block --- .github/workflows/tvratings_pipeline.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/tvratings_pipeline.yml b/.github/workflows/tvratings_pipeline.yml index f576267..20d6777 100644 --- a/.github/workflows/tvratings_pipeline.yml +++ b/.github/workflows/tvratings_pipeline.yml @@ -1,7 +1,5 @@ name: application pipeline -env: - AWS_ACCOUNT_ID: ${{secrets.AWS_ACCOUNT_ID}} on: push: @@ -43,5 +41,4 @@ jobs: shell: bash env: AWS_ACCOUNT_ID: ${{secrets.AWS_ACCOUNT_ID}} - run: 'scripts/tvratings_build_test.sh' From 8244d0f9b3320679affff09575ab9a0ec8a7d85f Mon Sep 17 00:00:00 2001 From: rrigato Date: Sun, 7 Apr 2024 10:45:58 -0500 Subject: [PATCH 4/4] attempt to assume role --- .github/workflows/tvratings_pipeline.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/tvratings_pipeline.yml b/.github/workflows/tvratings_pipeline.yml index 20d6777..0782734 100644 --- a/.github/workflows/tvratings_pipeline.yml +++ b/.github/workflows/tvratings_pipeline.yml @@ -35,6 +35,12 @@ jobs: run: | chmod +x 'scripts/tvratings_build_test.sh' + - name: assume-github-actions-role + uses: aws-actions/configure-aws-credentials@v4 + with: + audience: sts.amazonaws.com + aws-region: ${{vars.DEFAULT_AWS_REGION}} + role-to-assume: arn:aws:iam::${{secrets.AWS_ACCOUNT_ID}}:role/${{secrets.PIPELINE_ROLE_NAME}} - name: test-and-build-deployment-archive