Skip to content

Commit c3739bf

Browse files
committed
reverted all changes done from upstream
1 parent 48773e8 commit c3739bf

4 files changed

Lines changed: 48 additions & 69 deletions

File tree

.github/workflows/ci-build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: Integration tests
22
on:
33
push:
44
branches:
5-
# - 'master'
5+
- 'master'
66
- 'release-*'
77
- '!release-1.4'
88
- '!release-1.5'
99
pull_request:
1010
branches:
11-
# - 'master'
12-
- 'release-*' # Codefresh change instead of `master`
11+
- 'master'
12+
- 'release-*'
1313

1414
env:
1515
# Golang version to use across CI steps

.github/workflows/image.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ name: Image
33
on:
44
push:
55
branches:
6-
# - master
7-
- "release-*" # Codefresh change instead of `master`
8-
# pull_request:
9-
# branches:
10-
# - master
11-
# types: [ labeled, unlabeled, opened, synchronize, reopened ]
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
types: [ labeled, unlabeled, opened, synchronize, reopened ]
1211

1312
concurrency:
1413
group: ${{ github.workflow }}-${{ github.ref }}
@@ -20,7 +19,7 @@ jobs:
2019
set-vars:
2120
permissions:
2221
contents: read
23-
if: github.repository == 'codefresh-io/argo-cd'
22+
if: github.repository == 'argoproj/argo-cd'
2423
runs-on: ubuntu-22.04
2524
outputs:
2625
image-tag: ${{ steps.image.outputs.tag}}
@@ -117,3 +116,4 @@ jobs:
117116
git config --global user.name 'CI'
118117
git diff --exit-code && echo 'Already deployed' || (git commit -am 'Upgrade argocd to ${{ needs.set-vars.outputs.image-tag }}' && git push)
119118
working-directory: argoproj-deployments/argocd
119+

.github/workflows/release.yaml

Lines changed: 32 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
name: Create ArgoCD release
1+
name: Publish ArgoCD Release
22
on:
33
push:
44
tags:
5-
- "release-v**"
6-
- "!release-v1.5*"
7-
- "!release-v1.4*"
8-
- "!release-v1.3*"
9-
- "!release-v1.2*"
10-
- "!release-v1.1*"
11-
- "!release-v1.0*"
12-
- "!release-v0*"
5+
- 'v*'
6+
- '!v2.4*'
7+
- '!v2.5*'
8+
- '!v2.6*'
9+
10+
permissions: {}
1311

1412
env:
1513
# renovate: datasource=golang-version packageName=golang
@@ -42,7 +40,7 @@ jobs:
4240
packages: write # for uploading attestations. (https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#known-issues)
4341
# Must be refernced by a tag. https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#referencing-the-slsa-generator
4442
if: github.repository == 'argoproj/argo-cd'
45-
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v1.9.0
43+
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2.0.0
4644
with:
4745
image: quay.io/argoproj/argocd
4846
digest: ${{ needs.argocd-image.outputs.image-digest }}
@@ -58,14 +56,8 @@ jobs:
5856
contents: write # used for uploading assets
5957
if: github.repository == 'argoproj/argo-cd'
6058
runs-on: ubuntu-22.04
61-
env:
62-
ARTIFACT_NAME: release-notes
6359
outputs:
64-
TARGET_VERSION: ${{ steps.setup-vars.outputs.TARGET_VERSION }}
65-
TARGET_BRANCH: ${{ steps.setup-vars.outputs.TARGET_BRANCH }}
66-
PRE_RELEASE: ${{ steps.setup-vars.outputs.PRE_RELEASE }}
67-
RELEASE_TAG: ${{ steps.setup-vars.outputs.RELEASE_TAG }}
68-
RELEASE_NOTES: ${{ steps.release-notes.outputs.RELEASE_NOTES }}
60+
hashes: ${{ steps.hash.outputs.hashes }}
6961

7062
steps:
7163
- name: Checkout code
@@ -93,6 +85,14 @@ jobs:
9385
echo "KUBECTL_VERSION=$(go list -m k8s.io/client-go | head -n 1 | rev | cut -d' ' -f1 | rev)" >> $GITHUB_ENV
9486
echo "GIT_TREE_STATE=$(if [ -z "`git status --porcelain`" ]; then echo "clean" ; else echo "dirty"; fi)" >> $GITHUB_ENV
9587
88+
- name: Free Disk Space (Ubuntu)
89+
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
90+
with:
91+
large-packages: false
92+
docker-images: false
93+
swap-storage: false
94+
tool-cache: false
95+
9696
- name: Run GoReleaser
9797
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0
9898
id: run-goreleaser
@@ -126,7 +126,7 @@ jobs:
126126
contents: write # Needed for release uploads
127127
if: github.repository == 'argoproj/argo-cd'
128128
# Must be refernced by a tag. https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#referencing-the-slsa-generator
129-
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.9.0
129+
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0.0
130130
with:
131131
base64-subjects: "${{ needs.goreleaser.outputs.hashes }}"
132132
provenance-name: "argocd-cli.intoto.jsonl"
@@ -135,43 +135,21 @@ jobs:
135135
generate-sbom:
136136
name: Create SBOM and generate hash
137137
needs:
138-
- prepare-release
139-
- binaries
140-
- container-image
138+
- argocd-image
139+
- goreleaser
140+
permissions:
141+
contents: write # Needed for release uploads
142+
outputs:
143+
hashes: ${{ steps.sbom-hash.outputs.hashes}}
144+
if: github.repository == 'argoproj/argo-cd'
145+
runs-on: ubuntu-22.04
141146
steps:
142147
- name: Checkout code
143148
uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
144149
with:
145150
fetch-depth: 0
146151
token: ${{ secrets.GITHUB_TOKEN }}
147152

148-
- name: Setup Git author information
149-
run: |
150-
set -ue
151-
git config --global user.email "${GIT_EMAIL}"
152-
git config --global user.name "${GIT_USERNAME}"
153-
- name: Checkout corresponding release branch
154-
run: |
155-
set -ue
156-
echo "Switching to release branch '${TARGET_BRANCH}'"
157-
if ! git checkout ${TARGET_BRANCH}; then
158-
echo "::error::Checking out release branch '${TARGET_BRANCH}' for target version '${TARGET_VERSION}' (tagged '${RELEASE_TAG}') failed. Does it exist in repo?"
159-
exit 1
160-
fi
161-
162-
- name: Create the release tag
163-
run: |
164-
set -ue
165-
echo "Creating release ${RELEASE_TAG}"
166-
git tag ${RELEASE_TAG}
167-
168-
- name: Push changes to release branch
169-
run: |
170-
set -ue
171-
# Codefresh change
172-
# git push origin ${TARGET_BRANCH}
173-
git push origin ${RELEASE_TAG}
174-
175153
- name: Setup Golang
176154
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
177155
with:
@@ -188,7 +166,7 @@ jobs:
188166
# managers (gomod, yarn, npm).
189167
PROJECT_FOLDERS: ".,./ui"
190168
# full qualified name of the docker image to be inspected
191-
DOCKER_IMAGE: ${{env.IMAGE_NAMESPACE}}/argocd:v${{env.TARGET_VERSION}}
169+
DOCKER_IMAGE: quay.io/argoproj/argocd:${{ github.ref_name }}
192170
run: |
193171
yarn install --cwd ./ui
194172
go install github.com/spdx/spdx-sbom-generator/cmd/generator@$SPDX_GEN_VERSION
@@ -221,10 +199,7 @@ jobs:
221199
env:
222200
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
223201
with:
224-
token: ${{ secrets.GITHUB_TOKEN }}
225-
name: ${{ env.RELEASE_TAG }}
226202
files: |
227-
argocd-*
228203
/tmp/sbom.tar.gz
229204
230205
sbom-provenance:
@@ -253,13 +228,12 @@ jobs:
253228
runs-on: ubuntu-22.04
254229
steps:
255230
- name: Checkout code
256-
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
231+
uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
257232
with:
258-
token: ${{env.HOMEBREW_TOKEN}}
259-
formula: argocd
260-
if: ${{ env.HOMEBREW_TOKEN != '' && env.UPDATE_HOMEBREW == 'true' && env.PRE_RELEASE != 'true' }}
233+
fetch-depth: 0
234+
token: ${{ secrets.GITHUB_TOKEN }}
261235

262-
- name: Delete original request tag from repository
236+
- name: Setup Git author information
263237
run: |
264238
set -ue
265239
git config --global user.email 'ci@argoproj.com'
@@ -315,7 +289,7 @@ jobs:
315289
# Replace the 'project-release: vX.X.X-rcX' line in SECURITY-INSIGHTS.yml
316290
sed -i "s/project-release: v.*$/project-release: v${{ env.NEW_VERSION }}/" SECURITY-INSIGHTS.yml
317291
# Update the 'commit-hash: XXXXXXX' line in SECURITY-INSIGHTS.yml
318-
sed -i "s/commit-hash: .*/commit-hash: ${{ env.NEW_VERSION }}/" SECURITY-INSIGHTS.yml
292+
sed -i "s/commit-hash: .*/commit-hash: ${{ env.COMMIT_HASH }}/" SECURITY-INSIGHTS.yml
319293
if: ${{ env.UPDATE_VERSION == 'true' }}
320294

321295
- name: Create PR to update VERSION on master branch

.github/workflows/update-snyk.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Snyk report update
22
on:
3+
workflow_dispatch: {}
34
schedule:
45
- cron: '0 0 * * 0' # midnight every Sunday
56

@@ -9,7 +10,8 @@ permissions:
910
jobs:
1011
snyk-report:
1112
permissions:
12-
contents: write # To push snyk reports
13+
contents: write
14+
pull-requests: write
1315
if: github.repository == 'argoproj/argo-cd'
1416
name: Update Snyk report in the docs directory
1517
runs-on: ubuntu-22.04
@@ -20,9 +22,12 @@ jobs:
2022
token: ${{ secrets.GITHUB_TOKEN }}
2123
- name: Build reports
2224
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2326
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
2427
run: |
2528
make snyk-report
29+
pr_branch="snyk-update-$(echo $RANDOM | md5sum | head -c 20)"
30+
git checkout -b "$pr_branch"
2631
git config --global user.email 'ci@argoproj.com'
2732
git config --global user.name 'CI'
2833
git add docs/snyk

0 commit comments

Comments
 (0)