Merge pull request #11898 from VannTen/cleanup/ci/run_without_sample

Run CI without the sample inventory
This commit is contained in:
Kubernetes Prow Robot
2025-01-17 08:00:36 -08:00
committed by GitHub
5 changed files with 13 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ pre-commit:
variables:
PRE_COMMIT_HOME: /pre-commit-cache
script:
- pre-commit run --all-files
- pre-commit run --all-files --show-diff-on-failure
cache:
key: pre-commit-all
paths:

3
Vagrantfile vendored
View File

@@ -58,8 +58,7 @@ $subnet ||= "172.18.8"
$subnet_ipv6 ||= "fd3c:b398:0698:0756"
$os ||= "ubuntu2004"
$network_plugin ||= "flannel"
$inventory ||= "inventory/sample"
$inventories ||= [$inventory]
$inventories ||= []
# Setting multi_networking to true will install Multus: https://github.com/k8snetworkplumbingwg/multus-cni
$multi_networking ||= "False"
$download_run_once ||= "True"

View File

@@ -9,19 +9,22 @@ create-tf:
delete-tf:
./scripts/delete-tf.sh
create-packet: init-packet
$(INVENTORY_DIR):
mkdir $@
create-packet: init-packet | $(INVENTORY_DIR)
ansible-playbook cloud_playbooks/create-packet.yml -c local \
-e @"files/${CI_JOB_NAME}.yml" \
-e test_name="$(subst .,-,$(CI_PIPELINE_ID)-$(CI_JOB_ID))" \
-e branch="$(CI_COMMIT_BRANCH)" \
-e pipeline_id="$(CI_PIPELINE_ID)" \
-e inventory_path=$(INVENTORY_DIR)
-e inventory_path=$|
delete-packet: ;
create-vagrant:
create-vagrant: | $(INVENTORY_DIR)
vagrant up
cp $(CI_PROJECT_DIR)/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory $(INVENTORY_DIR)
cp $(CI_PROJECT_DIR)/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory $|
delete-vagrant:
vagrant destroy -f

View File

@@ -26,7 +26,7 @@ fi
export ANSIBLE_REMOTE_USER=$SSH_USER
export ANSIBLE_BECOME=true
export ANSIBLE_BECOME_USER=root
export ANSIBLE_INVENTORY=${CI_PROJECT_DIR}/inventory/sample/
export ANSIBLE_INVENTORY=/tmp/inventory/
make -C tests INVENTORY_DIR=${ANSIBLE_INVENTORY} create-${CI_PLATFORM} -s

View File

@@ -4,7 +4,10 @@
vars:
test_image_repo: registry.k8s.io/e2e-test-images/agnhost
test_image_tag: "2.40"
# TODO: source those from kubespray-defaults instead.
# Needs kubespray-defaults to be decoupled from no-proxy stuff
bin_dir: "/usr/local/bin"
kube_pods_subnet: 10.233.64.0/18
tasks: