Skip to content

Commit 91dc0a4

Browse files
authored
Fix Azure E2E (#287)
* update ci scripts * fix typo in workflow file * update generate script * update generate script * remove additional comments
1 parent 0ebc1dd commit 91dc0a4

File tree

4 files changed

+33
-4
lines changed

4 files changed

+33
-4
lines changed

.github/workflows/e2e-azure-cc-enclave.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
workflow_dispatch:
44
inputs:
55
operator_image_version:
6-
description: 'The version of GCP enclave image'
6+
description: 'The version of Azure enclave image'
77
type: string
88
required: true
99
core_image_version:

e2e/prepare_azure_cc_artifacts.sh

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,36 @@ if [[ -d $OUT_PUT_DIR ]]; then
2525
echo "$OUT_PUT_DIR exist. Skip. This only happens during local test."
2626
else
2727
mkdir -p $OUT_PUT_DIR
28-
source ../scripts/azure-cc/generate-deployment-artifacts.sh
28+
29+
# Install confcom extension, az is originally available in GitHub workflow environment
30+
az extension add --name confcom
31+
if [[ $? -ne 0 ]]; then
32+
echo "Failed to install Azure confcom extension"
33+
exit 1
34+
fi
35+
36+
# Required by az confcom
37+
sudo usermod -aG docker $USER
38+
if [[ $? -ne 0 ]]; then
39+
echo "Failed to add current user to docker group"
40+
exit 1
41+
fi
42+
43+
# Generate deployment template
44+
cp $INPUT_TEMPLATE_FILE $OUTPUT_TEMPLATE_FILE
45+
sed -i "s#IMAGE_PLACEHOLDER#$IMAGE#g" $OUTPUT_TEMPLATE_FILE
46+
if [[ $? -ne 0 ]]; then
47+
echo "Failed to pre-process template file"
48+
exit 1
49+
fi
50+
51+
az confcom acipolicygen --approve-wildcards --template-file $OUTPUT_TEMPLATE_FILE > $OUTPUT_POLICY_DIGEST_FILE
52+
if [[ $? -ne 0 ]]; then
53+
echo "Failed to generate template file"
54+
exit 1
55+
fi
56+
57+
cp $INPUT_PARAMETERS_FILE $OUTPUT_PARAMETERS_FILE
2958
fi
3059

3160
if [ -z "$GITHUB_OUTPUT" ]; then

e2e/start_azure_cc_enclave.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -ex
33

44
ROOT="."
55
# below resources should be prepared ahead
6-
RESOURCE_GROUP=uid-enclave-test
6+
RESOURCE_GROUP=uid-enclave-ci-cd
77
IDENTITY=uid-operator
88
VAULT_NAME=uid-operator
99
OPERATOR_KEY_NAME=operator-key-ci

e2e/stop_azure_cc_enclave.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -ex
33

4-
RESOURCE_GROUP=uid-enclave-test
4+
RESOURCE_GROUP=uid-enclave-ci-cd
55

66
if [ -z "$CONTAINER_GROUP_NAME" ]; then
77
echo "CONTAINER_GROUP_NAME can not be empty"

0 commit comments

Comments
 (0)