Skip to content

Commit

Permalink
Add required env vars for build and deploy for extension registry
Browse files Browse the repository at this point in the history
Move Auth generation before build as build also requires token
Reference latest aio apps action 2.0.1
  • Loading branch information
sandeep-paliwal committed Aug 16, 2021
1 parent ef105c2 commit 64dff46
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 23 deletions.
24 changes: 15 additions & 9 deletions generators/add-ci/.github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,8 @@ jobs:
with:
os: ${{ matrix.os }}
version: 8.x.x
- name: Build
env:
AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_PROD }}
uses: adobe/[email protected]
with:
os: ${{ matrix.os }}
command: build
- name: Auth
uses: adobe/[email protected].0
uses: adobe/[email protected].1
with:
os: ${{ matrix.os }}
command: auth
Expand All @@ -44,11 +37,24 @@ jobs:
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/[email protected]
with:
os: ${{ matrix.os }}
command: build
- name: Deploy
env:
AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_PROD }}
AIO_RUNTIME_AUTH: ${{ secrets.AIO_RUNTIME_AUTH_PROD }}
uses: adobe/[email protected]
AIO_PROJECT_ID: ${{ secrets.AIO_PROJECT_ID_PROD }}
AIO_PROJECT_NAME: ${{ secrets.AIO_PROJECT_NAME_PROD }}
AIO_PROJECT_ORG_ID: ${{ secrets.AIO_PROJECT_ORG_ID_PROD }}
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/[email protected]
with:
os: ${{ matrix.os }}
command: deploy
24 changes: 15 additions & 9 deletions generators/add-ci/.github/workflows/deploy_stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,8 @@ jobs:
with:
os: ${{ matrix.os }}
version: 8.x.x
- name: Build
env:
AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_STAGE }}
uses: adobe/[email protected]
with:
os: ${{ matrix.os }}
command: build
- name: Auth
uses: adobe/[email protected].0
uses: adobe/[email protected].1
with:
os: ${{ matrix.os }}
command: auth
Expand All @@ -45,11 +38,24 @@ jobs:
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/[email protected]
with:
os: ${{ matrix.os }}
command: build
- name: Deploy
env:
AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_STAGE }}
AIO_RUNTIME_AUTH: ${{ secrets.AIO_RUNTIME_AUTH_STAGE }}
uses: adobe/[email protected]
AIO_PROJECT_ID: ${{ secrets.AIO_PROJECT_ID_STAGE }}
AIO_PROJECT_NAME: ${{ secrets.AIO_PROJECT_NAME_STAGE }}
AIO_PROJECT_ORG_ID: ${{ secrets.AIO_PROJECT_ORG_ID_STAGE }}
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/[email protected]
with:
os: ${{ matrix.os }}
command: deploy
15 changes: 13 additions & 2 deletions generators/add-ci/.github/workflows/pr_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,26 @@ jobs:
with:
os: ${{ matrix.os }}
version: 8.x.x
- name: Auth
uses: adobe/[email protected]
with:
os: ${{ matrix.os }}
command: auth
CLIENTID: ${{ secrets.CLIENTID_STAGE }}
CLIENTSECRET: ${{ secrets.CLIENTSECRET_STAGE }}
TECHNICALACCOUNTID: ${{ secrets.TECHNICALACCID_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/[email protected].0
uses: adobe/[email protected].1
with:
os: ${{ matrix.os }}
command: build
- name: Test
uses: adobe/[email protected].0
uses: adobe/[email protected].1
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 @@ -47,12 +47,12 @@ describe('run', () => {
// added files
assert.file('.github/workflows/pr_test.yml')
assert.fileContent('.github/workflows/pr_test.yml', 'version: 8.x.x')
assert.fileContent('.github/workflows/pr_test.yml', 'adobe/[email protected].0')
assert.fileContent('.github/workflows/pr_test.yml', 'adobe/[email protected].1')
assert.file('.github/workflows/deploy_prod.yml')
assert.fileContent('.github/workflows/deploy_prod.yml', 'version: 8.x.x')
assert.fileContent('.github/workflows/deploy_prod.yml', 'adobe/[email protected].0')
assert.fileContent('.github/workflows/deploy_prod.yml', 'adobe/[email protected].1')
assert.file('.github/workflows/deploy_stage.yml')
assert.fileContent('.github/workflows/deploy_stage.yml', 'version: 8.x.x')
assert.fileContent('.github/workflows/deploy_stage.yml', 'adobe/[email protected].0')
assert.fileContent('.github/workflows/deploy_stage.yml', 'adobe/[email protected].1')
})
})

0 comments on commit 64dff46

Please sign in to comment.