test/vmware: add test tag to vmware objects

add tag "gitlab-ci-test" to the created vm inside the test, so it can be
cleaned later.
This commit is contained in:
Juan Abia 2022-01-18 14:06:40 +01:00 committed by jrusz
parent 5e2617ed49
commit 653cc76408

View file

@ -196,6 +196,12 @@ $GOVC_CMD vm.create -u "${GOVMOMI_USERNAME}":"${GOVMOMI_PASSWORD}"@"${GOVMOMI_UR
--disk.controller=ide \
"${IMAGE_KEY}"
# tagging vm as testing object
$GOVC_CMD tags.attach -u "${GOVMOMI_USERNAME}":"${GOVMOMI_PASSWORD}"@"${GOVMOMI_URL}" \
-k=true \
-c "osbuild-composer testing" gitlab-ci-test \
"/${GOVMOMI_DATACENTER}/vm/${GOVMOMI_FOLDER}/${IMAGE_KEY}"
greenprint "Getting IP of created VM"
VM_IP=$($GOVC_CMD vm.ip -u "${GOVMOMI_USERNAME}":"${GOVMOMI_PASSWORD}"@"${GOVMOMI_URL}" -k=true "${IMAGE_KEY}")