From fa25d541e23d3126f81b6a388a5d4cad7fe4ebd0 Mon Sep 17 00:00:00 2001 From: devthejo Date: Tue, 18 Jul 2023 15:52:44 +0200 Subject: [PATCH 1/2] feat: global buildkit-service enable --- plugins/contrib/jobs/build/use.yaml | 33 ++++++++++--------- .../values-compilers/06-global-defaults.js | 4 +-- .../fabrique/extends/buildkit-service.yaml | 7 ++++ 3 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 plugins/fabrique/extends/buildkit-service.yaml diff --git a/plugins/contrib/jobs/build/use.yaml b/plugins/contrib/jobs/build/use.yaml index 5ecabbb318..97416fe8bb 100644 --- a/plugins/contrib/jobs/build/use.yaml +++ b/plugins/contrib/jobs/build/use.yaml @@ -44,24 +44,25 @@ runs: buildctl_options_cache="" buildctl_options_mtls="" - if [ "{{ $.with.buildkitServiceEnabled }}" != "" ]; then - buildctl_cmd="buildctl \ - --addr {{ or $.with.buildkitServiceAddr "tcp://buildkit-service.buildkit-service.svc:1234" }} \ - " - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls="\ - --tlscacert /buildkit-certs/ca.pem \ - --tlscert /buildkit-certs/cert.pem \ - --tlskey /buildkit-certs/key.pem \ - " - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache="\ - --export-cache type=inline \ - --import-cache type=registry,ref=$IMAGE_PATH:{{ $.Values.global.branchSlug32 }} \ + {{ if (or $.with.buildkitServiceEnabled $.Values.global.buildkitServiceEnabled) }} + buildctl_cmd="buildctl \ + --addr {{ or $.with.buildkitServiceAddr "tcp://buildkit-service.buildkit-service.svc:1234" }} \ + " + if [ -f /buildkit-certs/cert.pem ]; then + buildctl_options_mtls="\ + --tlscacert /buildkit-certs/ca.pem \ + --tlscert /buildkit-certs/cert.pem \ + --tlskey /buildkit-certs/key.pem \ " fi + {{ else }} + buildctl_cmd=buildctl-daemonless.sh + buildctl_options_cache="\ + --export-cache type=inline \ + --import-cache type=registry,ref=$IMAGE_PATH:{{ $.Values.global.branchSlug32 }} \ + " + {{ end }} + mkdir -p /home/user/.docker echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /home/user/.docker/config.json export IMAGE_PATH=$CI_REGISTRY{{ if (or $.with.imageProject $.Values.global.imageProject) }}{{ (print "/" (or $.with.imageProject $.Values.global.imageProject)) }}{{ end }}/{{ or $.with.imageRepository $.Values.global.imageRepository }}{{ if $.with.imagePackage }}{{ (print "/" $.with.imagePackage) }}{{ end }}{{ if $.with.target }}{{ (print "-" $.with.target) }}{{ end }} diff --git a/plugins/contrib/values-compilers/06-global-defaults.js b/plugins/contrib/values-compilers/06-global-defaults.js index d4bb323f61..776f2a5b01 100644 --- a/plugins/contrib/values-compilers/06-global-defaults.js +++ b/plugins/contrib/values-compilers/06-global-defaults.js @@ -24,7 +24,7 @@ module.exports = async (values, options, { config, utils, ctx }) => { const { repositoryName } = config - const { registry, enableDefaultCharts = false } = options + const { registry, enableDefaultCharts = false, mergeValues = {} } = options const namespace = isProd ? repositoryName @@ -114,7 +114,7 @@ module.exports = async (values, options, { config, utils, ctx }) => { }, } - values = deepmerge({}, defaultValues, values) + values = deepmerge({}, defaultValues, values, { global: mergeValues }) return values } diff --git a/plugins/fabrique/extends/buildkit-service.yaml b/plugins/fabrique/extends/buildkit-service.yaml new file mode 100644 index 0000000000..2937d84e5c --- /dev/null +++ b/plugins/fabrique/extends/buildkit-service.yaml @@ -0,0 +1,7 @@ +dependencies: + contrib: + valuesCompilers: + globalDefaults: + options: + mergeValues: + buildkitServiceEnabled: true \ No newline at end of file From 1a1bfd7c0ae53f2d3e00601f1fa860436ea1698d Mon Sep 17 00:00:00 2001 From: devthejo Date: Tue, 18 Jul 2023 16:00:13 +0200 Subject: [PATCH 2/2] chore: up snapshots --- .../tests/__snapshots__/job-builds.dev.yaml | 48 +++------- .../__snapshots__/jobs-build-options.dev.yaml | 24 ++--- .../__snapshots__/jobs-build-stage.dev.yaml | 48 +++------- .../tests/__snapshots__/jobs-build.dev.yaml | 48 +++------- .../tests/__snapshots__/repo.domifa.dev.yaml | 96 ++++++------------- .../__snapshots__/repo.domifa.preprod.yaml | 96 ++++++------------- .../tests/__snapshots__/repo.domifa.prod.yaml | 96 ++++++------------- .../socialgouv-autodevops-override.dev.yaml | 24 ++--- .../socialgouv-autodevops.dev.yaml | 24 ++--- 9 files changed, 147 insertions(+), 357 deletions(-) diff --git a/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml b/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml index 50f6e7c014..a10bb777bf 100644 --- a/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml @@ -186,24 +186,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker @@ -376,24 +366,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker diff --git a/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml index 6595b1e4a4..8e8902be7c 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml @@ -187,24 +187,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker diff --git a/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml index a4f862c49e..e330858d81 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml @@ -483,24 +483,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker @@ -673,24 +663,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker diff --git a/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml index d258c51919..e701f52582 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml @@ -482,24 +482,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker @@ -671,24 +661,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker diff --git a/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml b/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml index bf49c6f422..8e7a8be816 100644 --- a/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml @@ -223,24 +223,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker @@ -417,24 +407,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker @@ -612,24 +592,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker @@ -803,24 +773,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker diff --git a/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml b/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml index 92ef079f1b..8504f7cf7f 100644 --- a/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml +++ b/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml @@ -221,24 +221,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker @@ -411,24 +401,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker @@ -606,24 +586,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker @@ -797,24 +767,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker diff --git a/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml b/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml index 0961218b09..a6bf55f3d4 100644 --- a/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml +++ b/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml @@ -276,24 +276,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker @@ -469,24 +459,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker @@ -664,24 +644,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker @@ -856,24 +826,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker diff --git a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml index 20abb5c832..32d5c809c0 100644 --- a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml @@ -187,24 +187,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker diff --git a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml index dfe1a1e374..55e5afa55f 100644 --- a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml @@ -187,24 +187,14 @@ spec: buildctl_options_mtls=\\"\\" - if [ \\"\\" != \\"\\" ]; then - buildctl_cmd=\\"buildctl \\\\ - --addr tcp://buildkit-service.buildkit-service.svc:1234 \\\\ - \\" - if [ -f /buildkit-certs/cert.pem ]; then - buildctl_options_mtls=\\"\\\\ - --tlscacert /buildkit-certs/ca.pem \\\\ - --tlscert /buildkit-certs/cert.pem \\\\ - --tlskey /buildkit-certs/key.pem \\\\ - \\" - fi - else - buildctl_cmd=buildctl-daemonless.sh - buildctl_options_cache=\\"\\\\ - --export-cache type=inline \\\\ - --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ + + buildctl_cmd=buildctl-daemonless.sh + + buildctl_options_cache=\\"\\\\ + --export-cache type=inline \\\\ + --import-cache type=registry,ref=$IMAGE_PATH:feature-branch-1 \\\\ \\" - fi + mkdir -p /home/user/.docker