Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jenkins: Run slow tests for Trusty in dedicated jobs #17465

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
57 changes: 51 additions & 6 deletions hack/jenkins/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ TRUSTY_IMAGE_PROJECT="${TRUSTY_IMAGE_PROJECT:-}"

# Get the latest Trusty image for a Jenkins job.
function get_latest_trusty_image() {
local image_index="${1:-${JOB_NAME}}"
local job_name="${1:-${JOB_NAME}}"
local image_index=""
if [[ "${job_name}" =~ trusty-beta ]]; then
image_index="trusty-beta"
elif [[ "${job_name}" =~ trusty ]]; then
image_index="trusty"
fi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why cannot we use the same test image for both jobs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because they are testing different versions of the image.

gsutil cat "gs://${TRUSTY_IMAGE_PROJECT}/image-indices/latest-test-image-${image_index}"
# Clean up gsutil artifacts otherwise the later test stage will complain.
rm -rf .config &> /dev/null
Expand Down Expand Up @@ -525,6 +531,7 @@ case ${JOB_NAME} in
${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \
${GCE_RELEASE_SKIP_TESTS[@]:+${GCE_RELEASE_SKIP_TESTS[@]}} \
${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \
${GCE_SLOW_TESTS[@]:+${GCE_SLOW_TESTS[@]}} \
${TRUSTY_SKIP_TESTS[@]:+${TRUSTY_SKIP_TESTS[@]}} \
)"}
: ${KUBE_GCE_INSTANCE_PREFIX="e2e-gce"}
Expand All @@ -533,21 +540,39 @@ case ${JOB_NAME} in
: ${KUBE_GCE_MINION_IMAGE:="$(get_latest_trusty_image ${JOB_NAME})"}
: ${KUBE_OS_DISTRIBUTION:="trusty"}
: ${ENABLE_CLUSTER_REGISTRY:=false}
# Ideally we would pin to the latest release version but since 1.1 is not
# out, we use the latest build number from the CI job.
: ${JENKINS_EXPLICIT_VERSION:="release/v1.1.1"}
;;

# Runs slow tests on GCE with Trusy as base image for minions, sequentially.
kubernetes-e2e-gce-trusty-slow)
: ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-trusty-slow"}
: ${E2E_NETWORK:="e2e-gce-trusty-slow"}
: ${GINKGO_TEST_ARGS:="--ginkgo.focus=$(join_regex_no_empty \
${GCE_SLOW_TESTS[@]:+${GCE_SLOW_TESTS[@]}} \
) --ginkgo.skip=$(join_regex_allow_empty \
${TRUSTY_SKIP_TESTS[@]:+${TRUSTY_SKIP_TESTS[@]}} \
)"}
: ${KUBE_GCE_INSTANCE_PREFIX="e2e-trusty-slow"}
: ${PROJECT:="k8s-e2e-gce-trusty-slow"}
: ${KUBE_GCE_MINION_PROJECT:="${TRUSTY_IMAGE_PROJECT}"}
: ${KUBE_GCE_MINION_IMAGE:="$(get_latest_trusty_image ${JOB_NAME})"}
: ${KUBE_OS_DISTRIBUTION:="trusty"}
: ${ENABLE_CLUSTER_REGISTRY:=false}
: ${JENKINS_EXPLICIT_VERSION:="release/v1.1.1"}
: ${FAIL_ON_GCP_RESOURCE_LEAK:="true"}
;;

# Runs non-flaky tests on GCE with Trusty-beta as base image for minions,
# sequentially.
kubernetes-e2e-gce-trusty-release-beta)
: ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-trusty-release-beta"}
kubernetes-e2e-gce-trusty-beta-release)
: ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-trusty-beta-release"}
: ${E2E_DOWN:="false"}
: ${E2E_NETWORK:="e2e-gce-trusty-release-beta"}
: ${E2E_NETWORK:="e2e-gce-trusty-beta-release"}
: ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \
${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \
${GCE_RELEASE_SKIP_TESTS[@]:+${GCE_RELEASE_SKIP_TESTS[@]}} \
${GCE_FLAKY_TESTS[@]:+${GCE_FLAKY_TESTS[@]}} \
${GCE_SLOW_TESTS[@]:+${GCE_SLOW_TESTS[@]}} \
${TRUSTY_SKIP_TESTS[@]:+${TRUSTY_SKIP_TESTS[@]}} \
)"}
: ${KUBE_GCE_INSTANCE_PREFIX="e2e-gce"}
Expand All @@ -559,6 +584,26 @@ case ${JOB_NAME} in
: ${JENKINS_EXPLICIT_VERSION:="release/v1.1.1"}
;;

# Runs slow tests on GCE with Trusy-beta as base image for minions,
# sequentially.
kubernetes-e2e-gce-trusty-beta-slow)
: ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-trusty-beta-slow"}
: ${E2E_NETWORK:="e2e-gce-trusty-beta-slow"}
: ${GINKGO_TEST_ARGS:="--ginkgo.focus=$(join_regex_no_empty \
${GCE_SLOW_TESTS[@]:+${GCE_SLOW_TESTS[@]}} \
) --ginkgo.skip=$(join_regex_allow_empty \
${TRUSTY_SKIP_TESTS[@]:+${TRUSTY_SKIP_TESTS[@]}} \
)"}
: ${KUBE_GCE_INSTANCE_PREFIX="e2e-trusty-beta-slow"}
: ${PROJECT:="k8s-e2e-gce-trusty-beta-slow"}
: ${KUBE_GCE_MINION_PROJECT:="${TRUSTY_IMAGE_PROJECT}"}
: ${KUBE_GCE_MINION_IMAGE:="$(get_latest_trusty_image ${JOB_NAME})"}
: ${KUBE_OS_DISTRIBUTION:="trusty"}
: ${ENABLE_CLUSTER_REGISTRY:=false}
: ${JENKINS_EXPLICIT_VERSION:="release/v1.1.1"}
: ${FAIL_ON_GCP_RESOURCE_LEAK:="true"}
;;

# Runs non-flaky tests on GCE on the release candidate branch,
# sequentially. As a reminder, if you need to change the skip list
# or flaky test list on the release branch, you'll need to propose a
Expand Down