CI: Remove cruft

Remove unused variables, and intermediary ones.
This commit is contained in:
Max Gautier
2025-03-10 20:54:03 +01:00
parent c8d75effcb
commit 119fa5b0c0
5 changed files with 7 additions and 17 deletions

View File

@@ -18,6 +18,7 @@ variables:
GCE_PREEMPTIBLE: "false"
ANSIBLE_KEEP_REMOTE_FILES: "1"
ANSIBLE_CONFIG: ./tests/ansible.cfg
ANSIBLE_INVENTORY: /tmp/inventory
RESET_CHECK: "false"
REMOVE_NODE_CHECK: "false"
UPGRADE_TEST: "false"

View File

@@ -9,20 +9,16 @@ create-tf:
delete-tf:
./scripts/delete-tf.sh
$(INVENTORY_DIR):
$(ANSIBLE_INVENTORY):
mkdir $@
create-packet: init-packet | $(INVENTORY_DIR)
create-packet: init-packet | $(ANSIBLE_INVENTORY)
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=$|
-e @"files/${CI_JOB_NAME}.yml"
delete-packet: ;
create-vagrant: | $(INVENTORY_DIR)
create-vagrant: | $(ANSIBLE_INVENTORY)
vagrant up
cp $(CI_PROJECT_DIR)/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory $|

View File

@@ -6,16 +6,10 @@ vm_cpu_sockets: 1
vm_cpu_threads: 2
vm_memory: 2048
# Replace invalid characters so that we can use the branch name in kubernetes labels
branch_name_sane: "{{ branch | regex_replace('/', '-') }}"
# Request/Limit allocation settings
cpu_allocation_ratio: 0.25
memory_allocation_ratio: 1
# Default path for inventory
inventory_path: "/tmp/{{ test_name }}/inventory"
# Deployment mode
mode: all-in-one

View File

@@ -45,5 +45,5 @@
- name: Create inventory for CI tests
copy:
content: "{{ ci_inventory | to_yaml }}"
dest: "{{ inventory_path }}/ci_inventory.yml"
dest: "{{ ansible_inventory_sources[0] }}/ci_inventory.yml"
mode: "0644"

View File

@@ -26,9 +26,8 @@ fi
export ANSIBLE_REMOTE_USER=$SSH_USER
export ANSIBLE_BECOME=true
export ANSIBLE_BECOME_USER=root
export ANSIBLE_INVENTORY=/tmp/inventory/
make -C tests INVENTORY_DIR=${ANSIBLE_INVENTORY} create-${CI_PLATFORM} -s
make -C tests create-${CI_PLATFORM} -s
# Test collection build and install by installing our collection, emptying our repository, adding
# cluster.yml, reset.yml, and remote-node.yml files that simply point to our collection's playbooks, and then