diff --git a/test/data/v1beta1/build_multiarch_native_buildah_cr.yaml b/test/data/v1beta1/build_multiarch_native_buildah_cr.yaml index dfcc2fd30b..b5f4c7f9cd 100644 --- a/test/data/v1beta1/build_multiarch_native_buildah_cr.yaml +++ b/test/data/v1beta1/build_multiarch_native_buildah_cr.yaml @@ -1,11 +1,13 @@ --- -apiVersion: shipwright.io/v1alpha1 +apiVersion: shipwright.io/v1beta1 kind: Build metadata: name: multiarch-native-buildah-ex spec: source: - url: https://github.com/shipwright-io/sample-go + type: Git + git: + url: https://github.com/shipwright-io/sample-go contextDir: docker-build strategy: name: multiarch-native-buildah @@ -24,6 +26,7 @@ spec: # The runtime-stage-from implements the logic to replace the last stage FROM image of a Dockerfile - name: runtime-stage-from value: docker://gcr.io/distroless/static:nonroot - dockerfile: Dockerfile + - name: dockerfile + value: Dockerfile output: image: image-registry.openshift-image-registry.svc:5000/build-examples/taxi-app diff --git a/test/data/v1beta1/buildrun_multiarch_native_buildah_cr.yaml b/test/data/v1beta1/buildrun_multiarch_native_buildah_cr.yaml new file mode 100644 index 0000000000..be8229b98f --- /dev/null +++ b/test/data/v1beta1/buildrun_multiarch_native_buildah_cr.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: shipwright.io/v1beta1 +kind: BuildRun +metadata: + name: multiarch-native-buildah-ex +spec: + build: + name: multiarch-native-buildah-ex diff --git a/test/e2e/v1beta1/e2e_test.go b/test/e2e/v1beta1/e2e_test.go index 0db427e35d..573eca1494 100644 --- a/test/e2e/v1beta1/e2e_test.go +++ b/test/e2e/v1beta1/e2e_test.go @@ -475,6 +475,25 @@ var _ = Describe("For a Kubernetes cluster with Tekton and build installed", fun }) }) + Context("when a Multiarch Native Buildah build is defined", func() { + + BeforeEach(func() { + testID = generateTestID("buildah-multi-arch-native") + + // create the build definition + build = createBuild( + testBuild, + testID, + "test/data/v1beta1/build_multiarch_native_buildah_cr.yaml", + ) + }) + + It("successfully runs a build", func() { + buildRun, err = buildRunTestData(testBuild.Namespace, testID, "test/data/v1beta1/buildrun_multiarch_native_buildah_cr.yaml") + Expect(err).ToNot(HaveOccurred()) + buildRun = validateBuildRunToSucceed(testBuild, buildRun) + }) + }) Context("when a s2i build is defined", func() { BeforeEach(func() {