Skip to content

Commit

Permalink
update fork
Browse files Browse the repository at this point in the history
  • Loading branch information
ilia-medvedev-codefresh committed Jan 30, 2024
2 parents 32bb53c + 3a26457 commit bc35503
Show file tree
Hide file tree
Showing 256 changed files with 18,612 additions and 3,605 deletions.
6 changes: 6 additions & 0 deletions .clomonitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ exemptions:
reason: "Helm deps are not currently scanned. Maintainers are watching developments to dependabot-core #2237" # Justification of this exemption (mandatory, it will be displayed on the UI)
- check: sbom
reason: "Tracking Helm dependencies is not yet a stable practice."
- check: self_assessment
reason: "Refer to self assessments supplied by the codebases Argo Helm supports."
- check: signed_releases
reason: "Argo Helm releases are made via Artifact Hub, where they are signed. The unsigned GitHub releases are for reference only."
- check: license_scanning
reason: "Temporary exemption: pending response from CNCF Service Desk"

# TODO:
# License scanning information
Expand Down
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* @mkilchhofer @jmeridth @yu-croco

/charts/argo-workflows/ @vladlosev @jmeridth @yu-croco @tico24
/charts/argo-cd/ @mbevc1 @mkilchhofer @yu-croco @jmeridth @pdrastil @tico24
/charts/argo-events/ @pdrastil @jmeridth @tico24 @yu-croco
/charts/argo-rollouts/ @jmeridth @yu-croco
12 changes: 11 additions & 1 deletion .github/configs/cr.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
## Reference: https://github.com/helm/chart-releaser
index-path: "./index.yaml"
index-path: "./index.yaml"

# PGP signing
sign: true
key: Argo Helm maintainers
# keyring: # Set via env variable CR_KEYRING
# passphrase-file: # Set via env variable CR_PASSPHRASE_FILE

# Enable automatic generation of release notes using GitHubs release notes generator.
# see: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
generate-release-notes: true
1 change: 0 additions & 1 deletion .github/configs/ct-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ chart-dirs:
- charts
chart-repos:
- dandydeveloper=https://dandydeveloper.github.io/charts/
helm-extra-args: "--timeout 600s"
validate-chart-schema: false
validate-maintainers: true
validate-yaml: true
Expand Down
18 changes: 12 additions & 6 deletions .github/configs/labeler.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
argo-cd:
- charts/argo-cd/**/*
- changed-files:
- any-glob-to-any-file: charts/argo-cd/**

argo-events:
- charts/argo-events/**/*
- changed-files:
- any-glob-to-any-file: charts/argo-events/**

argo-rollouts:
- charts/argo-rollouts/**/*
- changed-files:
- any-glob-to-any-file: charts/argo-rollouts/**

argo-workflows:
- charts/argo-workflows/**/*
- changed-files:
- any-glob-to-any-file: charts/argo-workflows/**

argocd-image-updater:
- charts/argocd-image-updater/**/*
- changed-files:
- any-glob-to-any-file: charts/argocd-image-updater/**

argocd-apps:
- charts/argocd-apps/**/*
- changed-files:
- any-glob-to-any-file: charts/argocd-apps/**
4 changes: 3 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<!--
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the *Details* link next to the DCO action for instructions on how to resolve this.
-->

Checklist:

Expand All @@ -11,4 +13,4 @@ Checklist:
* [ ] I have signed off all my commits as required by [DCO](https://github.com/argoproj/argoproj/blob/master/community/CONTRIBUTING.md).
* [ ] My build is green ([troubleshooting builds](https://argo-cd.readthedocs.io/en/stable/developer-guide/ci/)).

Changes are automatically published when merged to `main`. They are not published on branches.
<!-- Changes are automatically published when merged to `main`. They are not published on branches. -->
57 changes: 57 additions & 0 deletions .github/workflows/chart-version-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## Used on Renovate PRs to bump the chart version and add a changelog entry
## Reference: https://github.com/stefanzweifel/git-auto-commit-action
## Reference: https://github.com/marketplace/actions/changed-files
name: 'Chart Version Bump and Changelog'

on:
pull_request:
types:
- labeled

permissions:
contents: write

jobs:
helm-bumper:
if: ${{ (contains(github.event.pull_request.labels.*.name, 'renovate')) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
token: ${{ secrets.PAT }}
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@716b1e13042866565e00e85fd4ec490e186c4a2f # v41.0.1
with:
files: charts/{argo-workflows,argo-cd,argo-events,argo-rollouts,argocd-image-updater}/Chart.yaml

- name: "Bump Version and Changelog"
run: |
chartName="$(echo \"${{ steps.changed-files.outputs.all_changed_files }}\" | cut -d '/' -f2)"
echo "Changed chart name is: $chartName"
echo "----------------------------------------"
parentDir="charts/${chartName}"
# Bump the chart version by one patch version
version=$(grep '^version:' ${parentDir}/Chart.yaml | awk '{print $2}')
major=$(echo $version | cut -d. -f1)
minor=$(echo $version | cut -d. -f2)
patch=$(echo $version | cut -d. -f3)
patch=$(expr $patch + 1)
sed -i "s/^version:.*/version: ${major}.${minor}.${patch}/g" ${parentDir}/Chart.yaml
# Add a changelog entry
appVersion=$(grep '^appVersion:' ${parentDir}/Chart.yaml | awk '{print $2}')
sed -i -e '/^ artifacthub.io\/changes: |/,$d' ${parentDir}/Chart.yaml
echo " artifacthub.io/changes: |" >> ${parentDir}/Chart.yaml
echo " - kind: changed" >> ${parentDir}/Chart.yaml
echo " description: Bump ${chartName} to ${appVersion}" >> ${parentDir}/Chart.yaml
cat ${parentDir}/Chart.yaml
- name: "Commit and push changes"
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0
with:
commit_options: '--signoff'
28 changes: 20 additions & 8 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,42 @@ permissions:
contents: read

jobs:
linter-artifacthub:
runs-on: ubuntu-latest
container:
image: public.ecr.aws/artifacthub/ah:v1.14.0
options: --user 1001
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Run ah lint
working-directory: ./charts
run: ah lint

chart-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
version: v3.10.1 # Also update in publish.yaml

- name: Set up python
uses: actions/setup-python@v4
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: 3.9

- name: Setup Chart Linting
id: lint
uses: helm/chart-testing-action@v2.3.1
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
with:
# Note: Also update in scripts/lint.sh
version: v3.7.1
version: v3.10.0

- name: List changed charts
id: list-changed
Expand All @@ -38,8 +50,8 @@ jobs:
changed=$(ct --config ./.github/configs/ct-lint.yaml --target-branch ${{ github.base_ref }} list-changed)
charts=$(echo "$changed" | tr '\n' ' ' | xargs)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
echo "::set-output name=changed_charts::$charts"
echo "changed=true" >> $GITHUB_OUTPUT
echo "changed_charts=$charts" >> $GITHUB_OUTPUT
fi
- name: Run chart-testing (lint)
Expand All @@ -57,7 +69,7 @@ jobs:
echo -e '\033[0;32mDocumentation up to date\033[0m ✔'
fi
- name: Create kind cluster
uses: helm/kind-action@v1.4.0
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0
if: steps.list-changed.outputs.changed == 'true'
with:
config: .github/configs/kind-config.yaml
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/pr-sizing.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
## Reference: https://github.com/pascalgn/size-label-action
name: 'PR Labeling'

on:
pull_request_target:
types: [opened, synchronize, reopened]
types:
- opened
- synchronize
- reopened

permissions:
contents: read
Expand All @@ -12,7 +16,7 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
with:
configuration-path: ".github/configs/labeler.yaml"
repo-token: "${{ secrets.GITHUB_TOKEN }}"
Expand All @@ -21,7 +25,6 @@ jobs:
size-label:
runs-on: ubuntu-latest
steps:
- name: size-label
uses: "pascalgn/[email protected]"
- uses: pascalgn/size-label-action@37a5ad4ae20ea8032abf169d953bcd661fd82cd3 # v0.5.0
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
3 changes: 2 additions & 1 deletion .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
- uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f # v5.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -31,6 +31,7 @@ jobs:
argo-workflows
argocd-image-updater
argocd-apps
deps
github
# Configure that a scope must always be provided.
requireScope: true
47 changes: 40 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ jobs:
publish:
permissions:
contents: write # for helm/chart-releaser-action to push chart release and create a release
packages: write # to push OCI chart package to GitHub Registry
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Install Helm
uses: azure/setup-helm@v3
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
version: v3.10.1 # Also update in lint-and-test.yaml

Expand All @@ -35,13 +36,45 @@ jobs:
## This is required to consider the old Circle-CI Index and to stay compatible with all the old releases.
- name: Fetch current Chart Index
run: |
rm -rf .cr-release-packages
mkdir .cr-release-packages
helm package charts/argo-events -u -d .cr-release-packages/
git checkout origin/gh-pages index.yaml
# The GitHub repository secret `PGP_PRIVATE_KEY` contains the private key
# in ASCII-armored format. To export a (new) key, run this command:
# `gpg --armor --export-secret-key <my key>`
- name: Prepare PGP key
run: |
IFS=""
echo "$PGP_PRIVATE_KEY" | gpg --dearmor > $HOME/secring.gpg
echo "$PGP_PASSPHRASE" > $HOME/passphrase.txt
# Tell chart-releaser-action where to find the key and its passphrase
echo "CR_KEYRING=$HOME/secring.gpg" >> "$GITHUB_ENV"
echo "CR_PASSPHRASE_FILE=$HOME/passphrase.txt" >> "$GITHUB_ENV"
env:
PGP_PRIVATE_KEY: "${{ secrets.PGP_PRIVATE_KEY }}"
PGP_PASSPHRASE: "${{ secrets.PGP_PASSPHRASE }}"

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.4.1
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0
with:
config: "./.github/configs/cr.yaml"
skip_packaging: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Login to GHCR
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push chart to GHCR
run: |
shopt -s nullglob
for pkg in .cr-release-packages/*.tgz; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" oci://ghcr.io/${{ github.repository }}
done
Loading

0 comments on commit bc35503

Please sign in to comment.