From dfecca8210b549789350d12edbd856f1aac15d8a Mon Sep 17 00:00:00 2001 From: Said Sef Date: Sun, 29 Dec 2024 00:00:11 +0000 Subject: [PATCH 1/2] feat: Added appset information to GitHub and GitLab PRs --- charts/applicationset/Chart.yaml | 6 ++---- charts/applicationset/templates/github-pr.yml | 9 +++++++++ charts/applicationset/templates/gitlab-mr.yml | 9 +++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/charts/applicationset/Chart.yaml b/charts/applicationset/Chart.yaml index d918c48..79fa68d 100644 --- a/charts/applicationset/Chart.yaml +++ b/charts/applicationset/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argocd-applicationsets-services description: A Helm chart for ArgoCD ApplicationSets, a declarative, GitOps continuous delivery tool for Kubernetes type: application -version: &version "0.14.0" +version: &version "0.15.0" appVersion: *version kubeVersion: ">= 1.28" home: https://github.com/saidsef/argocd-applicationsets-services @@ -24,9 +24,7 @@ annotations: artifacthub.io/license: "Apache-2.0" artifacthub.io/changes: | - kind: added - description: ability to add extra annotations via values file - - kind: changed - description: updated helm readme file + description: Added appset information to GitHub and GitLab PRs artifacthub.io/links: | - name: README url: https://raw.githubusercontent.com/saidsef/argocd-applicationsets-services/main/README.md diff --git a/charts/applicationset/templates/github-pr.yml b/charts/applicationset/templates/github-pr.yml index c49e67a..cd908fa 100644 --- a/charts/applicationset/templates/github-pr.yml +++ b/charts/applicationset/templates/github-pr.yml @@ -123,5 +123,14 @@ spec: server: {{ $server }} {{- end }} namespace: {{ coalesce $repo.namespace $.Values.globals.deployToNamespace (printf "mr-%sbranch_slug%s-%snumber%s" $dqf $dqb $dqf $dqb) }} + info: + - name: author + value: '{{ $dqf }}author{{ $dqb }}' + - name: branch + value: '{{ $dqf }}branch{{ $dqb }}' + - name: target_branch + value: '{{ $dqf }}target_branch_slug{{ $dqb }}' + - name: pull_request + value: '{{ $dqf }}number{{ $dqb }}' {{- end }} {{- end }} diff --git a/charts/applicationset/templates/gitlab-mr.yml b/charts/applicationset/templates/gitlab-mr.yml index b6ff50f..97efd9c 100644 --- a/charts/applicationset/templates/gitlab-mr.yml +++ b/charts/applicationset/templates/gitlab-mr.yml @@ -119,5 +119,14 @@ spec: server: {{ $server }} {{- end }} namespace: {{ coalesce $repo.namespace $.Values.globals.deployToNamespace (printf "mr-%sbranch_slug%s-%snumber%s" $dqf $dqb $dqf $dqb) }} + info: + - name: author + value: '{{ $dqf }}author{{ $dqb }}' + - name: branch + value: '{{ $dqf }}branch{{ $dqb }}' + - name: target_branch + value: '{{ $dqf }}target_branch_slug{{ $dqb }}' + - name: merge_request + value: '{{ $dqf }}number{{ $dqb }}' {{- end }} {{- end }} From daf8888eb7f28054adc73fa03008b0e9ccad9ad4 Mon Sep 17 00:00:00 2001 From: Said Sef Date: Sun, 29 Dec 2024 09:19:06 +0000 Subject: [PATCH 2/2] fix: ci add pull requst write to dep review --- .github/workflows/charts.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/charts.yml b/.github/workflows/charts.yml index 1f7c6c1..de9a8a3 100644 --- a/.github/workflows/charts.yml +++ b/.github/workflows/charts.yml @@ -100,6 +100,8 @@ jobs: uses: saidsef/saidsef/.github/workflows/dependency-review.yaml@main if: ${{ github.event_name == 'pull_request' }} needs: [chart] + permissions: + pull-requests: write k8s-test: runs-on: ubuntu-latest @@ -109,8 +111,8 @@ jobs: - name: Create k8s Kind Cluster uses: helm/kind-action@v1.12.0 with: - kubectl_version: v1.29.3 # Ensure compatibility with the latest APIs - node_image: kindest/node:v1.29.2 # Match node version with kubectl for consistency + kubectl_version: v1.30.4 # Ensure compatibility with the latest APIs + node_image: kindest/node:v1.30.4 # Match node version with kubectl for consistency - name: Checkout uses: actions/checkout@v4 - name: Run K8s test