Skip to content

Commit

Permalink
Merge pull request #6 from aodn/devops_cicd_no_deploy
Browse files Browse the repository at this point in the history
remove deployment from app repo
  • Loading branch information
digorgonzola authored Dec 29, 2023
2 parents 90bad3a + 4139231 commit c3e19e8
Show file tree
Hide file tree
Showing 24 changed files with 1 addition and 838 deletions.
62 changes: 1 addition & 61 deletions .github/workflows/deploy-development.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build, Test and Deploy Development
name: Build, Test and Push - Development

on:
workflow_dispatch:
Expand Down Expand Up @@ -85,63 +85,3 @@ jobs:
# platforms: linux/amd64,linux/arm64
push: true
tags: ${{ vars.ECR_REGISTRY }}/${{ vars.ECR_REPOSITORY }}:${{ steps.set_image_tag.outputs.image_tag }}

development_deploy:
runs-on: ubuntu-latest
environment: tf-development
env:
tf_version: '1.5.7'
tg_version: '0.54.0'
tg_dir: './deploy/tg'
needs: [build_test_push]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
audience: sts.amazonaws.com
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}

- name: Push container environment file to S3
run: aws s3 sync . $bucket_path --exclude "*" --include "$include.env"
working-directory: ./deploy/container
env:
bucket_path: ${{ vars.CONFIG_BUCKET_PATH }}
include: ${{ vars.ENVIRONMENT }}

- name: Expose github variables to shell as environment variables
env:
VARS_CONTEXT: ${{ toJson(vars) }}
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
to_envs() { jq -r "to_entries[] | \"\(.key)<<$EOF\n\(.value)\n$EOF\n\""; }
echo "$VARS_CONTEXT" | to_envs >> $GITHUB_ENV
- name: Terragrunt Plan
uses: gruntwork-io/terragrunt-action@v2
with:
tf_version: ${{ env.tf_version }}
tg_version: ${{ env.tg_version }}
tg_dir: ${{ env.tg_dir }}
tg_command: 'run-all plan -out=tf.plan'
env:
TF_INPUT: 0
TF_IN_AUTOMATION: true
# get the image digest from the build job with optional override from vars context
TF_VAR_image: ${{ needs.build_test_push.outputs.image_digest }}

- name: Terragrunt Apply
uses: gruntwork-io/terragrunt-action@v2
with:
tf_version: ${{ env.tf_version }}
tg_version: ${{ env.tg_version }}
tg_dir: ${{ env.tg_dir }}
tg_command: '--terragrunt-non-interactive --terragrunt-log-level info run-all apply -auto-approve tf.plan'
env:
TF_INPUT: 0
TF_IN_AUTOMATION: true
# get the image digest from the build job with optional override from vars context
TF_VAR_image: ${{ needs.build_test_push.outputs.image_digest }}
26 changes: 0 additions & 26 deletions deploy/Dockerfile

This file was deleted.

60 changes: 0 additions & 60 deletions deploy/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions deploy/container/default.env

This file was deleted.

11 changes: 0 additions & 11 deletions deploy/container/development.env

This file was deleted.

8 changes: 0 additions & 8 deletions deploy/container/production.env

This file was deleted.

8 changes: 0 additions & 8 deletions deploy/container/staging.env

This file was deleted.

18 changes: 0 additions & 18 deletions deploy/docker-compose.yml

This file was deleted.

4 changes: 0 additions & 4 deletions deploy/github/development.env

This file was deleted.

4 changes: 0 additions & 4 deletions deploy/github/production.env

This file was deleted.

4 changes: 0 additions & 4 deletions deploy/github/staging.env

This file was deleted.

44 changes: 0 additions & 44 deletions deploy/tf/alb.tf

This file was deleted.

26 changes: 0 additions & 26 deletions deploy/tf/cluster.tf

This file was deleted.

62 changes: 0 additions & 62 deletions deploy/tf/get-parameters.tf

This file was deleted.

Empty file removed deploy/tf/main.tf
Empty file.
7 changes: 0 additions & 7 deletions deploy/tf/outputs.tf

This file was deleted.

Loading

0 comments on commit c3e19e8

Please sign in to comment.