diff --git a/test/e2e/customize-docker-pipeline.sh b/test/e2e/customize-docker-pipeline.sh index c5f0a03e..a328bd03 100755 --- a/test/e2e/customize-docker-pipeline.sh +++ b/test/e2e/customize-docker-pipeline.sh @@ -10,11 +10,13 @@ main() { local original_docker_build_bundle_ref # This is required in order to push the modified pipeline to local registry - kubectl port-forward -n kind-registry svc/registry-service 30001:80 & + kubectl port-forward -n kind-registry svc/registry-service 30001:443 & original_docker_build_bundle_ref=$(yq ".data[\"config.yaml\"]" konflux-ci/build-service/core/build-pipeline-config.yaml | yq ".pipelines[] | select(.name == \"docker-build\").bundle") # Remove the problematic "clair-scan" task from the docker pipeline - tkn bundle list "$original_docker_build_bundle_ref" -o yaml | yq 'del(.spec.tasks[] | select(.name == "clair-scan"))' > "/tmp/customized-docker-pipeline.yaml" - tkn bundle push "$CUSTOMIZED_DOCKER_PIPELINE_IMAGE_REF_LOCALHOST" -f "/tmp/customized-docker-pipeline.yaml" + tkn bundle list --remote-skip-tls "$original_docker_build_bundle_ref" -o yaml \ + | yq 'del(.spec.tasks[] | select(.name == "clair-scan"))' > "/tmp/customized-docker-pipeline.yaml" + tkn bundle push --remote-skip-tls "$CUSTOMIZED_DOCKER_PIPELINE_IMAGE_REF_LOCALHOST" \ + -f "/tmp/customized-docker-pipeline.yaml" # Update the bundle ref in build-service pipeline configmap sed -i "s|bundle:.*docker-build.*|bundle: ${CUSTOMIZED_DOCKER_PIPELINE_IMAGE_REF_CLUSTER}|g" konflux-ci/build-service/core/build-pipeline-config.yaml } diff --git a/test/e2e/prepare-e2e.sh b/test/e2e/prepare-e2e.sh index 40d8e60e..571025ec 100755 --- a/test/e2e/prepare-e2e.sh +++ b/test/e2e/prepare-e2e.sh @@ -19,6 +19,7 @@ main() { --from-literal webhook.secret="$app_webhook_secret"; done sed -i "s||$smee_channel|g" "${script_path}/../../smee/smee-client.yaml" kubectl create -f "${script_path}/../../smee/smee-client.yaml" + kubectl wait --for=condition=Available deployment --all -A --timeout=180s } diff --git a/test/resources/demo-users/user/managed-ns2/appstudio-pipeline-sa.yaml b/test/resources/demo-users/user/managed-ns2/appstudio-pipeline-sa.yaml index b1099133..e605cb40 100644 --- a/test/resources/demo-users/user/managed-ns2/appstudio-pipeline-sa.yaml +++ b/test/resources/demo-users/user/managed-ns2/appstudio-pipeline-sa.yaml @@ -1,5 +1,17 @@ +# Empty secret for registry that does not use authentication +apiVersion: v1 +kind: Secret +metadata: + name: regcred-empty + namespace: managed-ns2 +type: kubernetes.io/dockerconfigjson +data: + .dockerconfigjson: eyJhdXRocyI6eyJ4Ijp7ImVtYWlsIjoiIn19fQ== +--- apiVersion: v1 kind: ServiceAccount metadata: name: appstudio-pipeline namespace: managed-ns2 +secrets: +- name: regcred-empty diff --git a/test/resources/demo-users/user/ns2/appstudio-pipeline-sa.yaml b/test/resources/demo-users/user/ns2/appstudio-pipeline-sa.yaml index 1a75473f..08533158 100644 --- a/test/resources/demo-users/user/ns2/appstudio-pipeline-sa.yaml +++ b/test/resources/demo-users/user/ns2/appstudio-pipeline-sa.yaml @@ -1,8 +1,20 @@ +# Empty secret for registry that does not use authentication +apiVersion: v1 +kind: Secret +metadata: + name: regcred-empty + namespace: user-ns2 +type: kubernetes.io/dockerconfigjson +data: + .dockerconfigjson: eyJhdXRocyI6eyJ4Ijp7ImVtYWlsIjoiIn19fQ== +--- apiVersion: v1 kind: ServiceAccount metadata: name: appstudio-pipeline namespace: user-ns2 +secrets: +- name: regcred-empty --- kind: Role apiVersion: rbac.authorization.k8s.io/v1