diff --git a/make/config/lib.sh b/make/config/lib.sh index 79b856dde..f599ba8cc 100644 --- a/make/config/lib.sh +++ b/make/config/lib.sh @@ -36,7 +36,18 @@ warn= wait= greencheck= redcross= -if ! printenv NO_COLOR >/dev/null; then + +should_color() { + if [[ "${CI:-}" == "true" ]]; then + return 1 + elif [[ "${NO_COLOR:-}" ]]; then + return 1 + fi + + return 0 +} + +if should_color >/dev/null; then red="\033[0;31m" green="\033[0;32m" yel="\033[0;33m" diff --git a/make/e2e-ci.sh b/make/e2e-ci.sh index f757ae7a1..dfbddb18d 100755 --- a/make/e2e-ci.sh +++ b/make/e2e-ci.sh @@ -15,5 +15,13 @@ # limitations under the License. set -o errexit + trap 'make kind-logs' EXIT -make --no-print-directory e2e FLAKE_ATTEMPTS=2 K8S_VERSION="$(K8S_VERSION)" + +# Note: We set CI here, even though it should be set by Prow, which is the cert-manager CI test runner +# See the list of defined variables here: https://docs.prow.k8s.io/docs/jobs/#job-environment-variables +# We explicitly set CI here because it helps with local testing +# (i.e. "I want to run the exact same e2e test that will be run in CI") +# and because it allows us to be explicit about where it's getting set when we call "make e2e-ci" + +make --no-print-directory e2e FLAKE_ATTEMPTS=2 CI=true K8S_VERSION="$(K8S_VERSION)" diff --git a/make/e2e.sh b/make/e2e.sh index 358781f44..9300c9397 100755 --- a/make/e2e.sh +++ b/make/e2e.sh @@ -69,12 +69,18 @@ BINDIR=${BINDIR:-$_default_bindir} # [5]: https://prow.build-infra.jetstack.net/view/gs/jetstack-logs/pr-logs/pull/cert-manager_cert-manager/4968/pull-cert-manager-make-e2e-v1-23/1507011895024947200 # [6]: https://prow.build-infra.jetstack.net/view/gs/jetstack-logs/pr-logs/pull/cert-manager_cert-manager/4968/pull-cert-manager-make-e2e-v1-23/1507019887451574272 # [7]: https://prow.build-infra.jetstack.net/view/gs/jetstack-logs/pr-logs/pull/cert-manager_cert-manager/4968/pull-cert-manager-make-e2e-v1-23/1507040653668782080 + nodes=20 + flake_attempts=1 + ginkgo_skip= ginkgo_focus= + feature_gates=AdditionalCertificateOutputFormats=true,ExperimentalCertificateSigningRequestControllers=true,ExperimentalGatewayAPISupport=true,LiteralCertificateSubject=true + artifacts="./$BINDIR/artifacts" + help() { cat <