How to Specifically Schedule Pipelines with Azure DevOps - azure

How to schedule a one time run, non-repeating pipeline in AzurDevOps. I want to create this pipeline for our UAT environment, but I don't want to run it manually, so I was thinking is there a way I can put multiple specific dates to run the pipeline?

In short, we can't schedule a non-repeating pipeline in DevOps because it defines a schedule using cron syntax.
Each Azure Pipelines scheduled trigger cron expression is a space-delimited expression with five entries(Minutes, Hours, Days, Months, Days of week).
If you need to run pipeline at some specific days, as a workaround, please schedule it on your end and call the Rest API to run your pipeline.
There are the detailed steps: https://blog.geralexgr.com/cloud/trigger-azure-devops-build-pipelines-using-rest-api.

Related

Azure DevOps run pipeline every 3 weeks

I need to run the azure pipeline every 3 weeks. Have any idea how to implement that?
It seems that there is only a way to run it every 3rd week every month which is not my requirement.

Azure Devops and yaml pipelines creation

How to create Azure devops yaml Pipleine.I'm currently trying to create multiple build pipelines for my Angular app in Azure DevOps using the new YAML way. … As far as I can tell from the docs it is not possible to define multiple pipelines in a single .yml file either. Is this scenario currently not supported in Azure DevOps
To create a pipeline, the simplified steps are ...
Go to the project you want to create the pipeline in
Go to the 'Pipelines' menu
Click the blue 'New pipeline' button on the top right corner
Follow the wizard that will help you set up your YAML pipeline
You can also read Create your first pipeline
As far as multiple pipelines in one .yml file: no, you define one pipeline in one yaml file. But that doesn't mean you cannot have multiple stages in one pipeline.
A stage is a logical boundary in the pipeline. It can be used to mark separation of concerns (for example, Build, QA, and production). Each stage contains one or more jobs. When you define multiple stages in a pipeline, by default, they run one after the other. You can specify the conditions for when a stage runs. When you are thinking about whether you need a stage, ask yourself:
Do separate groups manage different parts of this pipeline? For example, you could have a test manager that manages the jobs that relate to testing and a different manager that manages jobs related to production deployment. In this case, it makes sense to have separate stages for testing and production.
Is there a set of approvals that are connected to a specific job or set of jobs? If so, you can use stages to break your jobs into logical groups that require approvals.
Are there jobs that need to run a long time? If you have part of your pipeline that will have an extended run time, it makes sense to divide them into their own stage.
and
You can organize pipeline jobs into stages. Stages are the major divisions in a pipeline: "build this app", "run these tests", and "deploy to pre-production" are good examples of stages. They are logical boundaries in your pipeline where you can pause the pipeline and perform various checks.
Source for the last snippet and an interesting read: Add stages, dependencies, & conditions.

Configure pipeline to trigger multiple pipelines

I had around 30 pipelines (each doing its own build, deploy, tests) , all in same project.
Instead of having to manually trigger all 30 pipelines each time, I wanted to create a separate pipeline YAML which on running it can trigger all the 30 individual pipelines.
Is there a way to achieve this?
I understand from documentation there is concept to add the pipeline triggers. However, I was not able to understand if single yaml can trigger individual pipelines - and if so, whether it is getting triggered at the completion of the pipeline or at the start of it.
Flow I was looking for is -
There are 30 individual pipelines each having complete flow for services:
stages:
stageA
stageB
stageC
Now, I was trying to create a pipeline yaml all_apps.yml which triggers all the 30 individual pipelines at once.
Configure pipeline to trigger multiple pipelines
There are several ways to accomplish it, you can choose the one that suits you.
First, we could set the Build completion for those 30 pipelines:
Go the edit page of the triggered yaml pipeline(Deploy pipeline), Click the 3dots and choose Triggers :
Go to Triggers--> Build completion and click add--> Select your triggering pipeline(all_apps.yml pipeline):
Second, there is an extension Trigger Azure DevOps Pipeline, we could use this task to trigger those 30 pipelines.
Third, you could it with both the Runs API and Build Queue API, both work with Personal Access Tokens. You can also use loops to make REST API calls more graceful. Check this thread for some more details.

Azure data factory end time trigger

I have one scenario let say I have one ADF instance name XYZ contains one pipeline which is schedule trigger starts at 12:00 AM in night. Trigger some time ends in 1 hours and sometime it takes more than 2 hours because of data load.
I have one more ADF instance ABC in that also one pipeline I have, now my requirement is that I have to schedule the ABC instance pipeline when xyz instance trigger is completed.
Kindly help on this requirement. Both ADF have different instance & also trigger end time may vary based on load.
The simplest way is using Logic app. In Logic app designer, we can create two pipeline run steps to trigger the two pipelines in different Data Factory running.
Create a Recurrence trigger to run this logic app in a loop.
In the Azure Data Factory operations:
select Create a pipeline run Action.
The summary is here:
So we can trigger the pipeline run of the ADF instance name XYZ, and when it is completed, it will trigger the pipeline run of the ADF instance ABC.

How do i setup Slack Notifications for Gitlab scheduled pipelines only?

I want to be notified via slack whether my scheduled pipeline runs are failing or passing. I also do not want a trigger every time the pipeline fails or passes, I want it to be specifically limited to the scheduled pipelines

Resources