Skip to content

Commit

Permalink
dc/rest-push cicd for production
Browse files Browse the repository at this point in the history
  • Loading branch information
clezag committed Jul 16, 2024
1 parent ebd4fdd commit 391e490
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/dc-rest-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,49 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_DEV_ACCESS_KEY_SECRET }}
aws-eks-cluster-name: aws-main-eu-01
aws-region: eu-west-1

deploy-prod:
if: github.ref == 'refs/heads/main'
needs:
- test
- build
runs-on: ubuntu-22.04
concurrency: dc-rest-push-deploy-prod
environment: prod
env:
VALUES_YAML: collectors/rest-push/infrastructure/helm/values.yaml
K8S_NAME: dc-rest-push
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Write environment-specific Helm values
run: |
cat <<EOF > override.yml
image:
repository: ${{ env.DOCKER_IMAGE }}
tag: ${{ env.DOCKER_TAG }}
pullPolicy: "IfNotPresent"
env:
APP_LOGLEVEL: "INFO"
APP_SWAGGERURL: "https://swagger.opendatahub.com/?url=https://push.api.opendatahub.com/apispec"
APP_AUTHURL: "https://auth.opendatahub.com/auth"
APP_AUTHREALM: "noi"
APP_AUTHCLIENTID: "opendatahub-push"
APP_RABBITCLIENTNAME: "dc-rest-push"
EOF
# Merge yaml files https://mikefarah.gitbook.io/yq/operators/multiply-merge
yq -i '. *= load("override.yml")' ${{env.VALUES_YAML}}
- name: Deploy on cluster
uses: noi-techpark/github-actions/helm-deploy@v2
with:
k8s-name: ${{ env.K8S_NAME }}
k8s-namespace: collector
chart-path: ${{ env.WORKING_DIRECTORY}}/infrastructure/helm/rest-push
values-file: ${{ env.VALUES_YAML }}
aws-access-key-id: ${{ secrets.AWS_DEV_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_DEV_ACCESS_KEY_SECRET }}
aws-eks-cluster-name: aws-main-eu-01
aws-region: eu-west-1

0 comments on commit 391e490

Please sign in to comment.