Comments (21)
I think this is an important feature in context of Infrastructure-as-Code and in particular Immutable Infrastructure builds.
Examples:
-
Building and maintaining OS Images with a pipeline e.g. using Packer:
A Team might be maintaining various Packer Pipelines. (e.g. os-base-image, webserver-nginx, ubuntu-tomcat, etc.)
Each time a new image is being introduced, they would want to utilize a template repository that contains both, packer definitions and azure-pipeline.yaml. -
Building and maintaining Docker Images with a pipeline.
Here a DevOps Teams might want to recurringly build these images against the latest OS Upgrades. If this cannot be scheduled recurringly, each time someone has to go in and hit unexpected surprises which can happen proactively when the pipeline runs scheduled.
Thanks,
Darius
from azure-pipelines-yaml.
Now my pipeline that has an existing scheduled trigger got the message as follows
You can no longer define scheduled triggers in the editor. Instead, you must add schedules to your YAML file. For more information, see https://go.microsoft.com/fwlink/?linkid=2080841
But there is no info on how to add schedules to yaml in the mentioned link.
from azure-pipelines-yaml.
I don't see why this would be closed out - it is an important feature to have. I mean... Jenkins can do this. Why can't Azure DevOps? We have a need to run the same pipeline with several different parameters on several different schedules. Has a solution to run YAML build pipelines on a schedule w/ the parameters you want been found?
Seems odd that something like Jenkins can do this but ADO can not...
from azure-pipelines-yaml.
The manual now has some mention of the schedule configuration, but it is far from sufficient for transferring scheduled triggers to YAML. Let's say I have two pipelines A and B which use the same YAML file x.yml, but with different variables and variable groups and different schedules, e.g. pipeline A is configured with a variable group DEBUG_BUILD and a variable TEST=quick and runs once a day, and pipeline B is configured with a variable group RELEASE_BUILD and a variable TEST=full and runs once a week. The manual doesn't say anything about variables or variable groups in the YAML schedule configuration, and from the current look of it, this configuration cannot be transferred to YAML at all. I hope it's a documentation oversight, because duplicating YAML files isn't a really a viable option for real-life setups which can have dozens of such parallel configurations.
from azure-pipelines-yaml.
Having different schedules for different pipelines but using the same YAML is not supported. You can factor out your pipeline logic into a template, and then have a very small YAML wrapper that just includes the schedule triggers and imports the template.
from azure-pipelines-yaml.
So, just to make sure I understand -- it was fully supported in UI, then scheduling got removed from UI with the suggestion that it should be done in YAML instead, but there is no way to do it in YAML. Is it correct? Or do you mean that it was an unsupported feature in the UI as well, it just happened to work?
And yes, I fully understand that I could do it as you said, but the reality is (and I suppose not just mine), that I have over 40 pipelines using the same YAML with different options and running on different schedules, so I will need over 40 wrappers, which is hardly maintainable.
from azure-pipelines-yaml.
Numerous YAML files pollute the source tree, and frequent updates to them flood git history; but it's a rather small (and maybe arguable) nuisance.
The problem is, config-as-code approach in its current form doesn't replace the UI configuration. If I were now able to have only one UI pipeline which would magically run with different YAML files and different parameters on different schedules, it would be all right, but it's not so, I still have to have the same 40 UI pipelines, but now also 40 YAML files instead of only one, and keep them in sync. Whenever I need to add or remove a configuration, I will need to do it in two places, as a YAML with the schedule and as a UI pipeline. Changes in schedule also usually come together with configuration changes (you modify certain parameters and because of that, change the schedule to make the run more or less frequent), so again, two places instead of one.
Anyway, I appreciate the clarification, I needed to make sure I'm not missing anything, because converting the scheduled setup from UI to YAML is a big job which I didn't want to do just out of ignorance.
from azure-pipelines-yaml.
As per the docs, scheduled triggers are not yet supported in YAML syntax with Azure DevOps Server.
Is there any plan to support it?
from azure-pipelines-yaml.
It should be available in a future Azure DevOps Server release. (I don't believe it made the cutoff for 2019.1, though.)
from azure-pipelines-yaml.
I understand. Thanks for the feedback on timezone support.
from azure-pipelines-yaml.
Having different schedules for different pipelines but using the same YAML is not supported. You can factor out your pipeline logic into a template, and then have a very small YAML wrapper that just includes the schedule triggers and imports the template.
Being able to refer to a 'Schedule.Reference' (for example) would be extremely useful for then only running certain steps (as per @elenst post).
from azure-pipelines-yaml.
I don't see why this would be closed out - it is an important feature to have. I mean... Jenkins can do this. Why can't Azure DevOps? We have a need to run the same pipeline with several different parameters on several different schedules. Has a solution to run YAML build pipelines on a schedule w/ the parameters you want been found?
Seems odd that something like Jenkins can do this but ADO can not...
FWIW there's this StackOverflow answer which allows you to do custom things if the pipeline was scheduled vs manually run: https://stackoverflow.com/a/71511521/3688293
from azure-pipelines-yaml.
Another use case is testing stochastic (non-deterministic) functionality. I have a scenario where we would like to periodically run tests to build up many sets of outputs, from which we determine whether there are meaningful changes over time.
For example:
- I have 20 different statistical optimisation algorithms
- Every hour I want re-run the oldest test
from azure-pipelines-yaml.
I'm having the same problem @andyli is having. It's worth mentioning that there's more documentation for yaml triggers here: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops&tabs=yaml#scheduled-triggers.
However ...
Scheduled builds are not yet supported in YAML syntax. After you create your YAML build pipeline, you can use pipeline settings to specify a scheduled trigger.
UPDATE
Just found this feedback thread: https://developercommunity.visualstudio.com/content/problem/607414/scheduled-trigger-for-yaml-pipeline-disabled.html
This format worked for me:
schedules:
- cron: '0 18 * * *'
displayName: Every night at 6pm
branches:
include:
- master
from azure-pipelines-yaml.
@steved0x @vijayma can you get the official docs up and the FWlink updated to point to it? Thanks.
from azure-pipelines-yaml.
(And we will definitely consider this feedback as we evolve the feature - thank you!)
from azure-pipelines-yaml.
Our view of config-as-code is to push as much configuration into the code file as possible, rather than have some in code and some in a database. Is maintaining 40 YAML files more effort than maintaining 40 point-and-click schedules? (That's a genuine question - there may be something here I'm not considering.)
from azure-pipelines-yaml.
Since this feature has shipped, closing the issue.
from azure-pipelines-yaml.
Hello all, I am unable to delete current schedule from UI, what is wrong with you dev team?
Besides if I need to create multiple pipelines from single yaml file now they will have same schedule? Really?
Why I can't override schedule from UI as for trigger?
from azure-pipelines-yaml.
We are working on enabling the UI again for the schedules. You will be able to use YAML for the scheduled, but if you do not want to, you can continue to use the UI. Sorry about the trouble.
from azure-pipelines-yaml.
Hello Vijayma,
Our build was using the GUI schedule even though it isn't supported anymore.
So my plan was to add the schedule to the yaml and delete the GUI schedule.
However I am not able to delete the schedule even though there is a trash icon present. Clicking on it does not nothing.
To give some feedback I am all for putting config in code and under source control (everything should be) so I am all for this move.
For feature parity though (GUI<->Yaml) I think releasing the feature it without timezone support is premature. We now have cadence of our master build of 3h,12h,20h and it's summer here. When it is winter this suddenly becomes 2,11,19 and we have to manually adjust and other dependent process will fail because of this change. Yes, we observer daylight saving time in the EU for at least a year more :)
from azure-pipelines-yaml.
Related Issues (20)
- Devops for Micro Service HOT 1
- Yaml becomes invalid when specific `checkout:` syntax occurs more than once HOT 1
- How to use `Build.SourceVersionAuthor`? HOT 3
- by design there´s not available option in DeVops Service to create a new pipeline yaml for "existing" branch HOT 5
- deploy built artifacts in container uploads both checked out projects instead of right one HOT 2
- how to triger a build pipeline from powershell HOT 2
- Pipeline resource trigger documentation missing prerequisite HOT 1
- could find the branch error in azure yaml HOT 2
- python task ran successfull but pipeline is faiing with bash exit code 1 HOT 3
- Azure YAML Pipelines - Using template expression variables at non-global scope HOT 1
- Examples for resource pipeline and source inputs are not clear. HOT 9
- Hi Team While running my Azure pipeline.yaml I am getting following error: directive are not supported for the expression that are embedded within the string Directive are only supported when the entire value is an expression HOT 1
- This repo is missing important files
- It is possible to convert a json to variables/parameters YAML and iterate? HOT 3
- Support for conditions in templates? HOT 1
- Custom expression/function in Yaml HOT 1
- Azure DevOps YAML Template Powershell script file issue HOT 2
- Azure Pipelines Resource Trigger (branch filter) not working as expected. HOT 2
- GitHub Actions Build Error: Invalid App Path for Django-Celery-Beat Dockerfile HOT 3
- Error running pipeline after renaming default GitHub branch from 'master' to 'main' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-pipelines-yaml.