From dda4fe7242939fd1e05f38b20b33ec32603e7646 Mon Sep 17 00:00:00 2001 From: Yulia Gaponenko Date: Fri, 13 Nov 2020 15:41:20 +0100 Subject: [PATCH] Refresh list of s390x excluded test - unify amd64 kaniko image name and use available one for s390x - use latest alpine-git-nonroot dogfooding image (multi-arch) - add several specific images to use for tests on s390x architecture Signed-off-by: Yulia Gaponenko --- .../pipelineruns/demo-optional-resources.yaml | 2 +- .../v1alpha1/pipelineruns/pipelinerun.yaml | 2 +- .../v1alpha1/taskruns/build-push-kaniko.yaml | 2 +- .../pipelineruns/demo-optional-resources.yaml | 2 +- .../v1beta1/pipelineruns/pipelinerun.yaml | 2 +- .../taskruns/authenticating-git-commands.yaml | 2 +- test/helm_task_test.go | 6 ++-- test/kaniko_task_test.go | 2 +- test/multiarch_utils.go | 32 +++++++++++-------- test/v1alpha1/kaniko_task_test.go | 2 +- 10 files changed, 29 insertions(+), 25 deletions(-) diff --git a/examples/v1alpha1/pipelineruns/demo-optional-resources.yaml b/examples/v1alpha1/pipelineruns/demo-optional-resources.yaml index e584453a58f..3c01317b876 100644 --- a/examples/v1alpha1/pipelineruns/demo-optional-resources.yaml +++ b/examples/v1alpha1/pipelineruns/demo-optional-resources.yaml @@ -49,7 +49,7 @@ spec: optional: true steps: - name: build-an-image - image: "gcr.io/kaniko-project/executor:latest" + image: gcr.io/kaniko-project/executor:v1.3.0 command: - /kaniko/executor args: diff --git a/examples/v1alpha1/pipelineruns/pipelinerun.yaml b/examples/v1alpha1/pipelineruns/pipelinerun.yaml index ad5ec814fbf..61b92b57c5f 100644 --- a/examples/v1alpha1/pipelineruns/pipelinerun.yaml +++ b/examples/v1alpha1/pipelineruns/pipelinerun.yaml @@ -92,7 +92,7 @@ spec: type: image steps: - name: build-and-push - image: gcr.io/kaniko-project/executor:v0.17.1 + image: gcr.io/kaniko-project/executor:v1.3.0 # specifying DOCKER_CONFIG is required to allow kaniko to detect docker credential env: - name: "DOCKER_CONFIG" diff --git a/examples/v1alpha1/taskruns/build-push-kaniko.yaml b/examples/v1alpha1/taskruns/build-push-kaniko.yaml index f17f7d2ec01..fe01ed47397 100644 --- a/examples/v1alpha1/taskruns/build-push-kaniko.yaml +++ b/examples/v1alpha1/taskruns/build-push-kaniko.yaml @@ -43,7 +43,7 @@ spec: type: image steps: - name: build-and-push - image: gcr.io/kaniko-project/executor:v0.17.1 + image: gcr.io/kaniko-project/executor:v1.3.0 # specifying DOCKER_CONFIG is required to allow kaniko to detect docker credential env: - name: "DOCKER_CONFIG" diff --git a/examples/v1beta1/pipelineruns/demo-optional-resources.yaml b/examples/v1beta1/pipelineruns/demo-optional-resources.yaml index 1710af07433..901c9b545d6 100644 --- a/examples/v1beta1/pipelineruns/demo-optional-resources.yaml +++ b/examples/v1beta1/pipelineruns/demo-optional-resources.yaml @@ -51,7 +51,7 @@ spec: optional: true steps: - name: build-an-image - image: "gcr.io/kaniko-project/executor:latest" + image: gcr.io/kaniko-project/executor:v1.3.0 command: - /kaniko/executor args: diff --git a/examples/v1beta1/pipelineruns/pipelinerun.yaml b/examples/v1beta1/pipelineruns/pipelinerun.yaml index 878f307573d..aa0729a4f41 100644 --- a/examples/v1beta1/pipelineruns/pipelinerun.yaml +++ b/examples/v1beta1/pipelineruns/pipelinerun.yaml @@ -140,7 +140,7 @@ spec: default: "" - name: BUILDER_IMAGE description: The image on which builds will run - default: gcr.io/kaniko-project/executor:latest + default: gcr.io/kaniko-project/executor:v1.3.0 results: - name: IMAGE_DIGEST description: Digest of the image just built. diff --git a/examples/v1beta1/taskruns/authenticating-git-commands.yaml b/examples/v1beta1/taskruns/authenticating-git-commands.yaml index 5f3367fb3ba..b2d70da5e92 100644 --- a/examples/v1beta1/taskruns/authenticating-git-commands.yaml +++ b/examples/v1beta1/taskruns/authenticating-git-commands.yaml @@ -165,7 +165,7 @@ spec: git commit -m "Test commit!" git push origin master - name: git-clone-and-check - image: gcr.io/tekton-releases/dogfooding/alpine-git-nonroot:mario + image: gcr.io/tekton-releases/dogfooding/alpine-git-nonroot:latest # Because this Step runs with a non-root security context, the creds-init # credentials will fail to copy into /tekton/home. This happens because # our previous step _already_ wrote to /tekton/home and ran as a root diff --git a/test/helm_task_test.go b/test/helm_task_test.go index e881ef38598..937dac8ea58 100644 --- a/test/helm_task_test.go +++ b/test/helm_task_test.go @@ -138,7 +138,7 @@ func getCreateImageTask(namespace, createImageTaskName string) *v1beta1.Task { }, Steps: []v1beta1.Step{{Container: corev1.Container{ Name: "kaniko", - Image: "gcr.io/kaniko-project/executor:v0.17.1", + Image: getTestImage(kanikoImage), Args: []string{ "--dockerfile=/workspace/gitsource/test/gohelloworld/Dockerfile", "--context=/workspace/gitsource/", @@ -167,7 +167,7 @@ func getHelmDeployTask(namespace, helmDeployTaskName string) *v1beta1.Task { Name: "chartname", Type: v1beta1.ParamTypeString, Default: &empty, }}, Steps: []v1beta1.Step{{Container: corev1.Container{ - Image: "alpine/helm:3.1.2", + Image: getTestImage(helmImage), Args: []string{ "upgrade", "--wait", @@ -328,7 +328,7 @@ func removeAllHelmReleases(ctx context.Context, c *clients, t *testing.T, namesp Spec: v1beta1.TaskSpec{ Steps: []v1beta1.Step{{Container: corev1.Container{ Name: "helm-remove-all", - Image: "alpine/helm:3.1.2", + Image: getTestImage(helmImage), Command: []string{"/bin/sh"}, Args: []string{"-c", fmt.Sprintf("helm ls --short --all --namespace %s | xargs -n1 helm delete --namespace %s", namespace, namespace)}, }}}, diff --git a/test/kaniko_task_test.go b/test/kaniko_task_test.go index 91b86655d0d..4f7fa889d76 100644 --- a/test/kaniko_task_test.go +++ b/test/kaniko_task_test.go @@ -163,7 +163,7 @@ func getTask(repo, namespace string) *v1beta1.Task { }, Steps: []v1beta1.Step{{Container: corev1.Container{ Name: "kaniko", - Image: "gcr.io/kaniko-project/executor:v0.17.1", + Image: getTestImage(kanikoImage), Args: []string{ "--dockerfile=/workspace/gitsource/integration/dockerfiles/Dockerfile_test_label", fmt.Sprintf("--destination=%s", repo), diff --git a/test/multiarch_utils.go b/test/multiarch_utils.go index fc0c548d69f..59097701837 100644 --- a/test/multiarch_utils.go +++ b/test/multiarch_utils.go @@ -38,6 +38,10 @@ const ( registryImage //kubectl image kubectlImage + //helm image + helmImage + //kaniko executor image + kanikoImage ) func init() { @@ -61,12 +65,16 @@ func initImageNames() map[int]string { busyboxImage: "busybox@sha256:4f47c01fa91355af2865ac10fef5bf6ec9c7f42ad2321377c21e844427972977", registryImage: "ibmcom/registry:2.6.2.5", kubectlImage: "ibmcom/kubectl:v1.13.9", + helmImage: "ibmcom/alpine-helm-s390x:latest", + kanikoImage: "gcr.io/kaniko-project/executor:s390x-9ed158c1f63a059cde4fd5f8b95af51d452d9aa7", } } 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", } } @@ -88,10 +96,15 @@ func getImagesMappingRE() map[*regexp.Regexp][]byte { func imageNamesMapping() map[string]string { if getTestArch() == "s390x" { return map[string]string{ - "registry": getTestImage(registryImage), - "node": "node:alpine3.11", - "lachlanevenson/k8s-kubectl": getTestImage(kubectlImage), - "gcr.io/cloud-builders/git": "alpine/git:latest", + "registry": getTestImage(registryImage), + "node": "node:alpine3.11", + "lachlanevenson/k8s-kubectl": getTestImage(kubectlImage), + "gcr.io/cloud-builders/git": "alpine/git:latest", + "docker:dind": "ibmcom/docker-s390x:dind", + "docker": "docker:18.06.3", + "mikefarah/yq": "danielxlee/yq:2.4.0", + "stedolan/jq": "ibmcom/jq-s390x:latest", + "gcr.io/kaniko-project/executor:v1.3.0": getTestImage(kanikoImage), } } @@ -103,24 +116,15 @@ func initExcludedTests() sets.String { if getTestArch() == "s390x" { return sets.NewString( //examples - "TestExamples/v1alpha1/taskruns/dind-sidecar", - "TestExamples/v1beta1/taskruns/dind-sidecar", "TestExamples/v1alpha1/taskruns/build-gcs-targz", "TestExamples/v1beta1/taskruns/build-gcs-targz", - "TestExamples/v1alpha1/taskruns/build-push-kaniko", - "TestExamples/v1alpha1/pipelineruns/pipelinerun", - "TestExamples/v1beta1/pipelineruns/pipelinerun", "TestExamples/v1beta1/taskruns/build-gcs-zip", "TestExamples/v1alpha1/taskruns/build-gcs-zip", - "TestExamples/v1beta1/taskruns/docker-creds", - "TestExamples/v1alpha1/taskruns/docker-creds", "TestExamples/v1alpha1/taskruns/gcs-resource", "TestExamples/v1beta1/taskruns/gcs-resource", - "TestExamples/v1beta1/taskruns/authenticating-git-commands", - "TestExamples/v1beta1/taskruns/workspace-in-sidecar", + "TestExamples/v1beta1/pipelineruns/pipelinerun", //e2e "TestHelmDeployPipelineRun", - "TestKanikoTaskRun", ) } return sets.NewString() diff --git a/test/v1alpha1/kaniko_task_test.go b/test/v1alpha1/kaniko_task_test.go index 92fb76ffd99..a2359db60df 100644 --- a/test/v1alpha1/kaniko_task_test.go +++ b/test/v1alpha1/kaniko_task_test.go @@ -161,7 +161,7 @@ func getTask(repo, namespace string) *v1alpha1.Task { ), tb.StepSecurityContext(&corev1.SecurityContext{RunAsUser: &root}), } - step := tb.Step("gcr.io/kaniko-project/executor:v0.17.1", stepOps...) + step := tb.Step("gcr.io/kaniko-project/executor:v1.3.0", stepOps...) taskSpecOps = append(taskSpecOps, step) sidecar := tb.Sidecar("registry", "registry") taskSpecOps = append(taskSpecOps, sidecar)