|
10 | 10 | permissions:
|
11 | 11 | contents: read # for actions/checkout to fetch code
|
12 | 12 |
|
13 |
| -env: |
14 |
| - CI_CONTAINER_REGISTRY: europe-west1-docker.pkg.dev |
15 |
| - CI_CONTAINER_REPOSITORY: europe-west1-docker.pkg.dev/weave-gitops-clusters/weave-gitops |
16 |
| - |
17 | 13 | name: PR CI Workflow
|
18 | 14 | jobs:
|
19 | 15 | ci-js:
|
@@ -73,89 +69,10 @@ jobs:
|
73 | 69 | - name: Check that make fakes has been run
|
74 | 70 | run: git diff --no-ext-diff --exit-code
|
75 | 71 |
|
76 |
| - ci-generate-tag: |
77 |
| - name: CI Generate Image Tag |
78 |
| - runs-on: ubuntu-latest |
79 |
| - outputs: |
80 |
| - tag: ${{ steps.generate-tag.outputs.tag }} |
81 |
| - steps: |
82 |
| - - id: generate-tag |
83 |
| - run: echo "tag=$(date -u +%s)-${{ github.sha }}" >> $GITHUB_OUTPUT |
84 |
| - |
85 |
| - ci-build-gitops-image: |
86 |
| - name: CI Build Gitops Docker Image |
87 |
| - runs-on: ubuntu-latest |
88 |
| - needs: [ci-generate-tag] |
89 |
| - strategy: |
90 |
| - matrix: |
91 |
| - docker-image: |
92 |
| - - gitops |
93 |
| - - gitops-server |
94 |
| - steps: |
95 |
| - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
96 |
| - - uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0 |
97 |
| - - name: Set build-time flags |
98 |
| - run: | |
99 |
| - echo "LDFLAGS=$(make echo-ldflags)" >> $GITHUB_ENV |
100 |
| - echo "FLUX_VERSION=$(make echo-flux-version)" >> $GITHUB_ENV |
101 |
| - - name: Build and export |
102 |
| - uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0 |
103 |
| - with: |
104 |
| - tags: "${{ env.CI_CONTAINER_REPOSITORY }}/${{ matrix.docker-image }}:${{ needs.ci-generate-tag.outputs.tag }}" |
105 |
| - outputs: type=docker,dest=/tmp/${{ matrix.docker-image }}.tar |
106 |
| - file: ${{ matrix.docker-image }}.dockerfile |
107 |
| - build-args: | |
108 |
| - FLUX_VERSION=${{ env.FLUX_VERSION }} |
109 |
| - LDFLAGS=${{ env.LDFLAGS }} |
110 |
| - GIT_COMMIT=${{ github.sha }} |
111 |
| - - name: Load docker image |
112 |
| - run: docker load --input /tmp/${{ matrix.docker-image }}.tar |
113 |
| - - name: Cache docker image |
114 |
| - uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 |
115 |
| - with: |
116 |
| - name: ${{ matrix.docker-image }} |
117 |
| - path: /tmp/${{ matrix.docker-image }}.tar |
118 |
| - retention-days: 1 |
119 |
| - |
120 |
| - ci-upload-images: |
121 |
| - name: CI Upload Images - Disabled |
122 |
| - runs-on: ubuntu-latest |
123 |
| - # Make sure we only upload images if tests etc have passed |
124 |
| - needs: [ci-go, ci-static, ci-js, ci-build-gitops-image, ci-generate-tag] |
125 |
| - permissions: |
126 |
| - contents: 'read' |
127 |
| - id-token: 'write' |
128 |
| - if: github.event_name == 'push' |
129 |
| - strategy: |
130 |
| - matrix: |
131 |
| - docker-image: |
132 |
| - - gitops |
133 |
| - - gitops-server |
134 |
| - steps: |
135 |
| - - uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0 |
136 |
| - - uses: google-github-actions/setup-gcloud@6189d56e4096ee891640bb02ac264be376592d6a # v2.1.2 |
137 |
| - - name: Download cached docker image |
138 |
| - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 |
139 |
| - with: |
140 |
| - name: ${{ matrix.docker-image }} |
141 |
| - path: /tmp |
142 |
| -# - name: Authenticate to Google Cloud |
143 |
| -# id: gcloud-auth |
144 |
| -# uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2.1.7 |
145 |
| -# with: |
146 |
| -# service_account: ${{ secrets.service_account }} |
147 |
| -# workload_identity_provider: ${{ secrets.workload_identity_provider }} |
148 |
| -# - name: Login to gcloud for docker |
149 |
| -# run: gcloud --quiet auth configure-docker ${{ env.CI_CONTAINER_REGISTRY }} |
150 |
| -# - name: Push images to gcloud |
151 |
| -# run: | |
152 |
| -# docker load --input /tmp/${{ matrix.docker-image }}.tar |
153 |
| -# docker push "${{ env.CI_CONTAINER_REPOSITORY }}/${{ matrix.docker-image }}:${{ needs.ci-generate-tag.outputs.tag }}" |
154 |
| - |
155 | 72 | ci-upload-binary:
|
156 | 73 | name: Upload Binary - Disabled
|
157 | 74 | runs-on: ${{matrix.os}}
|
158 |
| - needs: [ci-go, ci-static, ci-js, ci-build-gitops-image] |
| 75 | + needs: [ci-go, ci-static, ci-js] |
159 | 76 | strategy:
|
160 | 77 | matrix:
|
161 | 78 | os: [ubuntu-latest, macOS-latest]
|
@@ -225,30 +142,6 @@ jobs:
|
225 | 142 | env:
|
226 | 143 | NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
227 | 144 |
|
228 |
| - # We only push images on merge so create a passing check if everything finished |
229 |
| - finish-ci-pr: |
230 |
| - name: PR CI Pipeline |
231 |
| - runs-on: ubuntu-latest |
232 |
| - needs: |
233 |
| - - ci-go |
234 |
| - - ci-static |
235 |
| - - ci-js |
236 |
| - - ci-build-gitops-image |
237 |
| - if: github.event_name != 'push' |
238 |
| - steps: |
239 |
| - - run: echo "All done" |
240 |
| - |
241 |
| - finish-ci-merge: |
242 |
| - # must match https://github.com/weaveworks/corp/blob/master/github-repo-weave-gitops.tf |
243 |
| - name: PR CI Pipeline |
244 |
| - runs-on: ubuntu-latest |
245 |
| - needs: |
246 |
| - - ci-upload-images |
247 |
| - - ci-upload-binary |
248 |
| - - ci-publish-js-lib |
249 |
| - steps: |
250 |
| - - run: echo "All done" |
251 |
| - |
252 | 145 | # release step updates 'release' status check for non releases branches. See ../../doc/incidents/issues-3907 for full context.
|
253 | 146 | release:
|
254 | 147 | if: ${{ github.event_name == 'pull_request' && !startsWith(github.event.pull_request.head.ref, 'releases/') && !github.event.pull_request.head.repo.fork }}
|
|
0 commit comments