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

Commit

Permalink
Stop deploying commander on new release (#388)
Browse files Browse the repository at this point in the history
* Set script_stop

* Don't deploy anywhere on new release

* Change release CI display name
  • Loading branch information
Michał Sieczkowski authored Oct 13, 2021
1 parent 26b1537 commit 532496a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 45 deletions.
1 change: 1 addition & 0 deletions .github/workflows/e2e-0.4.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
host: ${{ secrets.AWS_STAGING_HOST }}
username: ec2-user
key: ${{ secrets.AWS_HUBBLE_CONSUMER_BACKEND_SSH_KEY }}
script_stop: true
script: |
cd deployment/
docker-compose pull
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
host: ec2-3-237-17-229.compute-1.amazonaws.com
username: ec2-user
key: ${{ secrets.AWS_SSH_KEY }}
script_stop: true
script: |
docker-compose pull
docker-compose up -d
Expand Down
46 changes: 1 addition & 45 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E Test
name: Release
on:
release:
types: [created]
Expand Down Expand Up @@ -28,47 +28,3 @@ jobs:
file: ./Dockerfile
push: true
tags: ghcr.io/worldcoin/hubble-commander:${{ steps.tag_name.outputs.SOURCE_TAG }},ghcr.io/worldcoin/hubble-commander:stable

deploy-backend-api-staging:
runs-on: ubuntu-20.04
needs: [build]
steps:
- name: Configure AWS EKS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.STAGING_BACKEND_API_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.STAGING_BACKEND_API_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Download kubeconfig
run: |
aws eks --region us-east-1 update-kubeconfig --name new-staging --kubeconfig $GITHUB_WORKSPACE/kubeconfig
- name: Install kubectl
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
chmod +x ./kubectl
- name: Set tag name
id: tag_name
run: |
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Update deployment in the cluster
run: |
./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 }}
deploy:
name: Deploy to AWS
needs: build
runs-on: ubuntu-20.04
strategy:
matrix:
host: [ec2-3-238-223-141.compute-1.amazonaws.com, ec2-3-239-149-30.compute-1.amazonaws.com]
steps:
- name: Deploy to AWS
uses: appleboy/ssh-action@master
with:
host: ${{ matrix.host }}
username: ec2-user
key: ${{ secrets.AWS_SSH_KEY }}
script: |
docker-compose pull
docker-compose up -d
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 comments on commit 532496a

Please sign in to comment.