Skip to content

Commit 5a4ab03

Browse files
committed
Merge remote-tracking branch 'origin/main' into syw-UID2-4159-token-gen-code-refactoring-UserIdentity
2 parents d207e9c + fe174ef commit 5a4ab03

100 files changed

Lines changed: 3044 additions & 2254 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/build_ami/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ runs:
5959
uses: actions/checkout@v4
6060

6161
- name: Get EIF for Release ${{ inputs.operator_release }}
62-
uses: IABTechLab/uid2-operator/.github/actions/download_release_artifact@main
62+
uses: ./.github/actions/download_release_artifact
6363
if: ${{ inputs.operator_release != '' }}
6464
with:
6565
github_token: ${{ inputs.github_token }}

.github/actions/build_aws_eif/action.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ runs:
9696
9797
cp ${{ steps.buildFolder.outputs.BUILD_FOLDER }}/identity_scope.txt ${ARTIFACTS_OUTPUT_DIR}/
9898
cp ${{ steps.buildFolder.outputs.BUILD_FOLDER }}/version_number.txt ${ARTIFACTS_OUTPUT_DIR}/
99-
cp ./scripts/aws/start.sh ${ARTIFACTS_OUTPUT_DIR}/
100-
cp ./scripts/aws/stop.sh ${ARTIFACTS_OUTPUT_DIR}/
99+
cp ./scripts/aws/ec2.py ${ARTIFACTS_OUTPUT_DIR}/
100+
cp ./scripts/confidential_compute.py ${ARTIFACTS_OUTPUT_DIR}/
101+
cp ./scripts/aws/requirements.txt ${ARTIFACTS_OUTPUT_DIR}/
101102
cp ./scripts/aws/proxies.host.yaml ${ARTIFACTS_OUTPUT_DIR}/
102103
cp ./scripts/aws/sockd.conf ${ARTIFACTS_OUTPUT_DIR}/
103104
cp ./scripts/aws/uid2operator.service ${ARTIFACTS_OUTPUT_DIR}/

.github/actions/build_eks_docker_image/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ runs:
4747
mkdir ${{ inputs.artifacts_output_dir }} -p
4848
4949
- name: Get EIF for Release ${{ inputs.operator_release }}
50-
uses: IABTechLab/uid2-operator/.github/actions/download_release_artifact@main
50+
uses: ./.github/actions/download_release_artifact
5151
if: ${{ inputs.operator_release != '' }}
5252
with:
5353
github_token: ${{ inputs.github_token }}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: 'Install Azure CLI'
2+
description: 'Install Azure CLI'
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- name: uninstall azure-cli
7+
shell: bash
8+
run: |
9+
sudo apt-get remove -y azure-cli
10+
11+
- name: install azure-cli 2.61.0
12+
shell: bash
13+
run: |
14+
sudo apt-get update
15+
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
16+
sudo mkdir -p /etc/apt/keyrings
17+
curl -sLS https://packages.microsoft.com/keys/microsoft.asc |
18+
gpg --dearmor | sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null
19+
sudo chmod go+r /etc/apt/keyrings/microsoft.gpg
20+
AZ_DIST=$(lsb_release -cs)
21+
echo "Types: deb
22+
URIs: https://packages.microsoft.com/repos/azure-cli/
23+
Suites: ${AZ_DIST}
24+
Components: main
25+
Architectures: $(dpkg --print-architecture)
26+
Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources
27+
sudo apt-get update
28+
sudo apt-get install azure-cli
29+
30+
apt-cache policy azure-cli
31+
# Obtain the currently installed distribution
32+
AZ_DIST=$(lsb_release -cs)
33+
# Store an Azure CLI version of choice
34+
AZ_VER=2.61.0
35+
# Install a specific version
36+
sudo apt-get install azure-cli=${AZ_VER}-1~${AZ_DIST} --allow-downgrades

.github/actions/update_operator_version/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ runs:
4343
uses: trstringer/manual-approval@v1
4444
with:
4545
secret: ${{ github.token }}
46-
approvers: thomasm-ttd,atarassov-ttd,cody-constine-ttd
46+
approvers: atarassov-ttd,vishalegbert-ttd,sunnywu,cody-constine-ttd
4747
minimum-approvals: 1
4848
issue-title: Creating Major version of UID2-Operator
4949

.github/workflows/build-uid2-ami.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
- name: Build UID2 Operator AMI
4444
id: buildAMI
45-
uses: IABTechLab/uid2-operator/.github/actions/build_ami@main
45+
uses: ./.github/actions/build_ami
4646
with:
4747
identity_scope: uid2
4848
eif_repo_owner: ${{ env.REPO_OWNER }}
@@ -92,7 +92,7 @@ jobs:
9292
9393
- name: Build EUID Operator AMI
9494
id: buildAMI
95-
uses: IABTechLab/uid2-operator/.github/actions/build_ami@main
95+
uses: ./.github/actions/build_ami
9696
with:
9797
identity_scope: euid
9898
eif_repo_owner: ${{ env.REPO_OWNER }}

.github/workflows/publish-all-operators.yaml

Lines changed: 50 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Publish All Operators
2-
run-name: ${{ format('Publish All Operators - {0} Release', inputs.release_type) }}
2+
run-name: ${{ format('Publish All Operators - {0} Release', github.event.inputs.release_type || 'scheduled') }}
33
on:
44
workflow_dispatch:
55
inputs:
@@ -18,6 +18,8 @@ on:
1818
- CRITICAL,HIGH
1919
- CRITICAL,HIGH,MEDIUM
2020
- CRITICAL (DO NOT use if JIRA ticket not raised)
21+
schedule:
22+
- cron: "0 0 * * *"
2123

2224
jobs:
2325
start:
@@ -26,13 +28,25 @@ jobs:
2628
outputs:
2729
new_version: ${{ steps.version.outputs.new_version }}
2830
commit_sha: ${{ steps.commit-and-tag.outputs.commit_sha }}
31+
release_type: ${{ steps.set-env.outputs.release_type }}
32+
vulnerability_severity: ${{ steps.set-env.outputs.vulnerability_severity }}
33+
env:
34+
RELEASE_TYPE: ${{ inputs.release_type || (github.event_name == 'schedule' && 'patch') }}
35+
VULNERABILITY_SEVERITY: ${{ inputs.vulnerability_severity || (github.event_name == 'schedule' && 'CRITICAL,HIGH') }}
2936
steps:
37+
- name: Set Environment Variables
38+
id: set-env
39+
run: |
40+
echo "release_type=${{ inputs.release_type || (github.event_name == 'schedule' && 'patch') }}" >> $GITHUB_ENV
41+
echo "vulnerability_severity=${{ inputs.vulnerability_severity || (github.event_name == 'schedule' && 'CRITICAL,HIGH') }}" >> $GITHUB_ENV
42+
echo "release_type=${RELEASE_TYPE}" >> $GITHUB_OUTPUT
43+
echo "vulnerability_severity=${VULNERABILITY_SEVERITY}" >> $GITHUB_OUTPUT
3044
- name: Approve Major release
31-
if: inputs.release_type == 'Major'
45+
if: env.RELEASE_TYPE == 'Major'
3246
uses: trstringer/manual-approval@v1
3347
with:
3448
secret: ${{ github.token }}
35-
approvers: thomasm-ttd,atarassov-ttd,cody-constine-ttd
49+
approvers: atarassov-ttd,vishalegbert-ttd,sunnywu,cody-constine-ttd
3650
minimum-approvals: 1
3751
issue-title: Creating Major version of UID2-Operator
3852

@@ -64,7 +78,7 @@ jobs:
6478
id: version
6579
uses: IABTechLab/uid2-shared-actions/actions/version_number@v2
6680
with:
67-
type: ${{ inputs.release_type }}
81+
type: ${{ env.RELEASE_TYPE }}
6882
branch_name: ${{ github.ref }}
6983

7084
- name: Update pom.xml
@@ -79,47 +93,47 @@ jobs:
7993
uses: IABTechLab/uid2-shared-actions/actions/commit_pr_and_merge@v3
8094
with:
8195
add: 'pom.xml version.json'
82-
message: 'Released ${{ inputs.release_type }} version: ${{ steps.version.outputs.new_version }}'
96+
message: 'Released ${{ env.RELEASE_TYPE }} version: ${{ steps.version.outputs.new_version }}'
8397
tag: v${{ steps.version.outputs.new_version }}
8498

8599
buildPublic:
86100
name: Public Operator
87101
needs: start
88102
uses: ./.github/workflows/publish-public-operator-docker-image.yaml
89103
with:
90-
release_type: ${{ inputs.release_type }}
104+
release_type: ${{ needs.start.outputs.release_type }}
91105
version_number_input: ${{ needs.start.outputs.new_version }}
92-
vulnerability_severity: ${{ inputs.vulnerability_severity }}
106+
vulnerability_severity: ${{ needs.start.outputs.vulnerability_severity }}
93107
secrets: inherit
94108

95109
buildGCP:
96110
name: GCP Private Operator
97111
needs: start
98112
uses: ./.github/workflows/publish-gcp-oidc-enclave-docker.yaml
99113
with:
100-
release_type: ${{ inputs.release_type }}
114+
release_type: ${{ needs.start.outputs.release_type }}
101115
version_number_input: ${{ needs.start.outputs.new_version }}
102116
commit_sha: ${{ needs.start.outputs.commit_sha }}
103-
vulnerability_severity: ${{ inputs.vulnerability_severity }}
117+
vulnerability_severity: ${{ needs.start.outputs.vulnerability_severity }}
104118
secrets: inherit
105119

106120
buildAzure:
107121
name: Azure Private Operator
108122
needs: start
109123
uses: ./.github/workflows/publish-azure-cc-enclave-docker.yaml
110124
with:
111-
release_type: ${{ inputs.release_type }}
125+
release_type: ${{ needs.start.outputs.release_type }}
112126
version_number_input: ${{ needs.start.outputs.new_version }}
113127
commit_sha: ${{ needs.start.outputs.commit_sha }}
114-
vulnerability_severity: ${{ inputs.vulnerability_severity }}
128+
vulnerability_severity: ${{ needs.start.outputs.vulnerability_severity }}
115129
secrets: inherit
116130

117131
buildAWS:
118132
name: AWS Private Operator EIF
119133
needs: start
120134
uses: ./.github/workflows/publish-aws-nitro-eif.yaml
121135
with:
122-
release_type: ${{ inputs.release_type }}
136+
release_type: ${{ needs.start.outputs.release_type }}
123137
version_number_input: ${{ needs.start.outputs.new_version }}
124138
commit_sha: ${{ needs.start.outputs.commit_sha }}
125139
secrets: inherit
@@ -132,18 +146,11 @@ jobs:
132146
operator_run_number: ${{ github.run_id }}
133147
secrets: inherit
134148

135-
buildEKS:
136-
name: Build AWS EKS Docker
137-
needs: [start, buildAWS]
138-
uses: ./.github/workflows/publish-aws-eks-nitro-enclave-docker.yaml
139-
with:
140-
operator_run_number: ${{ github.run_id }}
141-
secrets: inherit
142-
143149
createRelease:
144150
name: Create Release
145151
runs-on: ubuntu-latest
146-
needs: [start, buildPublic, buildGCP, buildAzure, buildAWS, buildAMI, buildEKS]
152+
if: github.event_name == 'workflow_dispatch'
153+
needs: [start, buildPublic, buildGCP, buildAzure, buildAWS, buildAMI]
147154
steps:
148155
- name: Checkout repo
149156
uses: actions/checkout@v4
@@ -162,12 +169,18 @@ jobs:
162169
pattern: gcp-oidc-enclave-ids-*
163170
path: ./manifests/gcp_oidc_operator
164171

165-
- name: Download Azure manifest
172+
- name: Download Azure CC manifest
166173
uses: actions/download-artifact@v4
167174
with:
168175
pattern: azure-cc-enclave-id-*
169176
path: ./manifests/azure_cc_operator
170177

178+
- name: Download Azure AKS manifest
179+
uses: actions/download-artifact@v4
180+
with:
181+
pattern: azure-aks-enclave-id-*
182+
path: ./manifests/azure_aks_operator
183+
171184
- name: Download EIF manifest
172185
uses: actions/download-artifact@v4
173186
with:
@@ -180,12 +193,6 @@ jobs:
180193
pattern: 'aws-ami-ids-*'
181194
path: ./manifests/aws_ami
182195

183-
- name: Download AWS EKS manifest
184-
uses: actions/download-artifact@v4
185-
with:
186-
pattern: 'aws-eks-enclave-ids-*'
187-
path: ./manifests/aws_eks
188-
189196
- name: Download Deployment Files
190197
uses: actions/download-artifact@v4
191198
with:
@@ -216,6 +223,7 @@ jobs:
216223
(cd ./deployment/aws-euid-deployment-files-${{ needs.start.outputs.new_version }} && zip -r ../../aws-euid-deployment-files-${{ needs.start.outputs.new_version }}.zip . )
217224
(cd ./deployment/aws-uid2-deployment-files-${{ needs.start.outputs.new_version }} && zip -r ../../aws-uid2-deployment-files-${{ needs.start.outputs.new_version }}.zip . )
218225
(cd ./deployment/azure-cc-deployment-files-${{ needs.start.outputs.new_version }} && zip -r ../../azure-cc-deployment-files-${{ needs.start.outputs.new_version }}.zip . )
226+
(cd ./deployment/azure-aks-deployment-files-${{ needs.start.outputs.new_version }} && zip -r ../../azure-aks-deployment-files-${{ needs.start.outputs.new_version }}.zip . )
219227
(cd ./deployment/gcp-oidc-deployment-files-${{ needs.start.outputs.new_version }} && zip -r ../../gcp-oidc-deployment-files-${{ needs.start.outputs.new_version }}.zip . )
220228
(cd manifests && zip -r ../uid2-operator-release-manifests-${{ needs.start.outputs.new_version }}.zip .)
221229
@@ -229,5 +237,19 @@ jobs:
229237
./aws-euid-deployment-files-${{ needs.start.outputs.new_version }}.zip
230238
./aws-uid2-deployment-files-${{ needs.start.outputs.new_version }}.zip
231239
./azure-cc-deployment-files-${{ needs.start.outputs.new_version }}.zip
240+
./azure-aks-deployment-files-${{ needs.start.outputs.new_version }}.zip
232241
./gcp-oidc-deployment-files-${{ needs.start.outputs.new_version }}.zip
233242
./uid2-operator-release-manifests-${{ needs.start.outputs.new_version }}.zip
243+
notifyFailure:
244+
name: Notify Slack on Failure
245+
runs-on: ubuntu-latest
246+
if: failure() && github.ref == 'refs/heads/main'
247+
needs: [start, buildPublic, buildGCP, buildAzure, buildAWS, buildAMI]
248+
steps:
249+
- name: Send Slack Alert
250+
env:
251+
SLACK_COLOR: danger
252+
SLACK_MESSAGE: ':x: Operator Pipeline failed'
253+
SLACK_TITLE: Pipeline Failed in ${{ github.workflow }}
254+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
255+
uses: rtCamp/action-slack-notify@v2

.github/workflows/publish-aws-eks-nitro-enclave-docker.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish EKS Operator Docker Images
1+
name: Publish EKS Enclave Operator Docker Images
22
run-name: >-
33
${{ inputs.operator_release == '' && format('Publish EKS Operator Docker Images for Operator Run Number: {0}', inputs.operator_run_number) || format('Publish EKS Operator Docker Images for Operator Release: {0}', inputs.operator_release)}}
44
on:
@@ -36,9 +36,12 @@ jobs:
3636
security-events: write
3737
packages: write
3838
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v4
41+
3942
- name: Build Docker Image for EKS Pod
4043
id: build_docker_image_uid
41-
uses: IABTechLab/uid2-operator/.github/actions/build_eks_docker_image@main
44+
uses: ./.github/actions/build_eks_docker_image
4245
with:
4346
identity_scope: uid2
4447
artifacts_output_dir: ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/uid2
@@ -61,9 +64,12 @@ jobs:
6164
security-events: write
6265
packages: write
6366
steps:
67+
- name: Checkout
68+
uses: actions/checkout@v4
69+
6470
- name: Build Docker Image for EKS Pod
6571
id: build_docker_image_euid
66-
uses: IABTechLab/uid2-operator/.github/actions/build_eks_docker_image@main
72+
uses: ./.github/actions/build_eks_docker_image
6773
with:
6874
identity_scope: euid
6975
artifacts_output_dir: ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/euid

.github/workflows/publish-aws-nitro-eif.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ jobs:
4848
env:
4949
GITHUB_CONTEXT: ${{ toJson(github) }}
5050

51+
- name: Checkout
52+
uses: actions/checkout@v4
53+
5154
- name: Update Operator Version
5255
id: update_version
53-
uses: IABTechLab/uid2-operator/.github/actions/update_operator_version@main
56+
uses: ./.github/actions/update_operator_version
5457
with:
5558
release_type: ${{ inputs.release_type }}
5659
version_number_input: ${{ inputs.version_number_input }}
@@ -68,9 +71,12 @@ jobs:
6871
runs-on: ubuntu-latest
6972
needs: start
7073
steps:
74+
- name: Checkout
75+
uses: actions/checkout@v4
76+
7177
- name: Build UID2 AWS EIF
7278
id: build_uid2_eif
73-
uses: IABTechLab/uid2-operator/.github/actions/build_aws_eif@main
79+
uses: ./.github/actions/build_aws_eif
7480
with:
7581
identity_scope: uid2
7682
artifacts_base_output_dir: ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/uid2
@@ -104,9 +110,12 @@ jobs:
104110
runs-on: ubuntu-latest
105111
needs: start
106112
steps:
113+
- name: Checkout
114+
uses: actions/checkout@v4
115+
107116
- name: Build EUID AWS EIF
108117
id: build_euid_eif
109-
uses: IABTechLab/uid2-operator/.github/actions/build_aws_eif@main
118+
uses: ./.github/actions/build_aws_eif
110119
with:
111120
identity_scope: euid
112121
artifacts_base_output_dir: ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/euid

0 commit comments

Comments
 (0)