feat: improve API keys and build workflows
This commit is contained in:
@@ -15,6 +15,20 @@ function spec(architecture: "arm64" | "amd64"): BuildSpec {
|
||||
}
|
||||
|
||||
describe("BuildKit Job generation", () => {
|
||||
test("quotes multiple image names as one BuildKit image exporter", () => {
|
||||
const job = createBuildJob({
|
||||
name: "build-multi",
|
||||
namespace: "default",
|
||||
spec: spec("amd64"),
|
||||
workspaceClaimName: "workspace",
|
||||
cacheImage: "registry.example.com/cache/demo-web",
|
||||
pushImage: "registry.example.com/kuber/demo-web:latest",
|
||||
pushImages: ["registry.example.com/kuber/demo-worker:latest"],
|
||||
});
|
||||
expect((job.spec as any).template.spec.containers[0].args).toContain(
|
||||
'--output=type=image,"name=registry.example.com/kuber/demo-web:latest,registry.example.com/kuber/demo-worker:latest",push=true',
|
||||
);
|
||||
});
|
||||
test.each(["arm64", "amd64"] as const)(
|
||||
"generates a rootless %s job",
|
||||
(architecture) => {
|
||||
|
||||
Reference in New Issue
Block a user