2019-04-17 05:49:07 +08:00
|
|
|
init-packet:
|
2024-03-15 18:57:27 +08:00
|
|
|
mkdir -p $(HOME)/.ssh
|
2019-04-17 05:49:07 +08:00
|
|
|
echo $(PACKET_VM_SSH_PRIVATE_KEY) | base64 -d > $(HOME)/.ssh/id_rsa
|
|
|
|
chmod 400 $(HOME)/.ssh/id_rsa
|
|
|
|
|
2019-05-03 03:26:19 +08:00
|
|
|
create-tf:
|
|
|
|
./scripts/create-tf.sh
|
|
|
|
|
|
|
|
delete-tf:
|
|
|
|
./scripts/delete-tf.sh
|
|
|
|
|
2019-04-17 05:49:07 +08:00
|
|
|
create-packet: init-packet
|
|
|
|
ansible-playbook cloud_playbooks/create-packet.yml -c local \
|
2020-04-01 22:23:29 +08:00
|
|
|
$(ANSIBLE_LOG_LEVEL) \
|
2019-04-17 05:49:07 +08:00
|
|
|
-e @"files/${CI_JOB_NAME}.yml" \
|
|
|
|
-e test_id=$(TEST_ID) \
|
2023-06-26 15:57:08 +08:00
|
|
|
-e branch="$(CI_COMMIT_BRANCH)" \
|
|
|
|
-e pipeline_id="$(CI_PIPELINE_ID)" \
|
2024-09-20 20:31:47 +08:00
|
|
|
-e inventory_path=$(INVENTORY_DIR)
|
2019-04-17 05:49:07 +08:00
|
|
|
|
2024-09-13 18:02:11 +08:00
|
|
|
delete-packet: ;
|
2023-06-26 15:57:08 +08:00
|
|
|
|
2020-05-28 15:46:02 +08:00
|
|
|
create-vagrant:
|
|
|
|
vagrant up
|
2024-09-20 20:31:47 +08:00
|
|
|
cp $(CI_PROJECT_DIR)/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory $(INVENTORY_DIR)
|
2020-05-28 15:46:02 +08:00
|
|
|
|
|
|
|
delete-vagrant:
|
2022-03-18 09:05:39 +08:00
|
|
|
vagrant destroy -f
|