Skip to content

Commit b4644aa

Browse files
authored
Merge pull request #123 from IABTechLab/tjm-UID2-3620-publish-all-use-ami
Updates for publishing AMIs
2 parents 7f625f9 + 4d5ffb1 commit b4644aa

File tree

4 files changed

+4
-33
lines changed

4 files changed

+4
-33
lines changed

.github/workflows/shared-run-e2e-tests.yaml

+2-4
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,8 @@ jobs:
186186
- name: Prepare AWS metadata
187187
id: prepare_aws_metadata
188188
if: ${{ inputs.operator_type == 'aws' }}
189-
uses: IABTechLab/uid2-shared-actions/actions/prepare_aws_metadata@v2
189+
uses: IABTechLab/uid2-shared-actions/actions/prepare_aws_metadata@v3
190190
with:
191-
operator_image_version: ${{ inputs.operator_image_version }}
192191
admin_root: ${{ inputs.admin_root }}
193192
aws_pcr0: ${{ inputs.aws_pcr0 }}
194193

@@ -245,14 +244,13 @@ jobs:
245244
- name: Start AWS private operator
246245
id: start_aws_private_operator
247246
if: ${{ inputs.operator_type == 'aws' }}
248-
uses: IABTechLab/uid2-shared-actions/actions/start_aws_private_operator@v2
247+
uses: IABTechLab/uid2-shared-actions/actions/start_aws_private_operator@v3
249248
with:
250249
bore_url_core: ${{ steps.bore.outputs.BORE_URL_CORE }}
251250
bore_url_optout: ${{ steps.bore.outputs.BORE_URL_OPTOUT }}
252251
bore_url_localstack: ${{ steps.bore.outputs.BORE_URL_LOCALSTACK }}
253252
aws_region: ${{ inputs.aws_region }}
254253
aws_ami: ${{ inputs.aws_ami }}
255-
image_hash: ${{ steps.prepare_aws_metadata.outputs.image_hash }}
256254
identity_scope: ${{ inputs.uid2_e2e_identity_scope }}
257255
operator_key: ${{ steps.prepare_aws_metadata.outputs.operator_key }}
258256

actions/prepare_aws_metadata/action.yaml

-19
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: Prepare AWS Metadata
22
description: Prepares the AWS Nitro enclave metadata
33

44
inputs:
5-
operator_image_version:
6-
description: The uid2-operator image version
7-
default: latest
85
admin_root:
96
description: The root path for uid2-admin folder
107
default: uid2-admin
@@ -13,9 +10,6 @@ inputs:
1310
required: true
1411

1512
outputs:
16-
image_hash:
17-
description: The operator image hash
18-
value: ${{ steps.image_digest.outputs.IMAGE_HASH }}
1913
operator_key:
2014
description: The operator key
2115
value: ${{ steps.enclave_metadata.outputs.OPERATOR_KEY }}
@@ -24,19 +18,6 @@ runs:
2418
using: "composite"
2519

2620
steps:
27-
- name: Get image digest
28-
id: image_digest
29-
shell: bash
30-
run: |
31-
# Pull the image to make sure it's available locally
32-
IMAGE_NAME="ghcr.io/iabtechlab/uid2-operator"
33-
IMAGE_TAG="${{ inputs.operator_image_version }}"
34-
docker pull "${IMAGE_NAME}:${IMAGE_TAG}"
35-
36-
# Get the digest
37-
IMAGE_HASH=$(docker inspect --format='{{index .RepoDigests 0}}' "${IMAGE_NAME}:${IMAGE_TAG}" | cut -d'@' -f2 | cut -d':' -f2)
38-
echo "::set-output name=image_hash::${IMAGE_HASH}"
39-
4021
- name: Prepare AWS enclave metadata
4122
id: enclave_metadata
4223
shell: bash

actions/start_aws_private_operator/action.yaml

+1-5
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ inputs:
1717
aws_ami:
1818
description: The AWS AMI ID
1919
required: true
20-
image_hash:
21-
description: The operator image hash
22-
required: true
2320
identity_scope:
2421
description: The identity scope [UID2, EUID]
2522
required: true
@@ -40,7 +37,7 @@ runs:
4037

4138
steps:
4239
- name: Setup Python 3
43-
uses: actions/setup-python@v4
40+
uses: actions/setup-python@v5
4441
with:
4542
python-version: 3.x
4643

@@ -66,7 +63,6 @@ runs:
6663
BORE_URL_LOCALSTACK: ${{ inputs.bore_url_localstack }}
6764
AWS_REGION: ${{ inputs.aws_region }}
6865
AWS_AMI: ${{ inputs.aws_ami }}
69-
IMAGE_HASH: ${{ inputs.image_hash }}
7066
IDENTITY_SCOPE: ${{ inputs.identity_scope }}
7167
OPERATOR_KEY: ${{ inputs.operator_key }}
7268
run: |

scripts/aws/start_aws_enclave.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ if [ -z "${AWS_AMI}" ]; then
3030
exit 1
3131
fi
3232

33-
if [ -z "${IMAGE_HASH}" ]; then
34-
echo "IMAGE_HASH can not be empty"
35-
exit 1
36-
fi
3733

3834
if [ -z "${IDENTITY_SCOPE}" ]; then
3935
echo "IDENTITY_SCOPE can not be empty"
@@ -46,7 +42,7 @@ if [ -z "${OPERATOR_KEY}" ]; then
4642
fi
4743

4844
DATE=$(date '+%Y%m%d%H%M%S')
49-
AWS_STACK_NAME="uid2-operator-e2e-${IMAGE_HASH}-${DATE}"
45+
AWS_STACK_NAME="uid2-operator-e2e-${AWS_AMI}-${DATE}"
5046

5147
CF_TEMPLATE_SCOPE=""
5248
case "${IDENTITY_SCOPE}" in

0 commit comments

Comments
 (0)