Skip to content

Commit 20a9f75

Browse files
committed
NRL-1595 Hardcode env choice and branch name for now
1 parent 1a2e259 commit 20a9f75

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

.github/workflows/deploy-account-wide-infra.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Deploy Account-wide infrastructure
2-
run-name: Account-wide infra deployment to ${{ inputs.environment }} of ${{ inputs.branch_name }} by ${{ github.actor }}
2+
run-name: Account-wide infra deployment to ${{ 'account-dev' }} of ${{ github.ref_name }} by ${{ github.actor }}
33

44
# An action environment would need
55
# name=acc-test
@@ -15,16 +15,16 @@ run-name: Account-wide infra deployment to ${{ inputs.environment }} of ${{ inpu
1515
# Looping through envs to pull certs
1616

1717
on:
18-
workflow_dispatch:
19-
inputs:
20-
environment:
21-
description: "Environment to deploy to"
22-
required: true
23-
default: "account-dev"
24-
type: environment
25-
branch_name:
26-
description: Branch to deploy
27-
required: true
18+
# workflow_dispatch:
19+
# inputs:
20+
# environment:
21+
# description: "Environment to deploy to"
22+
# required: true
23+
# default: "account-dev"
24+
# type: environment
25+
# branch_name:
26+
# description: Branch to deploy
27+
# required: true
2828
push:
2929
branches:
3030
- NRL-1595**
@@ -41,7 +41,7 @@ jobs:
4141
steps:
4242
- name: Validate environment
4343
env:
44-
IS_VALID_ENV: ${{ startsWith(inputs.environment, 'account-') }}
44+
IS_VALID_ENV: ${{ startsWith('account-dev', 'account-') }}
4545
run: |
4646
echo $IS_VALID_ENV
4747
if [$IS_VALID_ENV == true]; then
@@ -50,16 +50,16 @@ jobs:
5050
exit 1
5151
5252
terraform-plan:
53-
name: Terraform Plan - ${{ inputs.environment }}
54-
environment: ${{ inputs.environment }}
53+
name: Terraform Plan - ${{ 'account-dev' }}
54+
environment: ${{ 'account-dev' }}
5555
needs: [check-selected-environment]
5656
runs-on: codebuild-nhsd-nrlf-ci-build-project-${{ github.run_id }}-${{ github.run_attempt }}
5757

5858
steps:
59-
- name: Git clone - ${{ inputs.branch_name }}
59+
- name: Git clone - ${{ github.ref_name }}
6060
uses: actions/checkout@v4
6161
with:
62-
ref: ${{ inputs.branch_name }}
62+
ref: ${{ github.ref_name }}
6363

6464
- name: Setup environment
6565
run: |
@@ -71,7 +71,7 @@ jobs:
7171
with:
7272
aws-region: eu-west-2
7373
role-to-assume: ${{ secrets.MGMT_ROLE_ARN }}
74-
role-session-name: github-actions-ci-${{ inputs.environment }}-${{ github.run_id }}
74+
role-session-name: github-actions-ci-${{ 'account-dev' }}-${{ github.run_id }}
7575

7676
- name: Retrieve Server Certificates
7777
env:
@@ -106,16 +106,16 @@ jobs:
106106
aws s3 cp terraform/account-wide-infrastructure/tfplan.txt s3://nhsd-nrlf--mgmt--github-ci-logging/acc-$ACCOUNT_NAME/${{ github.run_id }}/tfplan.txt
107107
108108
terraform-apply:
109-
name: Terraform Apply - ${{ inputs.environment }}
109+
name: Terraform Apply - ${{ 'account-dev' }}
110110
needs: [terraform-plan]
111111
runs-on: codebuild-nhsd-nrlf-ci-build-project-${{ github.run_id }}-${{ github.run_attempt }}
112-
environment: ${{ inputs.environment }}
112+
environment: ${{ 'account-dev' }}
113113

114114
steps:
115-
- name: Git clone - ${{ inputs.branch_name }}
115+
- name: Git clone - ${{ github.ref_name }}
116116
uses: actions/checkout@v4
117117
with:
118-
ref: ${{ inputs.branch_name }}
118+
ref: ${{ github.ref_name }}
119119

120120
- name: Setup environment
121121
run: |
@@ -127,7 +127,7 @@ jobs:
127127
with:
128128
aws-region: eu-west-2
129129
role-to-assume: ${{ secrets.MGMT_ROLE_ARN }}
130-
role-session-name: github-actions-ci-${{ inputs.environment }}-${{ github.run_id}}
130+
role-session-name: github-actions-ci-${{ 'account-dev' }}-${{ github.run_id}}
131131

132132
- name: Download Terraform Plan artifact
133133
env:
@@ -160,7 +160,7 @@ jobs:
160160
# # Is this where we'd burn commit & datetime into state?
161161
# - name: Update environment config version
162162
# env:
163-
# ENVIRONMENT: ${{ inputs.environment }}
163+
# ENVIRONMENT: ${{ 'account-dev' }}
164164
# run: |
165165
# deployed_version=$(terraform -chdir=terraform/account-wide-infrastructure/${ACCOUNT_NAME} output --raw version)
166166
# poetry run python ./scripts/set_env_config.py inactive-version ${deployed_version} $ENVIRONMENT

0 commit comments

Comments
 (0)