Skip to content

Commit

Permalink
[Test] Native multi-arch ClusterBuildStrategy
Browse files Browse the repository at this point in the history
  • Loading branch information
aleskandro committed Jul 30, 2024
1 parent b04198f commit 475255a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/data/v1beta1/build_multiarch_native_buildah_cr.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
8 changes: 8 additions & 0 deletions test/data/v1beta1/buildrun_multiarch_native_buildah_cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: shipwright.io/v1beta1
kind: BuildRun
metadata:
name: multiarch-native-buildah-ex
spec:
build:
name: multiarch-native-buildah-ex
19 changes: 19 additions & 0 deletions test/e2e/v1beta1/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 475255a

Please sign in to comment.