11name : 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' ) }}
33on :
44 workflow_dispatch :
55 inputs :
1818 - CRITICAL,HIGH
1919 - CRITICAL,HIGH,MEDIUM
2020 - CRITICAL (DO NOT use if JIRA ticket not raised)
21+ schedule :
22+ - cron : " 0 0 * * *"
2123
2224jobs :
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
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
0 commit comments