|
21 | 21 | KIND_NODE_VERSION: v1.35.1@sha256:05d7bcdefbda08b4e038f644c4df690cdac3fba8b06f8289f30e10026720a1ab |
22 | 22 | K8S_VERSION: '{{ regexReplaceAll "^v([0-9.]+).*" .KIND_NODE_VERSION "$1" }}' |
23 | 23 | KIND_CLUSTER_NAME: pg-extensions-{{ .K8S_VERSION }} |
| 24 | + # renovate: datasource=github-tags depName=cloudnative-pg/cloudnative-pg versioning=semver extractVersion=^v(?<version>\d+\.\d+)\.\d+$ |
| 25 | + CNPG_RELEASE_DEFAULT: 1.29 |
24 | 26 |
|
25 | 27 | tasks: |
26 | 28 | default: |
@@ -229,10 +231,21 @@ tasks: |
229 | 231 | env: |
230 | 232 | _EXPERIMENTAL_DAGGER_RUNNER_HOST: container://{{ .DAGGER_ENGINE_NAME }} |
231 | 233 | cmds: |
232 | | - - > |
233 | | - dagger call -m github.com/aweris/daggerverse/kind@{{ .DAGGER_KIND_SHA }} --socket {{ .DOCKER_SOCKET }} |
234 | | - container with-env-variable --name=KIND_EXPERIMENTAL_DOCKER_NETWORK --value={{ .E2E_NETWORK }} with-env-variable --name=CACHE_BUSTER --value="$(date)" |
235 | | - with-file --source=kind-config.yaml --path=/root/kind-config.yaml |
| 234 | + - | |
| 235 | + KIND_CONFIG=$(cat <<'EOF' |
| 236 | + kind: Cluster |
| 237 | + apiVersion: kind.x-k8s.io/v1alpha4 |
| 238 | + featureGates: |
| 239 | + ImageVolume: true |
| 240 | + containerdConfigPatches: |
| 241 | + - |- |
| 242 | + [plugins."io.containerd.cri.v1.images".registry] |
| 243 | + config_path = "/etc/containerd/certs.d" |
| 244 | + EOF |
| 245 | + ) |
| 246 | + dagger call -m github.com/aweris/daggerverse/kind@{{ .DAGGER_KIND_SHA }} --socket {{ .DOCKER_SOCKET }} \ |
| 247 | + container with-env-variable --name=KIND_EXPERIMENTAL_DOCKER_NETWORK --value={{ .E2E_NETWORK }} with-env-variable --name=CACHE_BUSTER --value="$(date)" \ |
| 248 | + with-new-file --contents="${KIND_CONFIG}" --path=/root/kind-config.yaml \ |
236 | 249 | with-exec --args="kind","create","cluster","--name","{{ .KIND_CLUSTER_NAME }}","--image","kindest/node:{{ .KIND_NODE_VERSION }}","--config","/root/kind-config.yaml" sync |
237 | 250 | - docker exec "{{ .KIND_CLUSTER_NAME }}-control-plane" mkdir -p "{{ .REGISTRY_DIR }}" |
238 | 251 | - | |
@@ -267,8 +280,7 @@ tasks: |
267 | 280 | REGISTRY_USERNAME: '{{ .REGISTRY_USERNAME }}' |
268 | 281 | internal: true |
269 | 282 | vars: |
270 | | - # renovate: datasource=github-tags depName=cloudnative-pg/cloudnative-pg versioning=semver extractVersion=^v(?<version>\d+\.\d+)\.\d+$ |
271 | | - CNPG_RELEASE: 1.28 |
| 283 | + CNPG_RELEASE: '{{ .CNPG_RELEASE | default .CNPG_RELEASE_DEFAULT }}' |
272 | 284 | # renovate: datasource=docker depName=alpine/kubectl versioning=docker |
273 | 285 | KUBECTL_VERSION: 1.35.3@sha256:ebf9d81d06441b3183fdc6e2dbc9f5d0db4d0464808b5bcd3c9021f54f6e65db |
274 | 286 | DOCKER_SOCKET: |
@@ -336,13 +348,15 @@ tasks: |
336 | 348 | vars: |
337 | 349 | REGISTRY_HOST: '{{ .REGISTRY_HOST | default "" }}' |
338 | 350 | REGISTRY_USERNAME: '{{ .REGISTRY_USERNAME | default "" }}' |
| 351 | + CNPG_RELEASE: '{{ .CNPG_RELEASE | default .CNPG_RELEASE_DEFAULT }}' |
339 | 352 | deps: |
340 | 353 | - e2e:start-container-registry |
341 | 354 | - e2e:start-dagger-engine |
342 | 355 | - task: e2e:install-cnpg |
343 | 356 | vars: |
344 | 357 | REGISTRY_HOST: '{{ .REGISTRY_HOST }}' |
345 | 358 | REGISTRY_USERNAME: '{{ .REGISTRY_USERNAME }}' |
| 359 | + CNPG_RELEASE: '{{ .CNPG_RELEASE }}' |
346 | 360 | cmds: |
347 | 361 | - echo -e "{{.GREEN}}--- E2E environment setup complete ---{{.NC}}" |
348 | 362 |
|
@@ -410,11 +424,13 @@ tasks: |
410 | 424 | DISTRO: '{{ .DISTRO | default "trixie" }}' |
411 | 425 | REGISTRY_HOST: '{{ .REGISTRY_HOST | default "" }}' |
412 | 426 | REGISTRY_USERNAME: '{{ .REGISTRY_USERNAME | default "" }}' |
| 427 | + CNPG_RELEASE: '{{ .CNPG_RELEASE | default .CNPG_RELEASE_DEFAULT }}' |
413 | 428 | cmds: |
414 | 429 | - task: e2e:setup-env |
415 | 430 | vars: |
416 | 431 | REGISTRY_HOST: '{{ .REGISTRY_HOST }}' |
417 | 432 | REGISTRY_USERNAME: '{{ .REGISTRY_USERNAME }}' |
| 433 | + CNPG_RELEASE: '{{ .CNPG_RELEASE }}' |
418 | 434 | - task: bake |
419 | 435 | vars: |
420 | 436 | PUSH: "true" |
|
0 commit comments