Skip to content

Commit

Permalink
Update CD to be push based (#73)
Browse files Browse the repository at this point in the history
### What was the problem?

This PR resolves #LISK-1130

### How was it solved?

- [x] Remove unneeded script files
- [x] Update `docker.yaml` -> `deployment.yaml` to use AWS CodeDeploy to
deploy Docker image to EC2 instance

### How was it tested?

Using development EC2 instance.
  • Loading branch information
sameersubudhi authored Sep 27, 2024
2 parents 0beda08 + 3b95715 commit d59b880
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 259 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build docker image
name: Deployment

on:
push:
Expand Down Expand Up @@ -38,6 +38,12 @@ jobs:
context: ./
file: ./Dockerfile
push: true
tags: |
${{ steps.docker-image.outputs.image }}:latest
${{ steps.docker-image.outputs.image }}:${{ github.sha }}
tags: ${{ steps.docker-image.outputs.image }}:${{ github.sha }}

- name: Deploy to CodeDeploy
run: |
aws deploy create-deployment \
--application-name ${{ secrets.AWS_CODEDEPLOY_APPLICATION_NAME }} \
--deployment-group-name ${{ secrets.AWS_CODEDEPLOY_DEPLOYMENT_GROUP }} \
--github-location repository=${{ github.repository }},commitId=${{ github.sha }} \
--description "Deploying Across Relayer Docker image to EC2 instance"
2 changes: 0 additions & 2 deletions scripts/lisk/docker/composeStop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ set -eu

. $(dirname "$0")/setEnvVariables.sh

# Wait for the CI to build and push the Docker image to ECR
sleep 300
docker compose down --rmi all
15 changes: 0 additions & 15 deletions scripts/lisk/installApplication.sh

This file was deleted.

47 changes: 0 additions & 47 deletions scripts/lisk/installDependencies.sh

This file was deleted.

73 changes: 0 additions & 73 deletions scripts/lisk/runMainnet.sh

This file was deleted.

62 changes: 0 additions & 62 deletions scripts/lisk/runSepolia.sh

This file was deleted.

56 changes: 0 additions & 56 deletions scripts/lisk/runSepoliaSimulationMode.sh

This file was deleted.

0 comments on commit d59b880

Please sign in to comment.