Skip to content

Commit f71689c

Browse files
authored
Merge pull request #317 from IABTechLab/gdm-UID2-2283-release-pipeline
UID2-2283 - Updated release pipeline
2 parents 30c6c44 + a295257 commit f71689c

File tree

2 files changed

+47
-27
lines changed

2 files changed

+47
-27
lines changed

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

Lines changed: 31 additions & 15 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} {1} Release', ':', inputs.release_type) }}
2+
run-name: ${{ format('Publish All Operators - {0} Release', inputs.release_type) }}
33
on:
44
workflow_dispatch:
55
inputs:
@@ -36,7 +36,7 @@ jobs:
3636
with:
3737
fetch-depth: 0
3838

39-
- name: Vulnerability Scan
39+
- name: Scan vulnerabilities
4040
uses: IABTechLab/uid2-shared-actions/actions/[email protected]
4141
with:
4242
scan_severity: HIGH,CRITICAL
@@ -73,14 +73,6 @@ jobs:
7373
release_type: ${{ inputs.release_type }}
7474
version_number_input: ${{ needs.start.outputs.new_version }}
7575

76-
#buildAWS:
77-
# name: AWS Private Operator
78-
# needs: start
79-
# uses: ./.github/workflows/publish-aws-operator-AMI.yaml
80-
# with:
81-
# release_type: ${{ inputs.release_type }}
82-
# version_number_input: ${{ needs.start.outputs.new_version }}
83-
8476
buildGCP:
8577
name: GCP Private Operator
8678
needs: start
@@ -102,25 +94,25 @@ jobs:
10294
runs-on: ubuntu-latest
10395
needs: [buildPublic, buildGCP, buildAzure]
10496
steps:
105-
- name: Download Public Artifacts
97+
- name: Download public artifacts
10698
uses: actions/download-artifact@v3
10799
with:
108100
name: image_details
109101
path: ./artifacts/public_operator
110102

111-
- name: Download GCP Artifacts
103+
- name: Download GCP artifacts
112104
uses: actions/download-artifact@v3
113105
with:
114106
name: gcp-oidc-deployment-files
115107
path: ./artifacts/gcp_oidc_operator
116108

117-
- name: Download Azure Artifacts
109+
- name: Download Azure artifacts
118110
uses: actions/download-artifact@v3
119111
with:
120112
name: azure-cc-deployment-files
121113
path: ./artifacts/azure_cc_operator
122114

123-
- name: Delete Public Artifacts
115+
- name: Delete staging artifacts
124116
uses: geekyeggo/delete-artifact@v2
125117
with:
126118
name: |
@@ -133,4 +125,28 @@ jobs:
133125
with:
134126
name: operator_release
135127
path: ./artifacts/
136-
128+
129+
release:
130+
name: Create Release
131+
runs-on: ubuntu-latest
132+
needs: [start, collectAllArtifacts]
133+
steps:
134+
- name: Build changelog
135+
id: changelog
136+
uses: mikepenz/release-changelog-builder-action@v3
137+
with:
138+
toTag: v${{ needs.start.outputs.new_version }}
139+
configurationJson: |
140+
{
141+
"template": "#{{CHANGELOG}}\n## Installation\n```\ndocker pull ${{ needs.start.outputs.new_version }}-<OPERATOR TYPE>\n```\n\n## Image reference to deploy: \n```\n${{ needs.start.outputs.new_version }}-<OPERATOR TYPE>\n```\n\n## TODO\nPlease attach both UID2 and EUID AWS private operator artifacts here.\n```\n\n## Changelog\n#{{UNCATEGORIZED}}",
142+
"pr_template": " - #{{TITLE}} - ( PR: ##{{NUMBER}} )"
143+
}
144+
env:
145+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
146+
147+
- name: Create draft release
148+
uses: softprops/action-gh-release@v1
149+
with:
150+
name: ${{ needs.start.outputs.new_version }}
151+
body: ${{ steps.changelog.outputs.changelog }}
152+
draft: true

.github/workflows/publish-public-operator-docker-image.yaml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
description: If set, the version number will not be incremented and the given number will be used.
1616
type: string
1717
default: ''
18+
1819
workflow_call:
1920
inputs:
2021
release_type:
@@ -25,38 +26,41 @@ on:
2526
description: If set, the version number will not be incremented and the given number will be used.
2627
type: string
2728
default: ''
28-
29+
2930
outputs:
3031
image_tag:
3132
description: The tag used to describe the image in docker
3233
value: ${{ jobs.Image.outputs.image_tag }}
33-
34+
3435
jobs:
35-
Image:
36+
image:
37+
name: Image
3638
uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-docker-versioned.yaml@v2
37-
with:
39+
with:
3840
release_type: ${{ inputs.release_type }}
3941
version_number_input: ${{ inputs.version_number_input }}
4042
cloud_provider: 'default'
41-
force_release: 'no' #do not create a release for the component builds, will be created by the parent
43+
force_release: 'no' # Do not create a release for the component builds, will be created by the parent
4244
secrets: inherit
4345

44-
E2E:
46+
e2e:
47+
name: E2E
4548
uses: ./.github/workflows/run-e2e-tests-on-operator.yaml
46-
needs: Image
49+
needs: image
4750
with:
48-
operator_image_version: ${{ needs.Image.outputs.image_tag }}
51+
operator_image_version: ${{ needs.image.outputs.image_tag }}
4952
operator_branch: ${{ github.ref }}
5053
secrets: inherit
5154

52-
Artifacts:
55+
collectAllArtifacts:
56+
name: Collect All Artifacts
5357
runs-on: ubuntu-latest
54-
needs: E2E
58+
needs: [image, e2e]
5559
steps:
56-
- name: collect artifacts
60+
- name: Collect artifacts
5761
run: |
5862
mkdir -p image_details
59-
IMAGE_TAG=${{ needs.Image.outputs.image_tag }}
63+
IMAGE_TAG=${{ needs.image.outputs.image_tag }}
6064
IMAGE=$(jq -n --arg img "$IMAGE_TAG" '{image_tag: $img}')
6165
echo $IMAGE > image_details/image.json
6266

0 commit comments

Comments
 (0)