'Is it possible to run Azure DevOps self-hosted agent locally against local non-committed code
We have been looking for a way to run Azure DevOps pipeline locally against code in local host to allow faster pipeline development cycle. It is especially cumbersome to commit code to version control push it to remote and find out that something with the pipeline syntax does not work. Also commenting out unnecessary parts of the pipeline for development phase is not very nice experience. So would it be possible to utilize Azure DevOps self-hosted agent docker container images to achieve this.
What I think would need to be done:
- Build docker container to include the current version of our repo
- Setup docker image to launch a specific pipeline at startup
- Skip code checkout phase
Anyone in the know if this would be possible with this container. To me it seems what might be missing is controlling the pipeline to launch when the docker image is run. Although there would be this --once flag to shutdown the image after one job run.
I am not very experienced with docker and definitely have not used this specific image before, so wanted to check if someone knows better. To me this gap in dev experience is one of the biggest downsides of using Azure DevOps pipelines.
Based on this there has been a consideration to make this officially possible by allowing to define --yaml flag pointing to yaml file, but it has never been made publicly available. There is also closed issue on the same topic.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
