Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [pull_request, push]

jobs:
build:
uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-build-and-test.yaml@v3
uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-build-and-test.yaml@abu-UID2-4668-update-to-use-values-from-sm
secrets: inherit
with:
vulnerability_scan_only: true
2 changes: 1 addition & 1 deletion .github/workflows/shared-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
path: ${{ inputs.working_dir }}/target/site/jacoco/*

- name: Vulnerability Scan
uses: IABTechLab/uid2-shared-actions/actions/vulnerability_scan_filesystem@v3
uses: IABTechLab/uid2-shared-actions/actions/vulnerability_scan_filesystem@abu-UID2-4668-update-to-use-values-from-sm
with:
scan_severity: HIGH,CRITICAL
failure_severity: ${{ inputs.vulnerability_severity }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/shared-run-e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
- name: Checkout uid2-shared-actions repo
uses: actions/checkout@v4
with:
ref: v3
ref: abu-UID2-4668-update-to-use-values-from-sm
repository: IABTechLab/uid2-shared-actions
path: uid2-shared-actions

Expand Down Expand Up @@ -249,10 +249,10 @@ jobs:
output_parameters_file: ${{ steps.prepare_azure_metadata.outputs.output_parameters_file }}
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}

- name: Start AWS private operator
- name: Start AWS private operator - ABU TESTING OVERRIDE
id: start_aws_private_operator
if: ${{ inputs.operator_type == 'aws' }}
uses: IABTechLab/uid2-shared-actions/actions/start_aws_private_operator@v3
uses: IABTechLab/uid2-shared-actions/actions/start_aws_private_operator@abu-UID2-4668-update-to-use-values-from-sm
with:
bore_url_core: ${{ steps.bore.outputs.BORE_URL_CORE }}
bore_url_optout: ${{ steps.bore.outputs.BORE_URL_OPTOUT }}
Expand Down Expand Up @@ -295,7 +295,7 @@ jobs:

- name: Run E2E tests
id: e2e
uses: IABTechLab/uid2-shared-actions/actions/run_e2e_tests@v3
uses: IABTechLab/uid2-shared-actions/actions/run_e2e_tests@abu-UID2-4668-update-to-use-values-from-sm
with:
e2e_network: ${{ steps.decide_env_var.outputs.e2e_network }}
e2e_image_version: ${{ inputs.e2e_image_version }}
Expand Down
16 changes: 9 additions & 7 deletions scripts/aws/create_cloudformation_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def create_cloudformation_stack(client, stack_name, cft_content, api_token, dc_c
Capabilities=['CAPABILITY_IAM'],
Parameters=[
{ 'ParameterKey': 'APIToken', 'ParameterValue': api_token },
{ 'ParameterKey': 'DeployToEnvironment', 'ParameterValue': 'integ' },
{ 'ParameterKey': 'DeployToEnvironment', 'ParameterValue': 'integ' },
{ 'ParameterKey': 'VpcId', 'ParameterValue': dc_cfg['VpcId'] },
{ 'ParameterKey': 'VpcSubnet1', 'ParameterValue': dc_cfg['VpcSubnet1'] },
{ 'ParameterKey': 'VpcSubnet2', 'ParameterValue': dc_cfg['VpcSubnet2'] },
Expand Down Expand Up @@ -62,12 +62,14 @@ def create_cloudformation_stack(client, stack_name, cft_content, api_token, dc_c
egress.append(create_egress(args.localstack_url, 'E2E - Localstack'))
cft['Resources']['SecurityGroup']['Properties']['SecurityGroupEgress'] = egress

user_data = cft['Resources']['LaunchTemplate']['Properties']['LaunchTemplateData']['UserData']['Fn::Base64']['Fn::Sub']
first_line = user_data.find('\n')
user_data = user_data[:first_line] + '''
export CORE_BASE_URL="http://{}"
export OPTOUT_BASE_URL="http://{}"'''.format(args.core_url, args.optout_url) + user_data[first_line:]
cft['Resources']['LaunchTemplate']['Properties']['LaunchTemplateData']['UserData']['Fn::Base64']['Fn::Sub'] = user_data
# Now, we overwrite core, optout URL's with bore addresses.
secrets = cft['Resources']['TokenSecret']['Properties']['SecretString']['Fn::Join'][1]
core_index = secrets.index('"core_base_url": ')
secrets = secrets[:core_index] + secrets[core_index+2:]
optout_index = secrets.index(', "optout_base_url": ')
secrets = secrets[:optout_index] + secrets[optout_index+2:]
secrets = secrets[:1] + [f'"core_base_url": "http://{args.core_url}"',f', "optout_base_url": "http://{args.optout_url}"', ', "skip_validation": "true"', ', "debug_mode": "true"'] + secrets[1:]
cft['Resources']['TokenSecret']['Properties']['SecretString']['Fn::Join'][1] = secrets

print(dump_yaml(cft))

Expand Down
Loading