Skip to content

Commit

Permalink
fix: buildkit frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
devthejo committed Sep 24, 2024
1 parent 66aa853 commit 55fb9ed
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 46 deletions.
6 changes: 2 additions & 4 deletions packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \\\\
Expand Down Expand Up @@ -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 \\\\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \\\\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \\\\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \\\\
Expand Down Expand Up @@ -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 \\\\
Expand Down
6 changes: 2 additions & 4 deletions packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \\\\
Expand Down Expand Up @@ -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 \\\\
Expand Down
12 changes: 4 additions & 8 deletions packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \\\\
Expand Down Expand Up @@ -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 \\\\
Expand Down Expand Up @@ -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 \\\\
Expand Down Expand Up @@ -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 \\\\
Expand Down
12 changes: 4 additions & 8 deletions packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \\\\
Expand Down Expand Up @@ -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 \\\\
Expand Down Expand Up @@ -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 \\\\
Expand Down Expand Up @@ -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 \\\\
Expand Down
12 changes: 4 additions & 8 deletions packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \\\\
Expand Down Expand Up @@ -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 \\\\
Expand Down Expand Up @@ -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 \\\\
Expand Down Expand Up @@ -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 \\\\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \\\\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \\\\
Expand Down
3 changes: 1 addition & 2 deletions plugins/contrib/jobs/build/use.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }} \
Expand Down

0 comments on commit 55fb9ed

Please sign in to comment.