You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
693 B

  1. init-packet:
  2. mkdir -p $(HOME)/.ssh
  3. echo $(PACKET_VM_SSH_PRIVATE_KEY) | base64 -d > $(HOME)/.ssh/id_rsa
  4. chmod 400 $(HOME)/.ssh/id_rsa
  5. create-tf:
  6. ./scripts/create-tf.sh
  7. delete-tf:
  8. ./scripts/delete-tf.sh
  9. create-packet: init-packet
  10. ansible-playbook cloud_playbooks/create-packet.yml -c local \
  11. -e @"files/${CI_JOB_NAME}.yml" \
  12. -e test_name="$(subst .,-,$(CI_PIPELINE_ID)-$(CI_JOB_ID))" \
  13. -e branch="$(CI_COMMIT_BRANCH)" \
  14. -e pipeline_id="$(CI_PIPELINE_ID)" \
  15. -e inventory_path=$(INVENTORY_DIR)
  16. delete-packet: ;
  17. create-vagrant:
  18. vagrant up
  19. cp $(CI_PROJECT_DIR)/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory $(INVENTORY_DIR)
  20. delete-vagrant:
  21. vagrant destroy -f