|
10 | 10 | replaces: |
11 | 11 | description: 'The previous operator semantic version that this release replaces (for example: v0.0.0)' |
12 | 12 | required: true |
13 | | - mcad-version: |
14 | | - description: 'Version of multi-cluster-app-dispatcher to be released (for example: v0.0.0)' |
15 | | - required: true |
16 | 13 | codeflare-sdk-version: |
17 | 14 | description: 'Version of CodeFlare-SDK to be released (for example: v0.0.0)' |
18 | 15 | required: true |
19 | | - instascale-version: |
20 | | - description: 'Version of InstaScale to be released (for example: v0.0.0)' |
21 | | - required: true |
22 | 16 | kuberay-version: |
23 | 17 | description: 'Tested version of KubeRay (for example: v0.0.0)' |
24 | 18 | required: true |
@@ -48,79 +42,13 @@ jobs: |
48 | 42 | echo "Below are the release parameters set for the workflow:" |
49 | 43 | echo "Operator Version: ${{ github.event.inputs.operator-version }}" |
50 | 44 | echo "Replaces: ${{ github.event.inputs.replaces }}" |
51 | | - echo "MCAD Version: ${{ github.event.inputs.mcad-version }}" |
52 | 45 | echo "CodeFlare SDK Version: ${{ github.event.inputs.codeflare-sdk-version }}" |
53 | | - echo "InstaScale Version: ${{ github.event.inputs.instascale-version }}" |
54 | 46 | echo "Tested KubeRay Version: ${{ github.event.inputs.kuberay-version }}" |
55 | 47 | echo "Is Stable: ${{ github.event.inputs.is-stable }}" |
56 | 48 | echo "CodeFlare Repository Organization: ${{ github.event.inputs.codeflare-repository-organization }}" |
57 | 49 | echo "Quay Organization: ${{ github.event.inputs.quay-organization }}" |
58 | 50 | echo "Community Operators Prod Organization: ${{ github.event.inputs.community-operators-prod-organization }}" |
59 | 51 |
|
60 | | - release-mcad: |
61 | | - needs: check-kuberay-version |
62 | | - runs-on: ubuntu-latest |
63 | | - |
64 | | - steps: |
65 | | - - name: Check if MCAD release does exist |
66 | | - run: | |
67 | | - status_code=$(curl -s -o /dev/null -w "%{http_code}" https://github.com/project-codeflare/multi-cluster-app-dispatcher/releases/tag/${{ github.event.inputs.mcad-version }}) |
68 | | - if [[ "$status_code" == "200" ]]; then |
69 | | - echo "MCAD release with version ${{ github.event.inputs.mcad-version }} already exist. Will not create MCAD release." |
70 | | - fi |
71 | | - echo "MCAD_RELEASE_STATUS_CODE=$status_code" >> $GITHUB_ENV |
72 | | -
|
73 | | - - name: Release MCAD |
74 | | - run: | |
75 | | - gh workflow run mcad-release.yml --repo ${{ github.event.inputs.codeflare-repository-organization }}/multi-cluster-app-dispatcher --ref go-1.20 --field tag=${{ github.event.inputs.mcad-version }} |
76 | | - env: |
77 | | - GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }} |
78 | | - shell: bash |
79 | | - if: ${{ env.MCAD_RELEASE_STATUS_CODE != '200' }} |
80 | | - |
81 | | - - name: Wait for MCAD run to finish |
82 | | - run: | |
83 | | - # wait for a while for Run to be started |
84 | | - sleep 5 |
85 | | - run_id=$(gh run list --workflow mcad-release.yml --repo ${{ github.event.inputs.codeflare-repository-organization }}/multi-cluster-app-dispatcher --limit 1 --json databaseId --jq .[].databaseId) |
86 | | - gh run watch ${run_id} --repo ${{ github.event.inputs.codeflare-repository-organization }}/multi-cluster-app-dispatcher --interval 10 --exit-status |
87 | | - env: |
88 | | - GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }} |
89 | | - shell: bash |
90 | | - if: ${{ env.MCAD_RELEASE_STATUS_CODE != '200' }} |
91 | | - |
92 | | - release-instascale: |
93 | | - needs: release-mcad |
94 | | - runs-on: ubuntu-latest |
95 | | - |
96 | | - steps: |
97 | | - - name: Check if Instascale release does exist |
98 | | - run: | |
99 | | - status_code=$(curl -s -o /dev/null -w "%{http_code}" https://github.com/project-codeflare/instascale/releases/tag/${{ github.event.inputs.instascale-version }}) |
100 | | - if [[ "$status_code" == "200" ]]; then |
101 | | - echo "Instascale release with version ${{ github.event.inputs.instascale-version }} already exist. Will not create Instascale release." |
102 | | - fi |
103 | | - echo "INSTASCALE_RELEASE_STATUS_CODE=$status_code" >> $GITHUB_ENV |
104 | | -
|
105 | | - - name: Release InstaScale |
106 | | - run: | |
107 | | - gh workflow run instascale-release.yml --repo ${{ github.event.inputs.codeflare-repository-organization }}/instascale --ref ${{ github.ref }} --field tag=${{ github.event.inputs.instascale-version }} --field mcad-version=${{ github.event.inputs.mcad-version }} |
108 | | - env: |
109 | | - GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }} |
110 | | - shell: bash |
111 | | - if: ${{ env.INSTASCALE_RELEASE_STATUS_CODE != '200' }} |
112 | | - |
113 | | - - name: Wait for InstaScale run to finish |
114 | | - run: | |
115 | | - # wait for a while for Run to be started |
116 | | - sleep 5 |
117 | | - run_id=$(gh run list --workflow instascale-release.yml --repo ${{ github.event.inputs.codeflare-repository-organization }}/instascale --limit 1 --json databaseId --jq .[].databaseId) |
118 | | - gh run watch ${run_id} --repo ${{ github.event.inputs.codeflare-repository-organization }}/instascale --interval 10 --exit-status |
119 | | - env: |
120 | | - GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }} |
121 | | - shell: bash |
122 | | - if: ${{ env.INSTASCALE_RELEASE_STATUS_CODE != '200' }} |
123 | | - |
124 | 52 | release-codeflare-sdk: |
125 | 53 | needs: check-kuberay-version |
126 | 54 | runs-on: ubuntu-latest |
@@ -156,13 +84,13 @@ jobs: |
156 | 84 | if: ${{ env.SDK_RELEASE_STATUS_CODE != '200' }} |
157 | 85 |
|
158 | 86 | release-codeflare-operator: |
159 | | - needs: [release-mcad, release-instascale, release-codeflare-sdk] |
| 87 | + needs: [release-codeflare-sdk] |
160 | 88 | runs-on: ubuntu-latest |
161 | 89 |
|
162 | 90 | steps: |
163 | 91 | - name: Release CodeFlare operator |
164 | 92 | run: | |
165 | | - gh workflow run tag-and-build.yml --repo ${{ github.event.inputs.codeflare-repository-organization }}/codeflare-operator --ref ${{ github.ref }} --field is-stable=${{ github.event.inputs.is-stable }} --field version=${{ github.event.inputs.operator-version }} --field replaces=${{ github.event.inputs.replaces }} --field mcad-version=${{ github.event.inputs.mcad-version }} --field codeflare-sdk-version=${{ github.event.inputs.codeflare-sdk-version }} --field instascale-version=${{ github.event.inputs.instascale-version }} --field kuberay-version=${{ github.event.inputs.kuberay-version }} --field quay-organization=${{ github.event.inputs.quay-organization }} --field community-operators-prod-fork-organization=${{ github.event.inputs.codeflare-repository-organization }} --field community-operators-prod-organization=${{ github.event.inputs.community-operators-prod-organization }} |
| 93 | + gh workflow run tag-and-build.yml --repo ${{ github.event.inputs.codeflare-repository-organization }}/codeflare-operator --ref ${{ github.ref }} --field is-stable=${{ github.event.inputs.is-stable }} --field version=${{ github.event.inputs.operator-version }} --field replaces=${{ github.event.inputs.replaces }} --field codeflare-sdk-version=${{ github.event.inputs.codeflare-sdk-version }} --field kuberay-version=${{ github.event.inputs.kuberay-version }} --field quay-organization=${{ github.event.inputs.quay-organization }} --field community-operators-prod-fork-organization=${{ github.event.inputs.codeflare-repository-organization }} --field community-operators-prod-organization=${{ github.event.inputs.community-operators-prod-organization }} |
166 | 94 | env: |
167 | 95 | GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }} |
168 | 96 | shell: bash |
|
0 commit comments