Skip to content

Commit 3c6909c

Browse files
authored
Merge branch 'release-3.5' into cr-24608-sync-upstream-3.5.8
2 parents 3bb637c + 5c02082 commit 3c6909c

File tree

59 files changed

+58938
-1090
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+58938
-1090
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ contact_links:
44
- name: Have you read the docs?
55
url: https://argo-workflows.readthedocs.io/en/latest
66
about: Much help can be found in the docs
7-
- name: Ask a question
8-
url: https://github.com/argoproj/argo-workflows/discussions/new
7+
- name: Ask a question about Codefresh's Argo Worklfows
8+
url: https://github.com/codefresh-io/argo-workflows/discussions/new
99
about: Ask a question or start a discussion about workflows
1010
- name: Chat on Slack
1111
url: https://argoproj.github.io/community/join-slack

.github/workflows/ci-build.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ on:
77
- "!release-2.8"
88
pull_request:
99
branches:
10-
- "main"
10+
- "master"
11+
- "release-*"
1112

1213
concurrency:
1314
group: ${{ github.workflow }}-${{ github.ref }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: PR check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "release-*"
7+
8+
jobs:
9+
test-default-branch:
10+
name: base branch is a default branch
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: fail if base branch is not default branch
14+
if: ${{ github.event.pull_request.base.ref != github.event.repository.default_branch }}
15+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
16+
with:
17+
script: |
18+
core.setFailed("Base branch of the PR - ${{ github.event.pull_request.base.ref }} is not a default branch. Please reopen your PR to ${{ github.event.repository.default_branch }}")

.github/workflows/release.yaml

Lines changed: 40 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ on:
55
tags:
66
- v*
77
branches:
8-
- main
8+
- master
9+
- release-*
910
- dev-*
1011

1112
concurrency:
@@ -20,13 +21,13 @@ permissions:
2021
contents: read
2122

2223
jobs:
23-
build-linux:
24+
build-linux-amd64:
2425
name: Build & push linux
25-
if: github.repository == 'argoproj/argo-workflows'
26+
if: github.repository == 'codefresh-io/argo-workflows'
2627
runs-on: ubuntu-latest
2728
strategy:
2829
matrix:
29-
platform: [ linux/amd64, linux/arm64 ]
30+
platform: [ linux/amd64 ]
3031
target: [ workflow-controller, argocli, argoexec ]
3132
steps:
3233
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -48,12 +49,6 @@ jobs:
4849
restore-keys: |
4950
${{ runner.os }}-${{ matrix.platform }}-${{ matrix.target }}-buildx-
5051
51-
- name: Docker Login
52-
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
53-
with:
54-
username: ${{ secrets.DOCKERIO_USERNAME }}
55-
password: ${{ secrets.DOCKERIO_PASSWORD }}
56-
5752
- name: Login to Quay
5853
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
5954
with:
@@ -94,20 +89,15 @@ jobs:
9489
9590
build-windows:
9691
name: Build & push windows
97-
if: github.repository == 'argoproj/argo-workflows'
92+
if: github.repository == 'codefresh-io/argo-workflows'
9893
runs-on: windows-2022
9994
steps:
10095
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
101-
- name: Docker Login
102-
uses: Azure/docker-login@83efeb77770c98b620c73055fbb59b2847e17dc0 # v1.0.1
103-
with:
104-
username: ${{ secrets.DOCKERIO_USERNAME }}
105-
password: ${{ secrets.DOCKERIO_PASSWORD }}
10696

10797
- name: Login to Quay
10898
uses: Azure/docker-login@83efeb77770c98b620c73055fbb59b2847e17dc0 # v1.0.1
10999
with:
110-
login-server: quay.io
100+
registry: quay.io
111101
username: ${{ secrets.QUAYIO_USERNAME }}
112102
password: ${{ secrets.QUAYIO_PASSWORD }}
113103

@@ -118,23 +108,16 @@ jobs:
118108
docker_org=$DOCKERIO_ORG
119109
120110
tag=$(basename $GITHUB_REF)
121-
if [ $tag = "main" ]; then
111+
if [ $tag = "master" ]; then
122112
tag="latest"
123113
fi
124114
125115
targets="argoexec"
126116
for target in $targets; do
127117
image_name="${docker_org}/${target}:${tag}-windows"
128-
docker build \
129-
--build-arg GIT_COMMIT=$tag \
130-
--build-arg GIT_BRANCH=$branch \
131-
--build-arg GIT_TREE_STATE=$tree_state \
132-
--target $target \
133-
-t $image_name \
134-
-f Dockerfile.windows \
135-
.
136-
137-
docker push $image_name
118+
docker build --target $target -t $image_name -f Dockerfile.windows .
119+
## Codefresh - remove dockerhub
120+
# docker push $image_name
138121
139122
docker tag $image_name quay.io/$image_name
140123
docker push quay.io/$image_name
@@ -143,41 +126,29 @@ jobs:
143126
144127
push-images:
145128
name: Push manifest with all images
146-
if: github.repository == 'argoproj/argo-workflows'
129+
if: github.repository == 'codefresh-io/argo-workflows'
147130
runs-on: ubuntu-latest
148-
needs: [ build-linux, build-windows ]
131+
needs: [ build-linux-amd64, build-linux-arm64, build-windows ]
149132
steps:
150133
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
151-
- name: Docker Login
152-
uses: Azure/docker-login@83efeb77770c98b620c73055fbb59b2847e17dc0 # v1.0.1
153-
with:
154-
username: ${{ secrets.DOCKERIO_USERNAME }}
155-
password: ${{ secrets.DOCKERIO_PASSWORD }}
156134

157135
- name: Login to Quay
158136
uses: Azure/docker-login@83efeb77770c98b620c73055fbb59b2847e17dc0 # v1.0.1
159137
with:
160-
login-server: quay.io
138+
registry: quay.io
161139
username: ${{ secrets.QUAYIO_USERNAME }}
162140
password: ${{ secrets.QUAYIO_PASSWORD }}
163141

164-
- name: Install cosign
165-
uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0
166-
with:
167-
cosign-release: 'v2.2.3'
168-
169142
- name: Push Multiarch Image
170143
env:
171144
DOCKERIO_ORG: ${{ secrets.DOCKERIO_ORG }}
172-
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
173-
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
174145
run: |
175146
echo $(jq -c '. + { "experimental": "enabled" }' ${DOCKER_CONFIG}/config.json) > ${DOCKER_CONFIG}/config.json
176147
177148
docker_org=$DOCKERIO_ORG
178149
179150
tag=$(basename $GITHUB_REF)
180-
if [ $tag = "main" ]; then
151+
if [ $tag = "master" ]; then
181152
tag="latest"
182153
fi
183154
@@ -186,36 +157,30 @@ jobs:
186157
image_name="${docker_org}/${target}:${tag}"
187158
188159
if [ $target = "argoexec" ]; then
189-
docker manifest create $image_name ${image_name}-linux-arm64 ${image_name}-linux-amd64 ${image_name}-windows
160+
## Codefresh - remove dockerhub
161+
# docker manifest create $image_name ${image_name}-linux-arm64 ${image_name}-linux-amd64 ${image_name}-windows
190162
docker manifest create quay.io/$image_name quay.io/${image_name}-linux-arm64 quay.io/${image_name}-linux-amd64 quay.io/${image_name}-windows
191163
else
192-
docker manifest create $image_name ${image_name}-linux-arm64 ${image_name}-linux-amd64
164+
## Codefresh - remove dockerhub
165+
# docker manifest create $image_name ${image_name}-linux-arm64 ${image_name}-linux-amd64
193166
docker manifest create quay.io/$image_name quay.io/${image_name}-linux-arm64 quay.io/${image_name}-linux-amd64
194167
fi
195168
196-
docker manifest push $image_name
169+
## Codefresh - remove dockerhub
170+
# docker manifest push $image_name
197171
docker manifest push quay.io/$image_name
198-
199-
cosign sign -y --key env://COSIGN_PRIVATE_KEY quay.io/$image_name
200-
201172
done
202173
203174
test-images-linux-amd64:
204175
name: Try pulling linux/amd64
205-
if: github.repository == 'argoproj/argo-workflows'
176+
if: github.repository == 'codefresh-io/argo-workflows'
206177
runs-on: ubuntu-latest
207178
needs: [ push-images ]
208179
strategy:
209180
matrix:
210181
platform: [ linux/amd64 ]
211182
target: [ workflow-controller, argocli, argoexec ]
212183
steps:
213-
- name: Docker Login
214-
uses: Azure/docker-login@83efeb77770c98b620c73055fbb59b2847e17dc0 # v1.0.1
215-
with:
216-
username: ${{ secrets.DOCKERIO_USERNAME }}
217-
password: ${{ secrets.DOCKERIO_PASSWORD }}
218-
219184
- name: Login to Quay
220185
uses: Azure/docker-login@83efeb77770c98b620c73055fbb59b2847e17dc0 # v1.0.1
221186
with:
@@ -230,26 +195,19 @@ jobs:
230195
TARGET: ${{ matrix.target }}
231196
run: |
232197
tag=$(basename $GITHUB_REF)
233-
if [ $tag = "main" ]; then
198+
if [ $tag = "master" ]; then
234199
tag="latest"
235200
fi
236201
237202
image_name="${DOCKERIO_ORG}/${TARGET}:${tag}"
238-
docker pull $image_name
239203
docker pull quay.io/$image_name
240204
241205
test-images-windows:
242206
name: Try pulling windows
243-
if: github.repository == 'argoproj/argo-workflows'
207+
if: github.repository == 'codefresh-io/argo-workflows'
244208
runs-on: windows-2022
245209
needs: [ push-images ]
246210
steps:
247-
- name: Docker Login
248-
uses: Azure/docker-login@83efeb77770c98b620c73055fbb59b2847e17dc0 # v1.0.1
249-
with:
250-
username: ${{ secrets.DOCKERIO_USERNAME }}
251-
password: ${{ secrets.DOCKERIO_PASSWORD }}
252-
253211
- name: Login to Quay
254212
uses: Azure/docker-login@83efeb77770c98b620c73055fbb59b2847e17dc0 # v1.0.1
255213
with:
@@ -262,27 +220,24 @@ jobs:
262220
run: |
263221
docker_org=$DOCKERIO_ORG
264222
tag=$(basename $GITHUB_REF)
265-
if [ $tag = "main" ]; then
223+
if [ $tag = "master" ]; then
266224
tag="latest"
267225
fi
268226
269227
targets="argoexec"
270228
for target in $targets; do
271229
image_name="${docker_org}/${target}:${tag}"
272-
docker pull $image_name
273230
docker pull quay.io/$image_name
274231
done
275232
276233
publish-release:
277234
permissions:
278235
contents: write # for softprops/action-gh-release to create GitHub release
279236
runs-on: ubuntu-latest
280-
if: github.repository == 'argoproj/argo-workflows'
237+
if: github.repository == 'codefresh-io/argo-workflows'
281238
needs: [ push-images, test-images-linux-amd64, test-images-windows ]
282239
env:
283240
NODE_OPTIONS: --max-old-space-size=4096
284-
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
285-
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
286241
steps:
287242
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
288243
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
@@ -296,45 +251,28 @@ jobs:
296251
with:
297252
path: ui/node_modules
298253
key: ${{ runner.os }}-node-dep-v1-${{ hashFiles('**/yarn.lock') }}
299-
- name: Install cosign
300-
uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0
254+
- name: go build cache
255+
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
256+
with:
257+
path: /home/runner/.cache/go-build
258+
key: GOCACHE-v2-${{ hashFiles('**/go.mod') }}
259+
- name: go mod cache
260+
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
301261
with:
302-
cosign-release: 'v2.2.3'
262+
path: /home/runner/go/pkg/mod
263+
key: GOMODCACHE-v2-${{ hashFiles('**/go.mod') }}
303264
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
304-
- run: |
305-
if [ ${GITHUB_REF##*/} = main ]; then
306-
echo "VERSION=latest" >> $GITHUB_ENV
307-
else
308-
echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
309-
fi
310-
- run: go install sigs.k8s.io/bom/cmd/[email protected]
311-
- run: go install github.com/spdx/spdx-sbom-generator/cmd/[email protected]
312-
- run: mkdir -p dist
313-
- run: generator -o dist -p .
314-
- run: yarn --cwd ui install
315-
- run: generator -o dist -p ui
316-
- run: bom generate --image quay.io/argoproj/workflow-controller:$VERSION -o dist/workflow-controller.spdx
317-
- run: bom generate --image quay.io/argoproj/argocli:$VERSION -o dist/argocli.spdx
318-
- run: bom generate --image quay.io/argoproj/argoexec:$VERSION -o dist/argoexec.spdx
319-
# pack the boms into one file to make it easy to download
320-
- run: tar -zcf dist/sbom.tar.gz dist/*.spdx
321-
- run: make release-notes VERSION=$VERSION
265+
- run: make release-notes VERSION=${GITHUB_REF##*/}
322266
- run: cat release-notes
323-
- run: make manifests VERSION=$VERSION
267+
- run: make manifests VERSION=${GITHUB_REF##*/}
324268
- name: Print image tag (please check it is not `:latest`)
325269
run: |
326270
grep image: dist/manifests/install.yaml
327271
- run: go mod download
328-
- run: make clis STATIC_FILES=true VERSION=$VERSION
272+
- run: make clis STATIC_FILES=true VERSION=${GITHUB_REF##*/}
329273
- name: Print version (please check it is not dirty)
330274
run: dist/argo-linux-amd64 version
331275
- run: make checksums
332-
- name: Sign checksums and create public key for release assets
333-
run: |
334-
cosign sign-blob -y --key env://COSIGN_PRIVATE_KEY ./dist/argo-workflows-cli-checksums.txt > ./dist/argo-workflows-cli-checksums.sig
335-
# Retrieves the public key to release as an asset
336-
cosign public-key --key env://COSIGN_PRIVATE_KEY > ./dist/argo-workflows-cosign.pub
337-
338276
# https://github.com/softprops/action-gh-release
339277
# This will publish the release and upload assets.
340278
# If a conflict occurs (because you are not on a tag), the release will not be updated. This is a short coming
@@ -347,10 +285,8 @@ jobs:
347285
body_path: release-notes
348286
files: |
349287
dist/argo-*.gz
350-
dist/argo-workflows-cli-checksums.txt
351-
dist/argo-workflows-cli-checksums.sig
288+
dist/argo-*.gz.sha256
352289
dist/manifests/*.yaml
353-
dist/argo-workflows-cosign.pub
354290
dist/sbom.tar.gz
355291
env:
356-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
292+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ Participation in Argo Workflows is governed by the [CNCF Code of Conduct](https:
149149

150150
## Project Resources
151151

152-
* [Argo Project GitHub organization](https://github.com/argoproj)
153-
* [Argo Website](https://argoproj.github.io/)
154-
* [Argo Slack](https://argoproj.github.io/community/join-slack)
152+
* Codefresh Argo GitHub: https://github.com/codefresh-io
153+
* Argo Website: https://argoproj.github.io/
154+
* Argo Slack: [click here to join](https://argoproj.github.io/community/join-slack)
155155

156156
## Security
157157

0 commit comments

Comments
 (0)