diff --git a/examples/v1beta1/pipelineruns/pipelinerun.yaml b/examples/v1beta1/pipelineruns/pipelinerun.yaml index e650c220151..16b8dc16c39 100644 --- a/examples/v1beta1/pipelineruns/pipelinerun.yaml +++ b/examples/v1beta1/pipelineruns/pipelinerun.yaml @@ -142,7 +142,7 @@ spec: default: "" - name: BUILDER_IMAGE description: The image on which builds will run - default: gcr.io/kaniko-project/executor:v1.3.0 + default: gcr.io/kaniko-project/executor:v1.8.1 - name: baseImage description: Base image for GoogleContainerTools/skaffold microservice apps default: BASE=alpine:3.9 @@ -166,6 +166,7 @@ spec: - --destination=$(params.IMAGE) - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest - --build-arg=$(inputs.params.baseImage) + - --ignore-path=/product_uuid # TODO(abayer): Work around Kaniko multi-stage build issues on Kind: https://github.com/GoogleContainerTools/kaniko/issues/2164 # kaniko assumes it is running as root, which means this example fails on platforms # that default to run containers as random uid (like OpenShift). Adding this securityContext # makes it explicit that it needs to run as root. diff --git a/examples/v1beta1/taskruns/git-volume.yaml b/examples/v1beta1/taskruns/no-ci/git-volume.yaml similarity index 100% rename from examples/v1beta1/taskruns/git-volume.yaml rename to examples/v1beta1/taskruns/no-ci/git-volume.yaml diff --git a/test/e2e-common.sh b/test/e2e-common.sh index 78958a00eaf..585a96c0f54 100755 --- a/test/e2e-common.sh +++ b/test/e2e-common.sh @@ -20,8 +20,9 @@ source $(git rev-parse --show-toplevel)/vendor/github.com/tektoncd/plumbing/scri function install_pipeline_crd() { echo ">> Deploying Tekton Pipelines" - ko resolve -R -f config/ \ - | sed -e 's%"level": "info"%"level": "debug"%' \ + local ko_target="$(mktemp)" + ko resolve -R -f config/ > "${ko_target}" || fail_test "Pipeline image resolve failed" + cat "${ko_target}" | sed -e 's%"level": "info"%"level": "debug"%' \ | sed -e 's%loglevel.controller: "info"%loglevel.controller: "debug"%' \ | sed -e 's%loglevel.webhook: "info"%loglevel.webhook: "debug"%' \ | kubectl apply -R -f - || fail_test "Build pipeline installation failed" diff --git a/test/e2e-tests-kind-prow-alpha.env b/test/e2e-tests-kind-prow-alpha.env new file mode 100644 index 00000000000..eacb0ef5eb6 --- /dev/null +++ b/test/e2e-tests-kind-prow-alpha.env @@ -0,0 +1,6 @@ +SKIP_INITIALIZE=true +PIPELINE_FEATURE_GATE=alpha +EMBEDDED_STATUS_GATE=minimal +RUN_YAML_TESTS=true +KO_DOCKER_REPO=registry.local:5000 +E2E_GO_TEST_TIMEOUT=40m diff --git a/test/e2e-tests-kind-prow.env b/test/e2e-tests-kind-prow.env new file mode 100644 index 00000000000..ee67102137a --- /dev/null +++ b/test/e2e-tests-kind-prow.env @@ -0,0 +1,5 @@ +SKIP_INITIALIZE=true +PIPELINE_FEATURE_GATE=stable +RUN_YAML_TESTS=true +KO_DOCKER_REPO=registry.local:5000 +E2E_GO_TEST_TIMEOUT=40m diff --git a/test/e2e-tests.sh b/test/e2e-tests.sh index d202f9d2ad0..7a23a8016ee 100755 --- a/test/e2e-tests.sh +++ b/test/e2e-tests.sh @@ -25,6 +25,8 @@ PIPELINE_FEATURE_GATE=${PIPELINE_FEATURE_GATE:-stable} EMBEDDED_STATUS_GATE=${EMBEDDED_STATUS_GATE:-full} SKIP_INITIALIZE=${SKIP_INITIALIZE:="false"} RUN_YAML_TESTS=${RUN_YAML_TESTS:="true"} +SKIP_GO_E2E_TESTS=${SKIP_GO_E2E_TESTS:="false"} +E2E_GO_TEST_TIMEOUT=${E2E_GO_TEST_TIMEOUT:="20m"} failed=0 # Script entry point. @@ -66,13 +68,16 @@ function set_embedded_status() { function run_e2e() { # Run the integration tests header "Running Go e2e tests" - go_test_e2e -timeout=20m ./test/... || failed=1 + # Skip ./test/*.go tests if SKIP_GO_E2E_TESTS == true + if [ "${SKIP_GO_E2E_TESTS}" != "true" ]; then + go_test_e2e -timeout=${E2E_GO_TEST_TIMEOUT} ./test/... || failed=1 + fi # Run these _after_ the integration tests b/c they don't quite work all the way # and they cause a lot of noise in the logs, making it harder to debug integration # test failures. if [ "${RUN_YAML_TESTS}" == "true" ]; then - go_test_e2e -parallel=4 -mod=readonly -tags=examples -timeout=20m ./test/ || failed=1 + go_test_e2e -mod=readonly -tags=examples -timeout=${E2E_GO_TEST_TIMEOUT} ./test/ || failed=1 fi } diff --git a/test/yamls/v1beta1/pipelineruns/pipelinerun.yaml b/test/yamls/v1beta1/pipelineruns/pipelinerun.yaml index a7a8dfcdec9..de2d6e1b07d 100644 --- a/test/yamls/v1beta1/pipelineruns/pipelinerun.yaml +++ b/test/yamls/v1beta1/pipelineruns/pipelinerun.yaml @@ -142,7 +142,7 @@ spec: default: "" - name: BUILDER_IMAGE description: The image on which builds will run - default: gcr.io/kaniko-project/executor:v1.3.0 + default: gcr.io/kaniko-project/executor:v1.8.1 - name: baseImage description: Base image for GoogleContainerTools/skaffold microservice apps default: BASE=alpine:3.9 @@ -166,6 +166,7 @@ spec: - --destination=$(params.IMAGE) - --oci-layout-path=$(workspaces.source.path)/$(params.CONTEXT)/image-digest - --build-arg=$(inputs.params.baseImage) + - --ignore-path=/product_uuid # TODO(abayer): Work around Kaniko multi-stage build issues on Kind: https://github.com/GoogleContainerTools/kaniko/issues/2164 # kaniko assumes it is running as root, which means this example fails on platforms # that default to run containers as random uid (like OpenShift). Adding this securityContext # makes it explicit that it needs to run as root. @@ -173,6 +174,8 @@ spec: runAsUser: 0 - name: write-digest workingDir: $(workspaces.source.path) + # TODO(abayer): Using ko:// means we end up rebuilding the image, which can be annoying. Consider alternatives while ensuring + # we're always replacing the ko:// images with ones already built from our source... image: ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter # output of imagedigestexport [{"name":"image","digest":"sha256:eed29..660"}] command: ["/ko-app/imagedigestexporter"]