Skip to content

Commit

Permalink
update pipeline 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Phathdt committed Dec 5, 2023
1 parent 0859b2b commit 760adf2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ env:
BRANCH_CD_REPOSITORY: master
CD_REPOSITORY: CaliberVB/argocd
ROOT_PATH_CD_REPOSITORY: argocd
VAULT_SERVER: https://vault.caliber.build

jobs:
build-prod:
runs-on: ubuntu-latest
Expand All @@ -53,11 +55,23 @@ jobs:
exit 1
fi
- name: Import Secrets
id: import-secrets
uses: hashicorp/vault-action@v2
with:
url: ${{ env.VAULT_SERVER }}
token: ${{ secrets.VAULT_TOKEN }}
tlsSkipVerify: true
secrets: |
/kv-v2/data/sre-data/github ACTION_TOKEN |ACTION_TOKEN;
/kv-v2/data/sre-data/github AWS_ACCESS_KEY_ID |AWS_ACCESS_KEY_ID;
/kv-v2/data/sre-data/github AWS_SECRET_ACCESS_KEY | AWS_SECRET_ACCESS_KEY;
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Login to Amazon ECR
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/migrator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ env:
BRANCH_CD_REPOSITORY: master
CD_REPOSITORY: CaliberVB/argocd
ROOT_PATH_CD_REPOSITORY: argocd
VAULT_SERVER: https://vault.caliber.build

jobs:
build-prod:
runs-on: ubuntu-latest
Expand All @@ -51,11 +53,22 @@ jobs:
exit 1
fi
- name: Import Secrets
id: import-secrets
uses: hashicorp/vault-action@v2
with:
url: ${{ env.VAULT_SERVER }}
token: ${{ secrets.VAULT_TOKEN }}
tlsSkipVerify: true
secrets: |
/kv-v2/data/sre-data/github ACTION_TOKEN |ACTION_TOKEN;
/kv-v2/data/sre-data/github AWS_ACCESS_KEY_ID |AWS_ACCESS_KEY_ID;
/kv-v2/data/sre-data/github AWS_SECRET_ACCESS_KEY | AWS_SECRET_ACCESS_KEY;
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Login to Amazon ECR
Expand Down

0 comments on commit 760adf2

Please sign in to comment.