|
62 | 62 |
|
63 | 63 | - name: kubectl rabbitmq tests
|
64 | 64 | env:
|
65 |
| - IMG: "rabbitmqoperator/cluster-operator:${{ needs.build_operator.outputs.image_sha }}" |
| 65 | + IMG: "rabbitmqoperator/cluster-operator:${{ needs.build_operator.outputs.image_tag }}" |
66 | 66 | run: |
|
67 | 67 | kind load image-archive /tmp/operator.tar --name cluster-operator-testing
|
68 | 68 |
|
@@ -112,10 +112,11 @@ jobs:
|
112 | 112 | title: Cluster Operator - Unit and Integration tests
|
113 | 113 |
|
114 | 114 | build_operator:
|
| 115 | + name: Build Operator image |
115 | 116 | runs-on: ubuntu-latest
|
116 | 117 | needs: unit_integration_tests
|
117 | 118 | outputs:
|
118 |
| - image_sha: ${{ steps.build.outputs.digest }} |
| 119 | + image_tag: ${{ steps.meta.outputs.version }} |
119 | 120 | permissions:
|
120 | 121 | contents: 'write'
|
121 | 122 | id-token: 'write'
|
@@ -167,11 +168,23 @@ jobs:
|
167 | 168 | - name: Build and push
|
168 | 169 | id: build
|
169 | 170 | uses: docker/build-push-action@v6
|
| 171 | + # TODO: re-enable before PR |
| 172 | + if: false |
| 173 | +# if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') }} |
170 | 174 | with:
|
171 | 175 | context: .
|
172 | 176 | platforms: linux/amd64, linux/arm64, linux/ppc64le, linux/s390x
|
173 | 177 | provenance: false
|
174 |
| - push: ${{ github.event_name != 'pull_request' }} |
| 178 | + push: true |
| 179 | + tags: ${{ steps.meta.outputs.tags }} |
| 180 | + labels: ${{ steps.meta.outputs.labels }} |
| 181 | + |
| 182 | + - name: Build to TAR |
| 183 | + id: build_tar |
| 184 | + uses: docker/build-push-action@v6 |
| 185 | + with: |
| 186 | + context: . |
| 187 | + provenance: false |
175 | 188 | tags: ${{ steps.meta.outputs.tags }}
|
176 | 189 | labels: ${{ steps.meta.outputs.labels }}
|
177 | 190 | outputs: |
|
@@ -204,35 +217,47 @@ jobs:
|
204 | 217 | retention-days: 2
|
205 | 218 | if-no-files-found: error
|
206 | 219 |
|
| 220 | + upload_gcs: |
| 221 | + runs-on: ubuntu-latest |
| 222 | + name: Upload manifests to GCS |
| 223 | + # TODO: remove before sending PR |
| 224 | + if: false |
| 225 | +# if: ${{ github.event_name != 'pull_request' }} |
| 226 | + needs: |
| 227 | + - build_operator |
| 228 | + env: |
| 229 | + image_version: ${{ needs.build_operator.outputs.image_tag }} |
| 230 | + steps: |
| 231 | + - name: Download Operator manifests |
| 232 | + uses: actions/download-artifact@v4 |
| 233 | + with: |
| 234 | + name: operator-manifests |
| 235 | + path: release/ |
207 | 236 | - name: Rename manifest for GCS
|
208 |
| - if: github.event_name != 'pull_request' |
209 |
| - run: mv releases/cluster-operator.yml cluster-operator-${{ steps.meta.outputs.version }}.yml |
| 237 | + run: mv releases/cluster-operator.yml cluster-operator-${{ env.image_version }}.yml |
210 | 238 |
|
211 | 239 | - id: auth
|
212 | 240 | name: Auth to Google Cloud
|
213 |
| - if: github.event_name != 'pull_request' |
214 | 241 | uses: 'google-github-actions/auth@v2'
|
215 | 242 | with:
|
216 | 243 | workload_identity_provider: ${{ secrets.GCP_IDENTITY_PROVIDER }}
|
217 | 244 | service_account: ${{ secrets.GCP_SA }}
|
218 | 245 |
|
219 | 246 | - name: Upload manifests to GCS
|
220 |
| - if: github.event_name != 'pull_request' |
221 | 247 | uses: google-github-actions/upload-cloud-storage@v2
|
222 | 248 | with:
|
223 |
| - path: cluster-operator-${{ steps.meta.outputs.version }}.yml |
| 249 | + path: cluster-operator-${{ env.image_version }}.yml |
224 | 250 | destination: operator-manifests-dev
|
225 | 251 |
|
226 | 252 | - name: Update carvel-packaging-dev pipeline trigger
|
227 |
| - if: github.event_name != 'pull_request' |
228 | 253 | uses: google-github-actions/upload-cloud-storage@v2
|
229 | 254 | with:
|
230 | 255 | path: latest-cluster-operator-dev-manifest.txt
|
231 | 256 | destination: operator-manifests-dev
|
232 | 257 | process_gcloudignore: false
|
233 | 258 |
|
234 | 259 | - name: Notify Google Chat
|
235 |
| - if: ${{ failure() && github.event_name != 'pull_request' }} |
| 260 | + if: failure() |
236 | 261 | uses: SimonScholz/google-chat-action@main
|
237 | 262 | with:
|
238 | 263 | webhookUrl: '${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}'
|
|
0 commit comments