One of the problems that has most often been raised by the community
is to not being able to assign a build priority to a Pipeline.
We created an extension with the aim of offering a workaround to those situation.
This Azure Pipelines task prioritize specifics jobs of a pipeline.
It will loop through all pools (if none given) and through all Job request still in queue.
It will do the exact same thing as the Run Next button of a pipeline.
If any JobRequests are started by the given Pipeline, the task will increase its priority.
We have also added the possibility of restrict
the prioritization to only certain JobNames,
or only certain Agent Polls. However, the task don't handle branch restriction as if.
You cannot prioritize jobs based on a branch name,
but you can condition the task to run only on specific branch in your YAML file.
"Handle prioritization of your Tasks"
Prioritization works as a LIFO.
Any new prioritization will be put in first position in the queue, even if an other job have been prioritized before.
Moreover, to be prioritized, a job need to be in queue inside the pool and waiting for an available pipeline.
It won't work if the job is :
- already Started.
- pending for an other job to finish.
- Or any other state (not sarted, succeeded, canceled, failed...).
Because of the need to run a powershell script,
this task need an agent to run (VM azure or hosted agent). It can't run on an agentless Job.
For a more flexible process, we will also propose some workaround to achieve the same goal without the work of an agent :
- You can directly use the powershell script as an Azure Function. Then, inside your pipeline, use the Agentless task "Invoke REST API" to call your Azure Function.
- In the same way use the powershell script as an Azure Function.
Then, you can use the embedded Azure Web Hooks to automate the call of your Azure Function at each deployment start.
Coming out soon : "Automated Queue for PullRequest"
An important aspect for the work efficiency within a company using DevOps technologies, is the running time of all pipelines for the merge of PullRequests. In companies where a fairly large number of teams work together, this time is strongly impacted by the number of parallel PullRequests, for the limited DevOps resources. This can create a bottleneck, drastically reducing the number of PullRequests that can be merged.
We want to propose a solution to limit this bottleneck.
We have implemented a Queue, allowing PullRequests to be passed one after the other,
with a prioritization system for the pipelines of the head PullRequest.
That way, the first PullRequest has access to all the resources needed to be merged as quickly as possible.
This Queue can be modified at any time, from a dedicated screen of our Extension.
To further improve this PullRequest merge time,
we have implemented an automation system for this Queue. After that the first PullRequest of the Queue is merged,
the second one of the Queue take the head, and all of her Pipelines are started (required and/or otpionnal).
This also has the advantage of using the resources even during the night, when they are less requested. If needed,
an PullRequest that failed a required build, will automatically be put out from the queue, to always keep this system fully automated.
If you want to be informed of the release of our futur extensions, leave us your email address !