Pause pipelines and re trigger based on conditions

Is it possible to trigger a stage in pipeline. Right now my pipeline looks like(-> indicates proceed to next stage, / indicates parallel jobs in that stage)
build → static analysis → unit test → integration test/ e2e tests
now what I’m looking for is that after unit test is completed pipeline should stop. or go in pending state. After certain computations somewhere else pipeline should be pinged and resume integration test/e2e test.
I looked over:Triggering pipelines through the API | GitLab
Pipelines API | GitLab
but couldn’t find apis to run specific jobs in a particular pipeline_id.
docs/configuration/advanced-configuration.md · master · GitLab.org / gitlab-runner · GitLab
This does not necessarily solve my use case.
This is the current solution I’m thinking: unit test’s after script pings to some queue system. That queue system makes sure the tasks are performed and then pings back that pipeline_id which triggers it/e2e tests

Hi @jasdeeplance
You can set the integration tests job to be a manual and start it from that ‘something’ via API call.
Or you can have a job between unit test and integration test stages. This job will run some while loop that will check if it can continue.

Problem with while loop solution is runner is unnecessarily not being used optimally. I’ll check out the solution with manual input. While waiting for the manual input is runner freed or still stuck?

When a Job is marked as manual it does not take any Runner resources. It is not even scheduled to run until someone launch it.