chore: make default pipeline run shorter integration test

This moves full integratation test and provision tests to
the `integration` pipeline.

Docker test wasn't affected much, as anyways docker can't run long
integration tests, so it mostly affects firecracker and provision tests.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
This commit is contained in:
Andrey Smirnov 2020-06-25 22:56:59 +03:00 committed by Andrey Smirnov
parent 81d1c2bfe7
commit e46a09f56a
4 changed files with 769 additions and 376 deletions

1085
.drone.yml

File diff suppressed because it is too large Load Diff

View File

@ -20,6 +20,7 @@ SONOBUOY_VERSION ?= 0.18.2
SONOBUOY_URL ?= https://github.com/heptio/sonobuoy/releases/download/v$(SONOBUOY_VERSION)/sonobuoy_$(SONOBUOY_VERSION)_$(OPERATING_SYSTEM)_amd64.tar.gz
TESTPKGS ?= ./...
RELEASES ?= v0.5.0 v0.6.0-alpha.1
SHORT_INTEGRATION_TEST ?=
BUILD := docker buildx build
PLATFORM ?= linux/amd64
@ -206,6 +207,7 @@ e2e-%: $(ARTIFACTS)/$(INTEGRATION_TEST_DEFAULT_TARGET)-amd64 $(ARTIFACTS)/sonobu
ARTIFACTS=$(ARTIFACTS) \
TALOSCTL=$(PWD)/$(ARTIFACTS)/$(TALOSCTL_DEFAULT_TARGET)-amd64 \
INTEGRATION_TEST=$(PWD)/$(ARTIFACTS)/$(INTEGRATION_TEST_DEFAULT_TARGET)-amd64 \
SHORT_INTEGRATION_TEST=$(SHORT_INTEGRATION_TEST) \
KUBECTL=$(PWD)/$(ARTIFACTS)/kubectl \
SONOBUOY=$(PWD)/$(ARTIFACTS)/sonobuoy \
CLUSTERCTL=$(PWD)/$(ARTIFACTS)/clusterctl

View File

@ -195,11 +195,8 @@ local image_vmware = Step("image-vmware", depends_on=[image_gcp]);
local push_local = Step("push-local", depends_on=[installer_local, talos_local], target="push", environment={"REGISTRY": local_registry, "DOCKER_LOGIN_ENABLED": "false"} );
local unit_tests = Step("unit-tests", depends_on=[initramfs]);
local unit_tests_race = Step("unit-tests-race", depends_on=[initramfs]);
local e2e_docker = Step("e2e-docker", depends_on=[talos, osctl_linux], extra_volumes=[volumes.tmp.step]);
local e2e_firecracker = Step("e2e-firecracker", privileged=true, depends_on=[initramfs, osctl_linux, kernel, push_local], environment={"REGISTRY": local_registry, "FIRECRACKER_GO_SDK_REQUEST_TIMEOUT_MILLISECONDS": "2000"});
local provision_tests_prepare = Step("provision-tests-prepare", privileged=true, depends_on=[initramfs, osctl_linux, kernel, push_local], environment={"REGISTRY": local_registry});
local provision_tests_track_0 = Step("provision-tests-track-0", privileged=true, depends_on=[provision_tests_prepare], environment={"REGISTRY": local_registry, "FIRECRACKER_GO_SDK_REQUEST_TIMEOUT_MILLISECONDS": "2000"});
local provision_tests_track_1 = Step("provision-tests-track-1", privileged=true, depends_on=[provision_tests_prepare], environment={"REGISTRY": local_registry, "FIRECRACKER_GO_SDK_REQUEST_TIMEOUT_MILLISECONDS": "2000"});
local e2e_docker = Step("e2e-docker-short", depends_on=[talos, osctl_linux], target="e2e-docker", environment={"SHORT_INTEGRATION_TEST": "yes"}, extra_volumes=[volumes.tmp.step]);
local e2e_firecracker = Step("e2e-firecracker-short", privileged=true, target="e2e-firecracker", depends_on=[initramfs, osctl_linux, kernel, push_local], environment={"REGISTRY": local_registry, "FIRECRACKER_GO_SDK_REQUEST_TIMEOUT_MILLISECONDS": "2000", "SHORT_INTEGRATION_TEST": "yes"});
local coverage = {
name: 'coverage',
@ -287,9 +284,6 @@ local default_steps = [
push_local,
e2e_docker,
e2e_firecracker,
provision_tests_prepare,
provision_tests_track_0,
provision_tests_track_1,
push,
push_latest,
];
@ -310,6 +304,31 @@ local default_trigger = {
local default_pipeline = Pipeline('default', default_steps) + default_trigger;
// Full integration pipeline.
local integration_firecracker = Step("e2e-firecracker", privileged=true, depends_on=[e2e_firecracker], environment={"REGISTRY": local_registry, "FIRECRACKER_GO_SDK_REQUEST_TIMEOUT_MILLISECONDS": "2000"});
local integration_provision_tests_prepare = Step("provision-tests-prepare", privileged=true, depends_on=[e2e_firecracker, push_local], environment={"REGISTRY": local_registry});
local integration_provision_tests_track_0 = Step("provision-tests-track-0", privileged=true, depends_on=[integration_provision_tests_prepare], environment={"REGISTRY": local_registry, "FIRECRACKER_GO_SDK_REQUEST_TIMEOUT_MILLISECONDS": "2000"});
local integration_provision_tests_track_1 = Step("provision-tests-track-1", privileged=true, depends_on=[integration_provision_tests_prepare], environment={"REGISTRY": local_registry, "FIRECRACKER_GO_SDK_REQUEST_TIMEOUT_MILLISECONDS": "2000"});
local integration_steps = default_steps + [
integration_firecracker,
integration_provision_tests_prepare,
integration_provision_tests_track_0,
integration_provision_tests_track_1,
];
local integration_trigger = {
trigger: {
target: {
include: ['integration'],
},
},
};
local integration_pipeline = Pipeline('integration', integration_steps) + integration_trigger;
// E2E pipeline.
local creds_env_vars = {
@ -496,6 +515,7 @@ local notify_pipeline = Pipeline('notify', notify_steps, [default_pipeline, e2e_
[
secret,
default_pipeline,
integration_pipeline,
e2e_pipeline,
conformance_pipeline,
nightly_pipeline,

View File

@ -94,11 +94,29 @@ function create_cluster_capi {
}
function run_talos_integration_test {
"${INTEGRATION_TEST}" -test.v -talos.failfast -talos.talosctlpath "${TALOSCTL}" -talos.provisioner "${PROVISIONER}" -talos.name "${CLUSTER_NAME}"
case "${SHORT_INTEGRATION_TEST:-no}" in
yes|true|y)
TEST_SHORT="-test.short"
;;
*)
TEST_SHORT=""
;;
esac
"${INTEGRATION_TEST}" -test.v -talos.failfast -talos.talosctlpath "${TALOSCTL}" -talos.provisioner "${PROVISIONER}" -talos.name "${CLUSTER_NAME}" "${TEST_SHORT}"
}
function run_talos_integration_test_docker {
"${INTEGRATION_TEST}" -test.v -talos.talosctlpath "${TALOSCTL}" -talos.k8sendpoint ${ENDPOINT}:6443 -talos.provisioner "${PROVISIONER}" -talos.name "${CLUSTER_NAME}"
case "${SHORT_INTEGRATION_TEST:-no}" in
yes|true|y)
TEST_SHORT="-test.short"
;;
*)
TEST_SHORT=""
;;
esac
"${INTEGRATION_TEST}" -test.v -talos.talosctlpath "${TALOSCTL}" -talos.k8sendpoint ${ENDPOINT}:6443 -talos.provisioner "${PROVISIONER}" -talos.name "${CLUSTER_NAME}" "${TEST_SHORT}"
}
function run_kubernetes_integration_test {