Skip to content

Commit 8e66d96

Browse files
authored
Update build-deploy-devnet-auth-provider.yaml
1 parent 166dc49 commit 8e66d96

File tree

1 file changed

+13
-32
lines changed

1 file changed

+13
-32
lines changed
Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,48 @@
1-
name: Deploy to dev(auth provider)
1+
name: Build-Deploy-devnet(auth-provider)
22
on:
33
push:
44
branches: [feature/vaccount_auth_provider]
55

6-
7-
6+
env:
7+
APP_NAME: velas-synapse-auth-provider
8+
APP_REPO: velas-synapse
9+
810
jobs:
911
docker-build:
10-
# Name the Job
1112
name: Build and push
12-
runs-on: build
13+
runs-on: devnet-services
1314
outputs:
1415
repository: ${{ steps.build.outputs.repository }}
1516
image_tag: ${{ steps.build.outputs.image_tag }}
1617
steps:
1718
- uses: actions/checkout@v2
18-
- name: Login to Docker Hub
19-
uses: docker/login-action@v2
20-
with:
21-
username: ${{ secrets.REGISTRY_USER }}
22-
password: ${{ secrets.REGISTRY_PASS }}
23-
registry: ${{ secrets.REGISTRY_HOST }}
24-
- name: Build, tag, and push image to AWS ECR
19+
- name: Build, tag, and push image
2520
id: build
2621
env:
27-
REGISTRY: ${{ secrets.REGISTRY_HOST}}/velas
28-
REPOSITORY: velas-synapse
22+
REGISTRY: ${{ secrets.REGISTRY_HOST }}/velas
23+
REPOSITORY: ${{ env.APP_REPO }}
2924
IMAGE_TAG: ${{github.sha}}
3025
run: |
3126
docker build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG --no-cache -f docker/Dockerfile .
3227
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG
3328
deploy:
3429
name: Deploy via Helmfile
35-
runs-on: deployer
30+
runs-on: devnet-services
3631
needs: docker-build
37-
container:
38-
image: quay.io/roboll/helmfile:v0.142.0
3932
steps:
40-
- name: Install ssh
41-
run: apk --update add openssh-client
4233
- name: Check out velas-infra
4334
uses: actions/checkout@master
4435
with:
4536
repository: velas/velas-infra
4637
ref: master
4738
ssh-key: ${{ secrets.SSH_KEY_INFRA }}
48-
- uses: azure/k8s-set-context@v2
49-
with:
50-
method: kubeconfig
51-
kubeconfig: ${{ secrets.KUBE_CONFIG_DATA_EU_MONSTER1_RAW }}
52-
context: "prod-eu-monster1"
53-
- name: Sops Binary Installer
54-
uses: mdgreenwald/[email protected]
55-
- uses: adnsio/[email protected]
5639
- name: Deploy via helmfile
5740
id: deploy
5841
env:
5942
REGISTRY: ${{ secrets.REGISTRY_HOST }}/velas
60-
REPOSITORY: velas-synapse
43+
REPOSITORY: ${{ env.APP_REPO }}
6144
IMAGE_TAG: ${{github.sha}}
6245
SOPS_AGE_KEY: ${{ secrets.INFRA_AGE }}
6346
run: |
64-
helm plugin install https://github.com/jkroepke/helm-secrets --version v3.11.0 || true
65-
helm plugin install https://github.com/databus23/helm-diff || true
66-
cd deploy/prod-eu-monster1
67-
helmfile -l namespace=devnet,name=velas-synapse-auth-provider apply --set image.tag=$IMAGE_TAG,image.repository=$REGISTRY/$REPOSITORY --skip-deps
47+
cd deploy
48+
helmfile -e ${HELM_ENV} -l namespace=${NAMESPACE},name=${{ env.APP_NAME }} apply --set image.tag=$IMAGE_TAG,image.repository=$REGISTRY/$REPOSITORY --skip-deps

0 commit comments

Comments
 (0)