Browse Source

CI: Remove cruft

Remove unused variables, and intermediary ones.
pull/12026/head
Max Gautier 6 months ago
parent
commit
119fa5b0c0
Failed to extract signature
5 changed files with 7 additions and 17 deletions
  1. 1
      .gitlab-ci.yml
  2. 12
      tests/Makefile
  3. 6
      tests/cloud_playbooks/roles/packet-ci/defaults/main.yml
  4. 2
      tests/cloud_playbooks/roles/packet-ci/tasks/main.yml
  5. 3
      tests/scripts/testcases_run.sh

1
.gitlab-ci.yml

@ -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"

12
tests/Makefile

@ -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 $|

6
tests/cloud_playbooks/roles/packet-ci/defaults/main.yml

@ -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

2
tests/cloud_playbooks/roles/packet-ci/tasks/main.yml

@ -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"

3
tests/scripts/testcases_run.sh

@ -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

Loading…
Cancel
Save