Skip to content

Commit

Permalink
Add env files for Kind-in-Prow integration test jobs
Browse files Browse the repository at this point in the history
The existing `test/e2e-tests-kind.env` is specifically for the `PipelineRun` approach. These new files are for running the e2e tests, via `kind`, in Prow.

There are four new env files - one for just the go e2e tests each for `stable` and `alpha`, and one for just the yaml tests each for `stable` and `alpha`.

Signed-off-by: Andrew Bayer <[email protected]>
  • Loading branch information
abayer committed Jul 5, 2022
1 parent 380dbd0 commit 6b1488a
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/v1beta1/pipelineruns/pipelinerun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
7 changes: 7 additions & 0 deletions test/e2e-tests-kind-prow-alpha-yaml.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SKIP_INITIALIZE=true
PIPELINE_FEATURE_GATE=alpha
EMBEDDED_STATUS_GATE=minimal
RUN_YAML_TESTS=true
SKIP_GO_E2E_TESTS=true
KO_DOCKER_REPO=registry.local:5000
E2E_GO_TEST_TIMEOUT=40m
6 changes: 6 additions & 0 deletions test/e2e-tests-kind-prow-alpha.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SKIP_INITIALIZE=true
PIPELINE_FEATURE_GATE=alpha
EMBEDDED_STATUS_GATE=minimal
RUN_YAML_TESTS=false
KO_DOCKER_REPO=registry.local:5000
E2E_GO_TEST_TIMEOUT=40m
6 changes: 6 additions & 0 deletions test/e2e-tests-kind-prow-yaml.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SKIP_INITIALIZE=true
PIPELINE_FEATURE_GATE=stable
RUN_YAML_TESTS=true
SKIP_GO_E2E_TESTS=true
KO_DOCKER_REPO=registry.local:5000
E2E_GO_TEST_TIMEOUT=40m
5 changes: 5 additions & 0 deletions test/e2e-tests-kind-prow.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SKIP_INITIALIZE=true
PIPELINE_FEATURE_GATE=stable
RUN_YAML_TESTS=false
KO_DOCKER_REPO=registry.local:5000
E2E_GO_TEST_TIMEOUT=40m
9 changes: 7 additions & 2 deletions test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 -parallel=4 -mod=readonly -tags=examples -timeout=${E2E_GO_TEST_TIMEOUT} ./test/ || failed=1
fi
}

Expand Down
2 changes: 1 addition & 1 deletion test/yamls/v1beta1/pipelineruns/pipelinerun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6b1488a

Please sign in to comment.