Skip to content

Commit

Permalink
Change CI/CD templates to use OAuth STS based token generation. (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeep-paliwal authored Jan 18, 2024
1 parent 9a3c3af commit 7099163
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions generators/add-ci/.github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
10 changes: 5 additions & 5 deletions generators/add-ci/.github/workflows/deploy_stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions generators/add-ci/.github/workflows/pr_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions test/generators/add-ci/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
})
})

0 comments on commit 7099163

Please sign in to comment.