From 55fb9ed9b1da50af03cb85e6a6f2becd1f2b1296 Mon Sep 17 00:00:00 2001 From: devthejo Date: Tue, 24 Sep 2024 10:41:10 +0200 Subject: [PATCH] fix: buildkit frontend --- .../tests/__snapshots__/job-builds.dev.yaml | 6 ++---- .../tests/__snapshots__/job-no-affinity.dev.yaml | 3 +-- .../tests/__snapshots__/jobs-build-options.dev.yaml | 3 +-- .../tests/__snapshots__/jobs-build-stage.dev.yaml | 6 ++---- .../tests/__snapshots__/jobs-build.dev.yaml | 6 ++---- .../tests/__snapshots__/repo.domifa.dev.yaml | 12 ++++-------- .../tests/__snapshots__/repo.domifa.preprod.yaml | 12 ++++-------- .../tests/__snapshots__/repo.domifa.prod.yaml | 12 ++++-------- .../socialgouv-autodevops-override.dev.yaml | 3 +-- .../__snapshots__/socialgouv-autodevops.dev.yaml | 3 +-- plugins/contrib/jobs/build/use.yaml | 3 +-- 11 files changed, 23 insertions(+), 46 deletions(-) diff --git a/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml b/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml index e97240d47..17b8d17cf 100644 --- a/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml @@ -262,8 +262,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./Dockerfile \\\\ @@ -542,8 +541,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace//packages/hasura \\\\ --local dockerfile=/workspace/packages/hasura \\\\ --opt filename=./Dockerfile \\\\ diff --git a/packages/kontinuous/tests/__snapshots__/job-no-affinity.dev.yaml b/packages/kontinuous/tests/__snapshots__/job-no-affinity.dev.yaml index 003b967d8..3697a1e76 100644 --- a/packages/kontinuous/tests/__snapshots__/job-no-affinity.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/job-no-affinity.dev.yaml @@ -262,8 +262,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./Dockerfile \\\\ diff --git a/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml index d707fd334..15c70cfe9 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml @@ -263,8 +263,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./Dockerfile \\\\ diff --git a/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml index 6bd76411b..684d179a1 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml @@ -571,8 +571,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./Dockerfile \\\\ @@ -851,8 +850,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace//hasura \\\\ --local dockerfile=/workspace/hasura \\\\ --opt filename=./Dockerfile \\\\ diff --git a/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml index ea9488504..0326bf13b 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml @@ -570,8 +570,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./Dockerfile \\\\ @@ -849,8 +848,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace//hasura \\\\ --local dockerfile=/workspace/hasura \\\\ --opt filename=./Dockerfile \\\\ diff --git a/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml b/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml index 327567755..997d14984 100644 --- a/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml @@ -299,8 +299,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./packages/backend/Dockerfile \\\\ @@ -583,8 +582,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./packages/frontend/Dockerfile \\\\ @@ -868,8 +866,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./packages/portail-admins/Dockerfile \\\\ @@ -1149,8 +1146,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./packages/portail-usagers/Dockerfile \\\\ diff --git a/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml b/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml index ffebb5063..1b421fe3a 100644 --- a/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml +++ b/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml @@ -298,8 +298,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./packages/backend/Dockerfile \\\\ @@ -578,8 +577,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./packages/frontend/Dockerfile \\\\ @@ -863,8 +861,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./packages/portail-admins/Dockerfile \\\\ @@ -1144,8 +1141,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./packages/portail-usagers/Dockerfile \\\\ diff --git a/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml b/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml index cce6f5876..fbc3c60b4 100644 --- a/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml +++ b/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml @@ -296,8 +296,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./packages/backend/Dockerfile \\\\ @@ -579,8 +578,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./packages/frontend/Dockerfile \\\\ @@ -864,8 +862,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./packages/portail-admins/Dockerfile \\\\ @@ -1146,8 +1143,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./packages/portail-usagers/Dockerfile \\\\ diff --git a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml index 1c12f58d0..15d5662ae 100644 --- a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml @@ -263,8 +263,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./Dockerfile \\\\ diff --git a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml index a901133f1..1a204738a 100644 --- a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml @@ -263,8 +263,7 @@ spec: $buildctl_cmd \\\\ $buildctl_options_mtls \\\\ build \\\\ - --frontend gateway.v0 \\\\ - --opt source=docker/dockerfile:1 \\\\ + --frontend dockerfile.v0 \\\\ --local context=/workspace/ \\\\ --local dockerfile=/workspace \\\\ --opt filename=./Dockerfile \\\\ diff --git a/plugins/contrib/jobs/build/use.yaml b/plugins/contrib/jobs/build/use.yaml index bb2702ff8..3ebeba122 100644 --- a/plugins/contrib/jobs/build/use.yaml +++ b/plugins/contrib/jobs/build/use.yaml @@ -116,8 +116,7 @@ runs: $buildctl_cmd \ $buildctl_options_mtls \ build \ - --frontend gateway.v0 \ - --opt source=docker/dockerfile:1 \ + --frontend dockerfile.v0 \ --local context=/workspace/{{ if $.with.context }}/{{ $.with.context }}{{ end }} \ --local dockerfile=/workspace{{ if $.with.context }}/{{ $.with.context }}{{ end }} \ --opt filename=./{{ or $.with.dockerfile "Dockerfile" }} \