I hit a possible Jenkins limitation and would like to ask if any had and solved similar problems.
Some of my projects have complex deployment workflows so they are split into multiple jobs. For example one job to run tests and create deb package artifact, then another one to deploy to dev and another one to promote and deploy to production.
The workflow I'd like to have is:
Tests are run and deb package is created on git commit (job 1)
If above is successful the package is deployed to development environment (job 2)
Optionally a developer may choose to trigger long running simulation test for the commit (job 3)
If jobs 1 and 3 are successful a person can push a button to deploy the commit to production. This may happen days or even weeks after other jobs.
Each job is a declarative pipeline. I can achieve describe workflow by triggering jobs manually and providing relevant parameters, like commit ID, but that's inconvenient and error-prone.
Some other points:
We test every commit but few of them will end up in production
We need to keep manual approvals for production deployment
We tried using the build pipeline plugin: https://plugins.jenkins.io/build-pipeline-plugin/
It can do exactly what we need but the plugin does not work with declarative pipelines.
Does anybody have ideas or pointers if it's possible to achieve what I need with Jenkins?