Skip to content

Commit 881d1f2

Browse files
authored
Merge pull request #102 from mbaldessari/common-automatic-update
common automatic update
2 parents a2a345a + f123f05 commit 881d1f2

78 files changed

Lines changed: 4616 additions & 650 deletions

File tree

Some content is hidden

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

.github/workflows/linter.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ jobs:
2929
# Checkout the code base #
3030
##########################
3131
- name: Checkout Code
32-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3333
with:
3434
# Full git history is needed to get a proper list of changed files within `super-linter`
3535
fetch-depth: 0
36+
3637
- name: Setup helm
3738
uses: azure/setup-helm@v3
3839
# with:

.github/workflows/superlinter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414
- name: Checkout Code
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
with:
1717
# Full git history is needed to get a proper list of changed files within `super-linter`
1818
fetch-depth: 0

common/.github/workflows/ansible-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
steps:
1010
# Important: This sets up your GITHUB_WORKSPACE environment variable
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1212

1313
- name: Lint Ansible Playbook
1414
uses: ansible/ansible-lint-action@v6

common/.github/workflows/ansible-unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
# Checkout the code base #
3333
##########################
3434
- name: Checkout Code
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
3636
with:
3737
# Full git history is needed to get a proper list of changed files within `super-linter`
3838
fetch-depth: 0
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
name: Create per-chart branches
3+
4+
# We only run this job on the charts that will be later moved to full blown charts
5+
# We also want to run the subtree comand only for the charts that have been actually changed
6+
# because git subtree split is a bit of an expensive operation
7+
# github actions do not support yaml anchors so there is more duplication than usual
8+
on:
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- 'acm/**'
14+
- 'golang-external-secrets/**'
15+
- 'hashicorp-vault/**'
16+
- 'letsencrypt/**'
17+
- 'clustergroup/**'
18+
19+
jobs:
20+
changes:
21+
name: Figure out per-chart changes
22+
if: github.repository == 'validatedpatterns/common'
23+
runs-on: ubuntu-latest
24+
permissions: read-all
25+
outputs:
26+
acm: ${{ steps.filter.outputs.acm }}
27+
golang-external-secrets: ${{ steps.filter.outputs.golang-external-secrets }}
28+
hashicorp-vault: ${{ steps.filter.outputs.hashicorp-vault }}
29+
letsencrypt: ${{ steps.filter.outputs.letsencrypt }}
30+
clustergroup: ${{ steps.filter.outputs.clustergroup }}
31+
steps:
32+
- name: Checkout Code
33+
uses: actions/checkout@v4
34+
35+
- uses: dorny/paths-filter@v2
36+
id: filter
37+
with:
38+
filters: |
39+
acm:
40+
- 'acm/**'
41+
golang-external-secrets:
42+
- 'golang-external-secrets/**'
43+
hashicorp-vault:
44+
- 'hashicorp-vault/**'
45+
letsencrypt:
46+
- 'letsencrypt/**'
47+
clustergroup:
48+
- 'clustergroup/**'
49+
50+
acm:
51+
needs: changes
52+
if: |
53+
${{ needs.changes.outputs.acm == 'true' }} &&
54+
github.repository == 'validatedpatterns/common'
55+
uses: validatedpatterns/common/.github/workflows/chart-split.yml@main
56+
permissions:
57+
actions: write
58+
contents: write
59+
with:
60+
chart_name: acm
61+
target_repository: validatedpatterns/acm-chart
62+
secrets: inherit
63+
64+
golang-external-secrets:
65+
needs: changes
66+
if: |
67+
${{ needs.changes.outputs.golang-external-secrets == 'true' }} &&
68+
github.repository == 'validatedpatterns/common'
69+
uses: validatedpatterns/common/.github/workflows/chart-split.yml@main
70+
permissions:
71+
actions: write
72+
contents: write
73+
with:
74+
chart_name: golang-external-secrets
75+
target_repository: validatedpatterns/golang-external-secrets-chart
76+
secrets: inherit
77+
78+
hashicorp-vault:
79+
needs: changes
80+
if: |
81+
${{ needs.changes.outputs.hashicorp-vault == 'true' }} &&
82+
github.repository == 'validatedpatterns/common'
83+
uses: validatedpatterns/common/.github/workflows/chart-split.yml@main
84+
permissions:
85+
actions: write
86+
contents: write
87+
with:
88+
chart_name: hashicorp-vault
89+
target_repository: validatedpatterns/hashicorp-vault-chart
90+
secrets: inherit
91+
92+
letsencrypt:
93+
needs: changes
94+
if: |
95+
${{ needs.changes.outputs.letsencrypt == 'true' }} &&
96+
github.repository == 'validatedpatterns/common'
97+
uses: validatedpatterns/common/.github/workflows/chart-split.yml@main
98+
permissions:
99+
actions: write
100+
contents: write
101+
with:
102+
chart_name: letsencrypt
103+
target_repository: validatedpatterns/letsencrypt-chart
104+
secrets: inherit
105+
106+
clustergroup:
107+
needs: changes
108+
if: |
109+
${{ needs.changes.outputs.clustergroup == 'true' }} &&
110+
github.repository == 'validatedpatterns/common'
111+
uses: validatedpatterns/common/.github/workflows/chart-split.yml@main
112+
permissions:
113+
actions: write
114+
contents: write
115+
with:
116+
chart_name: clustergroup
117+
target_repository: validatedpatterns/clustergroup-chart
118+
secrets: inherit
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Split into chart repo branches
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
chart_name:
8+
required: true
9+
type: string
10+
target_repository:
11+
required: true
12+
type: string
13+
14+
jobs:
15+
split_chart:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
actions: write
19+
contents: write
20+
steps:
21+
- name: Checkout Code
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
token: ${{ secrets.CHARTS_REPOS_TOKEN }}
26+
27+
- name: Run git subtree split and push
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.CHARTS_REPOS_TOKEN }}
30+
run: |
31+
set -e
32+
N="${{ inputs.chart_name }}"
33+
B="${N}-main-single-chart"
34+
git push origin -d "${B}" || /bin/true
35+
git subtree split -P "${N}" -b "${B}"
36+
git push -f -u origin "${B}"
37+
#git clone https://validatedpatterns:${GITHUB_TOKEN}@github.com/validatedpatterns/common.git -b "acm-main-single-chart" --single-branch
38+
git push --force https://validatedpatterns:"${GITHUB_TOKEN}"@github.com/${{ inputs.target_repository }}.git "${B}:main"

common/.github/workflows/jsonschema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
# Checkout the code base #
3333
##########################
3434
- name: Checkout Code
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
3636
with:
3737
# Full git history is needed to get a proper list of changed files within `super-linter`
3838
fetch-depth: 0

common/.github/workflows/linter.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ jobs:
2929
# Checkout the code base #
3030
##########################
3131
- name: Checkout Code
32-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3333
with:
3434
# Full git history is needed to get a proper list of changed files within `super-linter`
3535
fetch-depth: 0
3636
- name: Setup helm
3737
uses: azure/setup-helm@v3
38-
# with:
39-
# version: '<version>' # default is latest stable
40-
id: install
38+
with:
39+
version: 'v3.12.3'
40+
4141

4242
################################
4343
# Run Linter against code base #
@@ -56,9 +56,10 @@ jobs:
5656
run: |
5757
make helmlint
5858
59-
- name: Run make helm kubeconform
60-
run: |
61-
curl -L -O https://github.com/yannh/kubeconform/releases/download/v0.4.13/kubeconform-linux-amd64.tar.gz
62-
tar xf kubeconform-linux-amd64.tar.gz
63-
sudo mv -v kubeconform /usr/local/bin
64-
make kubeconform
59+
# For now disable this until we have a nice and simple process to update the schemas in our repo
60+
# - name: Run make helm kubeconform
61+
# run: |
62+
# curl -L -O https://github.com/yannh/kubeconform/releases/download/v0.4.13/kubeconform-linux-amd64.tar.gz
63+
# tar xf kubeconform-linux-amd64.tar.gz
64+
# sudo mv -v kubeconform /usr/local/bin
65+
# make kubeconform

common/.github/workflows/superlinter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414
- name: Checkout Code
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
with:
1717
# Full git history is needed to get a proper list of changed files within `super-linter`
1818
fetch-depth: 0

common/Changes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes
22

3+
## Aug 17, 2023
4+
5+
* Introduced support for multisource applications via .chart + .chartVersion
6+
37
## Jul 8, 2023
48

59
* Introduced a default of 20 for sync failures retries in argo applications (global override via global.options.applicationRetryLimit

0 commit comments

Comments
 (0)