Skip to content

Commit

Permalink
MAV-745: Give artifacts unique names (#3109)
Browse files Browse the repository at this point in the history
- Artifacts with same name cannot exist in one workflow 
  - Therefore the continuous_deployment workflow failed
  • Loading branch information
TheOneFromNorway authored Feb 28, 2025
2 parents 548996b + efaecb6 commit 3e75661
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
environment: "copilotmigration"
DeployApplication:
needs: [Build, DeployInfrastructure]
uses: ./.github/workflows/deploy_mavis.yml
uses: ./.github/workflows/deploy_application.yml
with:
environment: "copilotmigration"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: TF Deploy Mavis
run-name: TF Deploy Mavis on ${{ inputs.environment }}
name: TF Deploy Application
run-name: TF Deploy Application on ${{ inputs.environment }}

on:
workflow_dispatch:
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tfplan
name: tfplan_app
path: ${{ runner.temp }}/tfplan
DeployUpdate:
runs-on: ubuntu-latest
Expand All @@ -95,8 +95,8 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: tfplan
path: ${{ runner.temp }}/artifact
name: tfplan_app
path: ${{ runner.temp }}
- name: Install terraform
uses: hashicorp/setup-terraform@v3
with:
Expand All @@ -105,7 +105,7 @@ jobs:
working-directory: ${{ env.tf-dir }}
run: |
terraform init -backend-config="env/${{ inputs.environment }}-backend.hcl"
terraform apply ${{ runner.temp }}/artifact/tfplan
terraform apply ${{ runner.temp }}/tfplan_app
echo "s3_bucket=$(terraform output -raw s3_bucket)" >> ${{ runner.temp }}/CODEDEPLOY_ENV
echo "s3_key=$(terraform output -raw s3_key)" >> ${{ runner.temp }}/CODEDEPLOY_ENV
echo "application=$(terraform output -raw codedeploy_application_name)" >> ${{ runner.temp }}/CODEDEPLOY_ENV
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy_infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tfplan
name: tfplan_infrastructure
path: ${{ runner.temp }}/tfplan
ApplyUpdate:
runs-on: ubuntu-latest
Expand All @@ -107,7 +107,7 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: tfplan
name: tfplan_infrastructure
path: ${{ runner.temp }}
- name: Install terraform
uses: hashicorp/setup-terraform@v3
Expand All @@ -117,4 +117,4 @@ jobs:
working-directory: ${{ env.tf_dir }}
run: |
terraform init -backend-config="env/${{ inputs.environment }}-backend.hcl"
terraform apply ${{ runner.temp }}/tfplan
terraform apply ${{ runner.temp }}/tfplan_infrastructure

0 comments on commit 3e75661

Please sign in to comment.