Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding power (ppc64le) architecture image mappings #3630

Merged
merged 1 commit into from
Feb 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 52 additions & 11 deletions test/multiarch_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ func getTestArch() string {

// initImageNames returns the map with arch dependent image names for e2e tests
func initImageNames() map[int]string {
if getTestArch() == "s390x" {
switch getTestArch() {
case "s390x":
return map[int]string{
busyboxImage: "busybox@sha256:4f47c01fa91355af2865ac10fef5bf6ec9c7f42ad2321377c21e844427972977",
registryImage: "ibmcom/registry:2.6.2.5",
Expand All @@ -71,14 +72,24 @@ func initImageNames() map[int]string {
kanikoImage: "gcr.io/kaniko-project/executor:s390x-9ed158c1f63a059cde4fd5f8b95af51d452d9aa7",
dockerizeImage: "ibmcom/dockerize-s390x",
}
}
return map[int]string{
busyboxImage: "busybox@sha256:895ab622e92e18d6b461d671081757af7dbaa3b00e3e28e12505af7817f73649",
registryImage: "registry",
kubectlImage: "lachlanevenson/k8s-kubectl",
helmImage: "alpine/helm:3.1.2",
kanikoImage: "gcr.io/kaniko-project/executor:v1.3.0",
dockerizeImage: "jwilder/dockerize",
case "ppc64le":
return map[int]string{
busyboxImage: "busybox@sha256:4f47c01fa91355af2865ac10fef5bf6ec9c7f42ad2321377c21e844427972977",
registryImage: "ppc64le/registry:2",
kubectlImage: "ibmcom/kubectl:v1.13.9",
helmImage: "ibmcom/helm-ppc64le:latest",
kanikoImage: "ibmcom/kaniko-project-executor-ppc64le:v0.17.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any possibility of having ppc64le support in the official kaniko images? They recently started publishing multiarch images, so it shouldn't be too difficult to add unless I'm missing something

dockerizeImage: "ibmcom/dockerize-ppc64le",
}
default:
return map[int]string{
busyboxImage: "busybox@sha256:895ab622e92e18d6b461d671081757af7dbaa3b00e3e28e12505af7817f73649",
registryImage: "registry",
kubectlImage: "lachlanevenson/k8s-kubectl",
helmImage: "alpine/helm:3.1.2",
kanikoImage: "gcr.io/kaniko-project/executor:v1.3.0",
dockerizeImage: "jwilder/dockerize",
}
}
}

Expand All @@ -98,7 +109,9 @@ func getImagesMappingRE() map[*regexp.Regexp][]byte {
// imageNamesMapping provides mapping between image name in the examples yaml files and desired image name for specific arch.
// by default empty map is returned.
func imageNamesMapping() map[string]string {
if getTestArch() == "s390x" {

switch getTestArch() {
case "s390x":
return map[string]string{
"registry": getTestImage(registryImage),
"node": "node:alpine3.11",
Expand All @@ -110,14 +123,41 @@ func imageNamesMapping() map[string]string {
"stedolan/jq": "ibmcom/jq-s390x:latest",
"gcr.io/kaniko-project/executor:v1.3.0": getTestImage(kanikoImage),
}
case "ppc64le":
return map[string]string{
"registry": getTestImage(registryImage),
"node": "node:alpine3.11",
"lachlanevenson/k8s-kubectl": getTestImage(kubectlImage),
"gcr.io/cloud-builders/git": "alpine/git:latest",
"docker:dind": "ibmcom/docker-ppc64le:19.03-dind",
"docker": "docker:18.06.3",
"mikefarah/yq:3": "danielxlee/yq:2.4.0",
"stedolan/jq": "ibmcom/jq-ppc64le:latest",
"gcr.io/kaniko-project/executor:v1.3.0": getTestImage(kanikoImage),
}

}

return make(map[string]string)
}

// initExcludedTests provides list of excluded tests for e2e and exanples tests
func initExcludedTests() sets.String {
if getTestArch() == "s390x" {

switch getTestArch() {
case "s390x":
return sets.NewString(
//examples
"TestExamples/v1alpha1/taskruns/build-gcs-targz",
"TestExamples/v1beta1/taskruns/build-gcs-targz",
"TestExamples/v1beta1/taskruns/build-gcs-zip",
"TestExamples/v1alpha1/taskruns/build-gcs-zip",
"TestExamples/v1alpha1/taskruns/gcs-resource",
"TestExamples/v1beta1/taskruns/gcs-resource",
"TestExamples/v1beta1/pipelineruns/pipelinerun",
"TestYamls/yamls/v1beta1/pipelineruns/pipelinerun.yaml",
)
case "ppc64le":
return sets.NewString(
//examples
"TestExamples/v1alpha1/taskruns/build-gcs-targz",
Expand All @@ -130,6 +170,7 @@ func initExcludedTests() sets.String {
"TestYamls/yamls/v1beta1/pipelineruns/pipelinerun.yaml",
)
}

return sets.NewString()
}

Expand Down