1818 - CRITICAL,HIGH
1919 - CRITICAL,HIGH,MEDIUM
2020 - CRITICAL (DO NOT use if JIRA ticket not raised)
21- testing_mode :
22- type : boolean
23- default : false
24- description : ' Run in testing mode (skip actual builds and artifact uploads)'
2521 schedule :
2622 - cron : " 0 0 * * *"
2723
7369 fetch-depth : 0
7470
7571 - name : Scan vulnerabilities
76- if : ${{ github.event.inputs.testing_mode != 'true' }}
7772 uses : IABTechLab/uid2-shared-actions/actions/vulnerability_scan@v3
7873 with :
7974 scan_severity : HIGH,CRITICAL
10398 tag : v${{ steps.version.outputs.new_version }}
10499
105100 buildPublic :
106- if : ${{ github.event.inputs.testing_mode != 'true' }}
107101 name : Public Operator
108102 needs : start
109103 uses : ./.github/workflows/publish-public-operator-docker-image.yaml
@@ -115,7 +109,6 @@ jobs:
115109
116110 buildGCP :
117111 name : GCP Private Operator
118- if : ${{ github.event.inputs.testing_mode != 'true' }}
119112 needs : start
120113 uses : ./.github/workflows/publish-gcp-oidc-enclave-docker.yaml
121114 with :
@@ -126,7 +119,6 @@ jobs:
126119 secrets : inherit
127120
128121 buildAzure :
129- if : ${{ github.event.inputs.testing_mode != 'true' }}
130122 name : Azure Private Operator
131123 needs : start
132124 uses : ./.github/workflows/publish-azure-cc-enclave-docker.yaml
@@ -138,7 +130,6 @@ jobs:
138130 secrets : inherit
139131
140132 buildAWS :
141- if : ${{ github.event.inputs.testing_mode != 'true' }}
142133 name : AWS Private Operator EIF
143134 needs : start
144135 uses : ./.github/workflows/publish-aws-nitro-eif.yaml
@@ -149,9 +140,8 @@ jobs:
149140 secrets : inherit
150141
151142 buildAMI :
152- if : ${{ github.event.inputs.testing_mode != 'true' }}
153143 name : Build AWS AMI
154- needs : [ start, buildAWS ]
144+ needs : [start, buildAWS]
155145 uses : ./.github/workflows/build-uid2-ami.yaml
156146 with :
157147 operator_run_number : ${{ github.run_id }}
@@ -161,73 +151,62 @@ jobs:
161151 name : Create Release
162152 runs-on : ubuntu-latest
163153 if : github.event_name == 'workflow_dispatch'
164- needs : start
165- permissions :
166- contents : write
154+ needs : [start, buildPublic, buildGCP, buildAzure, buildAWS, buildAMI]
167155 steps :
168156 - name : Checkout repo
169157 uses : actions/checkout@v4
170158 with :
171159 fetch-depth : 0
172160
173161 - name : Download public manifest
174- if : ${{ github.event.inputs.testing_mode != 'true' }}
175162 uses : actions/download-artifact@v4
176163 with :
177164 pattern : public-image-*
178165 path : ./manifests/public_operator
179166
180167 - name : Download GCP manifest
181- if : ${{ github.event.inputs.testing_mode != 'true' }}
182168 uses : actions/download-artifact@v4
183169 with :
184170 pattern : gcp-oidc-enclave-ids-*
185171 path : ./manifests/gcp_oidc_operator
186172
187173 - name : Download Azure CC manifest
188- if : ${{ github.event.inputs.testing_mode != 'true' }}
189174 uses : actions/download-artifact@v4
190175 with :
191176 pattern : azure-cc-enclave-id-*
192177 path : ./manifests/azure_cc_operator
193178
194179 - name : Download Azure AKS manifest
195- if : ${{ github.event.inputs.testing_mode != 'true' }}
196180 uses : actions/download-artifact@v4
197181 with :
198182 pattern : azure-aks-enclave-id-*
199183 path : ./manifests/azure_aks_operator
200184
201185 - name : Download EIF manifest
202- if : ${{ github.event.inputs.testing_mode != 'true' }}
203186 uses : actions/download-artifact@v4
204187 with :
205188 pattern : ' aws-eif-enclave-ids-*'
206189 path : ./manifests/aws_eif
207190
208191 - name : Download AWS AMI manifest
209- if : ${{ github.event.inputs.testing_mode != 'true' }}
210192 uses : actions/download-artifact@v4
211193 with :
212194 pattern : ' aws-ami-ids-*'
213195 path : ./manifests/aws_ami
214196
215197 - name : Download Deployment Files
216- if : ${{ github.event.inputs.testing_mode != 'true' }}
217198 uses : actions/download-artifact@v4
218199 with :
219200 pattern : ' *-deployment-files-*'
220201 path : ./deployment
221202
222203 - name : Upload artifacts
223- if : ${{ github.event.inputs.testing_mode != 'true' }}
224204 uses : actions/upload-artifact@v4
225205 with :
226206 name : uid2-operator-release-${{ needs.start.outputs.new_version }}-manifests
227207 path : ./manifests
228208
229209 - name : Build changelog
230- if : ${{ github.event.inputs.testing_mode != 'true' }}
231210 id : changelog
232211 uses : mikepenz/release-changelog-builder-action@v4
233212 with :
@@ -241,7 +220,6 @@ jobs:
241220 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
242221
243222 - name : Zip files
244- if : ${{ github.event.inputs.testing_mode != 'true' }}
245223 run : |
246224 (cd ./deployment/aws-euid-deployment-files-${{ needs.start.outputs.new_version }} && zip -r ../../aws-euid-deployment-files-${{ needs.start.outputs.new_version }}.zip . )
247225 (cd ./deployment/aws-uid2-deployment-files-${{ needs.start.outputs.new_version }} && zip -r ../../aws-uid2-deployment-files-${{ needs.start.outputs.new_version }}.zip . )
@@ -263,4 +241,16 @@ jobs:
263241 ./azure-aks-deployment-files-${{ needs.start.outputs.new_version }}.zip
264242 ./gcp-oidc-deployment-files-${{ needs.start.outputs.new_version }}.zip
265243 ./uid2-operator-release-manifests-${{ needs.start.outputs.new_version }}.zip
266-
244+ notifyFailure :
245+ name : Notify Slack on Failure
246+ runs-on : ubuntu-latest
247+ if : failure() && github.ref == 'refs/heads/main'
248+ needs : [start, buildPublic, buildGCP, buildAzure, buildAWS, buildAMI]
249+ steps :
250+ - name : Send Slack Alert
251+ env :
252+ SLACK_COLOR : danger
253+ SLACK_MESSAGE : ' :x: Operator Pipeline failed'
254+ SLACK_TITLE : Pipeline Failed in ${{ github.workflow }}
255+ SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK }}
256+ uses : rtCamp/action-slack-notify@v2
0 commit comments