- Create a new virtual machine with runner installed
- Trigger a pipeline to run (from another project), which runs on this new virtual machine
- Do something else, or fail if pipeline above fails on the new virtual machine
I'm using GitLabs Triggers API to run a pipeline from a project, however would like it to run on this newly created virtual machine.
What would be the best way of parsing this information to the GitLab API, or would something like tags be the best way of doing this?
- deploy to test
- deploy to prod
Terraform Deploy To Test:
stage: deploy to test
- cd test_deploy
- python deploy.py
- curl --request POST --form token=TOKEN --form ref=master http://gitlab.example.com/api/v4/projects/12/trigger/pipeline
Terraform Deploy to Prod:
stage: deploy to prod
- do something if the above testing succeeds, or fail
gitlab-ci file would generate a new build machine and deploy it to the "test group" within vsphere with a python script. (Deploying it would activate a
gitlab-runner and tie it to a specific project and have some tags associated with it).
To test, it then triggers a pipeline call using the GitLab API, and I would like that pipeline to run on the new generated build machine on vsphere.