Skip to content

Commit 6e40068

Browse files
committed
Merge branch 'main' into timescaledb
Signed-off-by: Husn E Rabbi <shussan@gmail.com>
2 parents 40ebf92 + 0fad60a commit 6e40068

33 files changed

+1602
-139
lines changed

.github/workflows/bake.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
matrix: ${{ steps.get-matrix.outputs.matrix}}
2929
steps:
3030
- name: Checkout
31-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
31+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3232
with:
3333
persist-credentials: false
3434

@@ -92,3 +92,16 @@ jobs:
9292
extension_name: ${{ matrix.extension }}
9393
secrets:
9494
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
95+
96+
Catalogs:
97+
name: Update Catalogs
98+
needs: Bake
99+
runs-on: ubuntu-24.04
100+
permissions:
101+
contents: write
102+
if: github.ref == 'refs/heads/main'
103+
steps:
104+
- name: Repository Dispatch
105+
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4
106+
with:
107+
event-type: update-catalogs

.github/workflows/bake_targets.yml

Lines changed: 23 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
images: ${{ steps.images.outputs.images }}
2828
steps:
2929
- name: Checkout Code
30-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
30+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3131
with:
3232
persist-credentials: false
3333

3434
- name: Log in to the GitHub Container registry
35-
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
35+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
3636
with:
3737
registry: ghcr.io
3838
username: ${{ github.actor }}
@@ -44,12 +44,13 @@ jobs:
4444
platforms: 'linux/arm64'
4545

4646
- name: Set up Docker Buildx
47-
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
47+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
4848

4949
- name: Build and push
5050
uses: docker/bake-action@5be5f02ff8819ecd3092ea6b2e6261c31774f2b4 # v6
5151
id: build
5252
env:
53+
BUILDX_METADATA_PROVENANCE: disabled
5354
environment: testing
5455
registry: ghcr.io/${{ github.repository_owner }}
5556
revision: ${{ github.sha }}
@@ -93,7 +94,7 @@ jobs:
9394
image: ${{fromJson(needs.testbuild.outputs.images)}}
9495
steps:
9596
- name: Checkout Code
96-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
97+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
9798
with:
9899
persist-credentials: false
99100

@@ -118,62 +119,37 @@ jobs:
118119
fail-fast: false
119120
matrix:
120121
image: ${{fromJson(needs.testbuild.outputs.images)}}
121-
cnpg: ["main", "1.27"]
122-
env:
123-
# renovate: datasource=github-tags depName=kubernetes-sigs/kind versioning=semver
124-
KIND_VERSION: "v0.30.0"
125-
# renovate: datasource=docker depName=kindest/node
126-
KIND_NODE_VERSION: "v1.34.0"
122+
cnpg: ["main", "1.27", "1.28"]
127123
steps:
128124
- name: Checkout Code
129-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
125+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
130126
with:
131127
persist-credentials: false
132128

133-
- name: Create kind cluster
134-
uses: helm/kind-action@92086f6be054225fa813e0a4b13787fc9088faab # v1.13.0
135-
with:
136-
version: ${{ env.KIND_VERSION }}
137-
kubectl_version: ${{ env.KIND_NODE_VERSION }}
138-
node_image: kindest/node:${{ env.KIND_NODE_VERSION }}
139-
config: kind-config.yaml
129+
- name: Install Task
130+
uses: go-task/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1.0.0
140131

141-
- name: Install CNPG (${{ matrix.cnpg }})
132+
- name: Install Dagger
142133
env:
143-
CNPG_RELEASE: ${{ matrix.cnpg }}
134+
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
135+
DAGGER_VERSION: 0.19.11
144136
run: |
145-
operator_manifest="https://raw.githubusercontent.com/cloudnative-pg/artifacts/release-$CNPG_RELEASE/manifests/operator-manifest.yaml"
146-
if [[ "$CNPG_RELEASE" == "main" ]]; then
147-
operator_manifest="https://raw.githubusercontent.com/cloudnative-pg/artifacts/main/manifests/operator-manifest.yaml"
148-
fi
149-
curl -sSfL "$operator_manifest" | kubectl apply --server-side -f -
150-
kubectl wait --for=condition=Available --timeout=2m -n cnpg-system deployments cnpg-controller-manager
137+
curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
151138
152-
- name: Generate Chainsaw testing values
153-
uses: dagger/dagger-for-github@d913e70051faf3b907d4dd96ef1161083c88c644 # v8.2.0
154-
env:
155-
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
156-
DAGGER_VERSION: 0.19.7
157-
with:
158-
version: ${{ env.DAGGER_VERSION }}
159-
verb: call
160-
module: ./dagger/maintenance/
161-
args: generate-testing-values --target ${{ inputs.extension_name }} --extension-image ${{ matrix.image }} export --path=${{ inputs.extension_name }}/values.yaml
139+
- name: Set up environment
140+
run: |
141+
task e2e:setup-env
162142
163-
- name: Install Chainsaw
164-
uses: kyverno/action-install-chainsaw@06560d18422209e9c1e08e931d477d04bf2674c1 # v0.2.14
143+
- name: Generate Chainsaw testing values
144+
run: |
145+
task e2e:generate-values EXTENSION_IMAGE="${{ matrix.image }}" TARGET="${{ inputs.extension_name }}"
165146
166-
- name: Run Kyverno/Chainsaw
167-
env:
168-
EXT_NAME: ${{ inputs.extension_name }}
147+
- name: Run e2e tests
169148
run: |
170-
# Common smoke tests
171-
chainsaw test ./test --values "$EXT_NAME/values.yaml"
149+
# Get Kind cluster internal kubeconfig
150+
task e2e:export-kubeconfig KUBECONFIG_PATH=./kubeconfig INTERNAL=true
172151
173-
# Specific smoke tests
174-
if [ -d "$EXT_NAME/test" ]; then
175-
chainsaw test "$EXT_NAME/test" --values "$EXT_NAME/values.yaml"
176-
fi
152+
task e2e:test TARGET="${{ inputs.extension_name }}" KUBECONFIG_PATH="./kubeconfig"
177153
178154
copytoproduction:
179155
name: Copy images to production
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Update Extension Image Catalogs
2+
3+
on:
4+
schedule:
5+
# Refresh Catalogs once a week, on Mondays - 1h after postgres-container images
6+
- cron: 0 9 * * 1
7+
workflow_dispatch:
8+
repository_dispatch:
9+
types: [update-catalogs]
10+
11+
permissions: read-all
12+
13+
defaults:
14+
run:
15+
shell: "bash -Eeuo pipefail -x {0}"
16+
17+
jobs:
18+
update-catalogs:
19+
runs-on: ubuntu-24.04
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
23+
with:
24+
persist-credentials: false
25+
26+
- name: Checkout artifacts
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
28+
with:
29+
path: artifacts
30+
repository: cloudnative-pg/artifacts
31+
token: ${{ secrets.REPO_GHA_PAT }}
32+
ref: main
33+
34+
- name: Update catalogs
35+
id: update-extension-catalogs
36+
uses: dagger/dagger-for-github@d913e70051faf3b907d4dd96ef1161083c88c644 # v8.2.0
37+
env:
38+
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
39+
DAGGER_VERSION: 0.19.11
40+
with:
41+
version: ${{ env.DAGGER_VERSION }}
42+
verb: call
43+
module: ./dagger/maintenance/
44+
args: generate-catalogs --catalogs-dir artifacts/image-catalogs/ export --path artifacts/image-catalogs/
45+
46+
- name: Diff
47+
working-directory: artifacts
48+
run: |
49+
git add -A .
50+
git status
51+
git diff --staged
52+
53+
- uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9
54+
if: github.ref == 'refs/heads/main'
55+
with:
56+
cwd: 'artifacts'
57+
add: 'image-catalogs'
58+
author_name: CloudNativePG Automated Updates
59+
author_email: noreply@cnpg.com
60+
message: 'chore: update extensions imageCatalogs'

.github/workflows/update_os_libraries.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
extensions: ${{ steps.get-extensions.outputs.extensions }}
2020
steps:
2121
- name: Checkout repository
22-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2323
with:
2424
persist-credentials: false
2525

@@ -28,7 +28,7 @@ jobs:
2828
uses: dagger/dagger-for-github@d913e70051faf3b907d4dd96ef1161083c88c644 # v8.2.0
2929
env:
3030
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
31-
DAGGER_VERSION: 0.19.8
31+
DAGGER_VERSION: 0.19.11
3232
with:
3333
version: ${{ env.DAGGER_VERSION }}
3434
verb: call
@@ -51,10 +51,10 @@ jobs:
5151
extension: ${{ fromJson(needs.fetch-extensions.outputs.extensions) }}
5252
steps:
5353
- name: Checkout repository
54-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
54+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
5555

5656
- name: Log in to the GitHub Container registry
57-
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
57+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
5858
with:
5959
registry: ghcr.io
6060
username: ${{ github.actor }}
@@ -64,7 +64,7 @@ jobs:
6464
uses: dagger/dagger-for-github@d913e70051faf3b907d4dd96ef1161083c88c644 # v8.2.0
6565
env:
6666
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
67-
DAGGER_VERSION: 0.19.8
67+
DAGGER_VERSION: 0.19.11
6868
with:
6969
version: ${{ env.DAGGER_VERSION }}
7070
verb: call
@@ -77,7 +77,7 @@ jobs:
7777
git diff
7878
7979
- name: Create a PR if versions have been updated on main
80-
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8
80+
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8
8181
if: github.ref == 'refs/heads/main'
8282
with:
8383
token: ${{ secrets.REPO_GHA_PAT }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@
2828

2929
# Go workspace file
3030
go.work
31+
32+
# Chainsaw values files
33+
**/values.yaml

0 commit comments

Comments
 (0)