From 70991631d3898521543581ab9177a573bb2526c5 Mon Sep 17 00:00:00 2001 From: sandeep-paliwal Date: Thu, 18 Jan 2024 14:25:20 +0530 Subject: [PATCH] Change CI/CD templates to use OAuth STS based token generation. (#243) --- generators/add-ci/.github/workflows/deploy_prod.yml | 10 +++++----- generators/add-ci/.github/workflows/deploy_stage.yml | 10 +++++----- generators/add-ci/.github/workflows/pr_test.yml | 10 +++++----- test/generators/add-ci/index.test.js | 6 +++--- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/generators/add-ci/.github/workflows/deploy_prod.yml b/generators/add-ci/.github/workflows/deploy_prod.yml index aadd386..943c6d7 100644 --- a/generators/add-ci/.github/workflows/deploy_prod.yml +++ b/generators/add-ci/.github/workflows/deploy_prod.yml @@ -27,20 +27,20 @@ jobs: os: ${{ matrix.os }} version: 9.x.x - name: Auth - uses: adobe/aio-apps-action@2.0.2 + uses: adobe/aio-apps-action@3.0.0 with: os: ${{ matrix.os }} - command: auth + command: oauth_sts CLIENTID: ${{ secrets.CLIENTID_PROD }} CLIENTSECRET: ${{ secrets.CLIENTSECRET_PROD }} TECHNICALACCOUNTID: ${{ secrets.TECHNICALACCID_PROD }} + TECHNICALACCOUNTEMAIL: ${{ secrets.TECHNICALACCEMAIL_PROD }} IMSORGID: ${{ secrets.IMSORGID_PROD }} SCOPES: ${{ secrets.SCOPES_PROD }} - KEY: ${{ secrets.KEY_PROD }} - name: Build env: AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_PROD }} - uses: adobe/aio-apps-action@2.0.2 + uses: adobe/aio-apps-action@3.0.0 with: os: ${{ matrix.os }} command: build @@ -54,7 +54,7 @@ jobs: AIO_PROJECT_WORKSPACE_ID: ${{ secrets.AIO_PROJECT_WORKSPACE_ID_PROD }} AIO_PROJECT_WORKSPACE_NAME: ${{ secrets.AIO_PROJECT_WORKSPACE_NAME_PROD }} AIO_PROJECT_WORKSPACE_DETAILS_SERVICES: ${{ secrets.AIO_PROJECT_WORKSPACE_DETAILS_SERVICES_PROD }} - uses: adobe/aio-apps-action@2.0.2 + uses: adobe/aio-apps-action@3.0.0 with: os: ${{ matrix.os }} command: deploy diff --git a/generators/add-ci/.github/workflows/deploy_stage.yml b/generators/add-ci/.github/workflows/deploy_stage.yml index b5cd722..b798073 100644 --- a/generators/add-ci/.github/workflows/deploy_stage.yml +++ b/generators/add-ci/.github/workflows/deploy_stage.yml @@ -28,20 +28,20 @@ jobs: os: ${{ matrix.os }} version: 9.x.x - name: Auth - uses: adobe/aio-apps-action@2.0.2 + uses: adobe/aio-apps-action@3.0.0 with: os: ${{ matrix.os }} - command: auth + command: oauth_sts CLIENTID: ${{ secrets.CLIENTID_STAGE }} CLIENTSECRET: ${{ secrets.CLIENTSECRET_STAGE }} TECHNICALACCOUNTID: ${{ secrets.TECHNICALACCID_STAGE }} + TECHNICALACCOUNTEMAIL: ${{ secrets.TECHNICALACCEMAIL_STAGE }} IMSORGID: ${{ secrets.IMSORGID_STAGE }} SCOPES: ${{ secrets.SCOPES_STAGE }} - KEY: ${{ secrets.KEY_STAGE }} - name: Build env: AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_STAGE }} - uses: adobe/aio-apps-action@2.0.2 + uses: adobe/aio-apps-action@3.0.0 with: os: ${{ matrix.os }} command: build @@ -55,7 +55,7 @@ jobs: AIO_PROJECT_WORKSPACE_ID: ${{ secrets.AIO_PROJECT_WORKSPACE_ID_STAGE }} AIO_PROJECT_WORKSPACE_NAME: ${{ secrets.AIO_PROJECT_WORKSPACE_NAME_STAGE }} AIO_PROJECT_WORKSPACE_DETAILS_SERVICES: ${{ secrets.AIO_PROJECT_WORKSPACE_DETAILS_SERVICES_STAGE }} - uses: adobe/aio-apps-action@2.0.2 + uses: adobe/aio-apps-action@3.0.0 with: os: ${{ matrix.os }} command: deploy diff --git a/generators/add-ci/.github/workflows/pr_test.yml b/generators/add-ci/.github/workflows/pr_test.yml index 9d8cb33..9fc25c1 100644 --- a/generators/add-ci/.github/workflows/pr_test.yml +++ b/generators/add-ci/.github/workflows/pr_test.yml @@ -24,25 +24,25 @@ jobs: os: ${{ matrix.os }} version: 9.x.x - name: Auth - uses: adobe/aio-apps-action@2.0.2 + uses: adobe/aio-apps-action@3.0.0 with: os: ${{ matrix.os }} - command: auth + command: oauth_sts CLIENTID: ${{ secrets.CLIENTID_STAGE }} CLIENTSECRET: ${{ secrets.CLIENTSECRET_STAGE }} TECHNICALACCOUNTID: ${{ secrets.TECHNICALACCID_STAGE }} + TECHNICALACCOUNTEMAIL: ${{ secrets.TECHNICALACCEMAIL_STAGE }} IMSORGID: ${{ secrets.IMSORGID_STAGE }} SCOPES: ${{ secrets.SCOPES_STAGE }} - KEY: ${{ secrets.KEY_STAGE }} - name: Build env: AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_STAGE }} - uses: adobe/aio-apps-action@2.0.2 + uses: adobe/aio-apps-action@3.0.0 with: os: ${{ matrix.os }} command: build - name: Test - uses: adobe/aio-apps-action@2.0.2 + uses: adobe/aio-apps-action@3.0.0 with: os: ${{ matrix.os }} command: test diff --git a/test/generators/add-ci/index.test.js b/test/generators/add-ci/index.test.js index 6db7e3b..fb86191 100644 --- a/test/generators/add-ci/index.test.js +++ b/test/generators/add-ci/index.test.js @@ -35,12 +35,12 @@ describe('run', () => { // added files assert.file('.github/workflows/pr_test.yml') assert.fileContent('.github/workflows/pr_test.yml', 'version: 9.x.x') - assert.fileContent('.github/workflows/pr_test.yml', 'adobe/aio-apps-action@2.0.2') + assert.fileContent('.github/workflows/pr_test.yml', 'adobe/aio-apps-action@3.0.0') assert.file('.github/workflows/deploy_prod.yml') assert.fileContent('.github/workflows/deploy_prod.yml', 'version: 9.x.x') - assert.fileContent('.github/workflows/deploy_prod.yml', 'adobe/aio-apps-action@2.0.2') + assert.fileContent('.github/workflows/deploy_prod.yml', 'adobe/aio-apps-action@3.0.0') assert.file('.github/workflows/deploy_stage.yml') assert.fileContent('.github/workflows/deploy_stage.yml', 'version: 9.x.x') - assert.fileContent('.github/workflows/deploy_stage.yml', 'adobe/aio-apps-action@2.0.2') + assert.fileContent('.github/workflows/deploy_stage.yml', 'adobe/aio-apps-action@3.0.0') }) })