Browse Source

[CI] add remove node job

pull/8784/head
Calin Cristian Andrei 2 years ago
committed by Kubernetes Prow Robot
parent
commit
9143810a4d
4 changed files with 21 additions and 0 deletions
  1. 1
      .gitlab-ci.yml
  2. 8
      .gitlab-ci/packet.yml
  3. 7
      tests/files/packet_almalinux8-calico-remove-node.yml
  4. 5
      tests/scripts/testcases_run.sh

1
.gitlab-ci.yml

@ -27,6 +27,7 @@ variables:
ANSIBLE_INVENTORY: ./inventory/sample/${CI_JOB_NAME}-${BUILD_NUMBER}.ini
IDEMPOT_CHECK: "false"
RESET_CHECK: "false"
REMOVE_NODE_CHECK: "false"
UPGRADE_TEST: "false"
MITOGEN_ENABLE: "false"
ANSIBLE_LOG_LEVEL: "-vv"

8
.gitlab-ci/packet.yml

@ -283,6 +283,14 @@ packet_debian10-calico-upgrade:
variables:
UPGRADE_TEST: graceful
packet_almalinux8-calico-remove-node:
stage: deploy-part3
extends: .packet_pr
when: on_success
variables:
REMOVE_NODE_CHECK: "true"
REMOVE_NODE_NAME: "instance-3"
packet_debian10-calico-upgrade-once:
stage: deploy-part3
extends: .packet_periodic

7
tests/files/packet_almalinux8-calico-remove-node.yml

@ -0,0 +1,7 @@
---
# Instance settings
cloud_image: almalinux-8
mode: ha
# Kubespray settings
auto_renew_certificates: true

5
tests/scripts/testcases_run.sh

@ -109,6 +109,11 @@ if [ "${IDEMPOT_CHECK}" = "true" ]; then
fi
fi
# Test node removal procedure
if [ "${REMOVE_NODE_CHECK}" = "true" ]; then
ansible-playbook ${ANSIBLE_LOG_LEVEL} -e @${CI_TEST_SETTING} -e @${CI_TEST_REGISTRY_MIRROR} -e @${CI_TEST_VARS} ${CI_TEST_ADDITIONAL_VARS} -e skip_confirmation=yes -e node=${REMOVE_NODE_NAME} --limit "all:!fake_hosts" remove-node.yml
fi
# Clean up at the end, this is to allow stage1 tests to include cleanup test
if [ "${RESET_CHECK}" = "true" ]; then
ansible-playbook ${ANSIBLE_LOG_LEVEL} -e @${CI_TEST_SETTING} -e @${CI_TEST_REGISTRY_MIRROR} -e @${CI_TEST_VARS} ${CI_TEST_ADDITIONAL_VARS} -e reset_confirmation=yes --limit "all:!fake_hosts" reset.yml

Loading…
Cancel
Save