Skip to content

Commit 1611de8

Browse files
committed
Added dependency on the apim repo. Fixed parameters passed between pipelines
1 parent d95c51b commit 1611de8

File tree

2 files changed

+43
-37
lines changed

2 files changed

+43
-37
lines changed
Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
11
trigger: none
22
pr: none
33

4+
resources:
5+
repositories:
6+
- repository: common
7+
type: github
8+
name: NHSDigital/api-management-utils
9+
ref: refs/heads/edge
10+
endpoint: NHSDigital
11+
412
stages:
513
- stage: GreenDeploy
614
displayName: "Deploy to Green"
715
jobs:
816
- template: templates/deploy-int-job.yml
917
parameters:
10-
environmentName: green-env
11-
- stage: BlueDeploy
12-
displayName: "Deploy to Blue"
13-
dependsOn: GreenDeploy
14-
jobs:
15-
- template: templates/deploy-int-job.yml
16-
parameters:
17-
environmentName: blue-env
18+
tf_environment: green
19+
tf_dir: "terraform_old"
20+
# - stage: BlueDeploy
21+
# displayName: "Deploy to Blue"
22+
# dependsOn: GreenDeploy
23+
# jobs:
24+
# - template: templates/deploy-int-job.yml
25+
# parameters:
26+
# tf_environment: blue
27+
# tf_dir: "terraform_old"
1828

1929

azure/new_pipelines/deploy-int-job.yml

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,30 @@
11
parameters:
2-
- name: aws_dev
3-
default: aws --profile=apim-dev
42
- name: is_ptl
53
default: true
6-
- name: 'aws_account_type'
7-
type: string
84
- name: tf_dir
95
type: string
10-
default: "terraform"
6+
default: "terraform_old"
117
- name: tf_environment
128
type: string
139
default: "green"
1410

1511
steps:
16-
- ${{ if parameters.is_ptl }}:
17-
- template: "azure/components/aws-assume-role.yml@common"
18-
parameters:
19-
role: "auto-ops"
20-
profile: "apm_ptl"
21-
22-
- template: "azure/components/get-aws-secrets-and-ssm-params.yml@common"
23-
parameters:
24-
secret_file_ids:
25-
- ptl/app-credentials/jwt_testing/non-prod/JWT_TESTING_PRIVATE_KEY
26-
secret_ids:
27-
- ptl/app-credentials/immunisation-fhir-api-testing-app/non-prod/INTROSPECTION_CLIENT_ID
28-
- ptl/app-credentials/immunisation-fhir-api-testing-app/non-prod/INTROSPECTION_CLIENT_SECRET
29-
- ptl/app-credentials/immunisation-fhir-api-testing-app/non-prod/INTROSPECTION_CLIENT_ID_INT
30-
- ptl/app-credentials/immunisation-fhir-api-testing-app/non-prod/INTROSPECTION_CLIENT_SECRET_INT
31-
- ptl/app-credentials/immunisation-fhir-api-testing-app/non-prod/INT_CLIENT_ID
32-
- ptl/app-credentials/immunisation-fhir-api-testing-app/non-prod/INT_CLIENT_SECRET
12+
- template: "azure/components/aws-assume-role.yml@common"
13+
parameters:
14+
role: "auto-ops"
15+
profile: "apm_ptl"
16+
17+
- template: "azure/components/get-aws-secrets-and-ssm-params.yml@common"
18+
parameters:
19+
secret_file_ids:
20+
- ptl/app-credentials/jwt_testing/non-prod/JWT_TESTING_PRIVATE_KEY
21+
secret_ids:
22+
- ptl/app-credentials/immunisation-fhir-api-testing-app/non-prod/INTROSPECTION_CLIENT_ID
23+
- ptl/app-credentials/immunisation-fhir-api-testing-app/non-prod/INTROSPECTION_CLIENT_SECRET
24+
- ptl/app-credentials/immunisation-fhir-api-testing-app/non-prod/INTROSPECTION_CLIENT_ID_INT
25+
- ptl/app-credentials/immunisation-fhir-api-testing-app/non-prod/INTROSPECTION_CLIENT_SECRET_INT
26+
- ptl/app-credentials/immunisation-fhir-api-testing-app/non-prod/INT_CLIENT_ID
27+
- ptl/app-credentials/immunisation-fhir-api-testing-app/non-prod/INT_CLIENT_SECRET
3328

3429
- bash: |
3530
make install-python
@@ -50,13 +45,14 @@ steps:
5045
aws_account_no="$(aws sts get-caller-identity --query Account --output text)"
5146
5247
service_name=$(FULLY_QUALIFIED_SERVICE_NAME)
53-
54-
pr_no=$(echo $service_name | { grep -oE '[0-9]+$' || true; })
55-
if [ -z $pr_no ]; then
56-
workspace=${{ parameters.tf_environment }}
57-
else
58-
workspace=pr-$pr_no
59-
fi
48+
# pr_no=$(echo $service_name | { grep -oE '[0-9]+$' || true; })
49+
# if [ -z $pr_no ]; then
50+
# workspace=${{ parameters.tf_environment }}
51+
# else
52+
# workspace=pr-$pr_no
53+
# fi
54+
55+
workspace=${{ parameters.tf_environment }}
6056
6157
echo sandbox with following parameters:
6258
echo service_name: $service_name

0 commit comments

Comments
 (0)