Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

Commit 532496a

Browse files
author
Michał Sieczkowski
authored
Stop deploying commander on new release (#388)
* Set script_stop * Don't deploy anywhere on new release * Change release CI display name
1 parent 26b1537 commit 532496a

3 files changed

Lines changed: 3 additions & 45 deletions

File tree

.github/workflows/e2e-0.4.0.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
host: ${{ secrets.AWS_STAGING_HOST }}
8181
username: ec2-user
8282
key: ${{ secrets.AWS_HUBBLE_CONSUMER_BACKEND_SSH_KEY }}
83+
script_stop: true
8384
script: |
8485
cd deployment/
8586
docker-compose pull

.github/workflows/e2e.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
host: ec2-3-237-17-229.compute-1.amazonaws.com
8181
username: ec2-user
8282
key: ${{ secrets.AWS_SSH_KEY }}
83+
script_stop: true
8384
script: |
8485
docker-compose pull
8586
docker-compose up -d

.github/workflows/release.yml

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: E2E Test
1+
name: Release
22
on:
33
release:
44
types: [created]
@@ -28,47 +28,3 @@ jobs:
2828
file: ./Dockerfile
2929
push: true
3030
tags: ghcr.io/worldcoin/hubble-commander:${{ steps.tag_name.outputs.SOURCE_TAG }},ghcr.io/worldcoin/hubble-commander:stable
31-
32-
deploy-backend-api-staging:
33-
runs-on: ubuntu-20.04
34-
needs: [build]
35-
steps:
36-
- name: Configure AWS EKS credentials
37-
uses: aws-actions/configure-aws-credentials@v1
38-
with:
39-
aws-access-key-id: ${{ secrets.STAGING_BACKEND_API_AWS_ACCESS_KEY_ID }}
40-
aws-secret-access-key: ${{ secrets.STAGING_BACKEND_API_AWS_SECRET_ACCESS_KEY }}
41-
aws-region: us-east-1
42-
- name: Download kubeconfig
43-
run: |
44-
aws eks --region us-east-1 update-kubeconfig --name new-staging --kubeconfig $GITHUB_WORKSPACE/kubeconfig
45-
- name: Install kubectl
46-
run: |
47-
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
48-
chmod +x ./kubectl
49-
- name: Set tag name
50-
id: tag_name
51-
run: |
52-
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
53-
- name: Update deployment in the cluster
54-
run: |
55-
./kubectl --kubeconfig ./kubeconfig --namespace=staging set image deployments/hubble-commander primary-hubble-commander=ghcr.io/worldcoin/hubble-commander:${{ steps.tag_name.outputs.SOURCE_TAG }} secondary-hubble-commander=ghcr.io/worldcoin/hubble-commander:${{ steps.tag_name.outputs.SOURCE_TAG }}
56-
57-
deploy:
58-
name: Deploy to AWS
59-
needs: build
60-
runs-on: ubuntu-20.04
61-
strategy:
62-
matrix:
63-
host: [ec2-3-238-223-141.compute-1.amazonaws.com, ec2-3-239-149-30.compute-1.amazonaws.com]
64-
steps:
65-
- name: Deploy to AWS
66-
uses: appleboy/ssh-action@master
67-
with:
68-
host: ${{ matrix.host }}
69-
username: ec2-user
70-
key: ${{ secrets.AWS_SSH_KEY }}
71-
script: |
72-
docker-compose pull
73-
docker-compose up -d
74-
docker images -f "before=ghcr.io/worldcoin/hubble-commander:stable" -f "dangling=true" -q ghcr.io/worldcoin/hubble-commander | xargs docker image rm || true

0 commit comments

Comments
 (0)