Giter VIP home page Giter VIP logo

Comments (21)

dariustehrani avatar dariustehrani commented on July 19, 2024 7

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.

andyli avatar andyli commented on July 19, 2024 3

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.

D41172902 avatar D41172902 commented on July 19, 2024 3

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.

elenst avatar elenst commented on July 19, 2024 1

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.

vtbassmatt avatar vtbassmatt commented on July 19, 2024 1

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.

elenst avatar elenst commented on July 19, 2024 1

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.

elenst avatar elenst commented on July 19, 2024 1

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.

ADD-Juan-Perez avatar ADD-Juan-Perez commented on July 19, 2024 1

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.

vtbassmatt avatar vtbassmatt commented on July 19, 2024 1

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.

vijayma avatar vijayma commented on July 19, 2024 1

I understand. Thanks for the feedback on timezone support.

from azure-pipelines-yaml.

nickforr avatar nickforr commented on July 19, 2024 1

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.

 avatar commented on July 19, 2024 1

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.

fcooper8472 avatar fcooper8472 commented on July 19, 2024

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.

thedustinsmith avatar thedustinsmith commented on July 19, 2024

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.

vtbassmatt avatar vtbassmatt commented on July 19, 2024

@steved0x @vijayma can you get the official docs up and the FWlink updated to point to it? Thanks.

from azure-pipelines-yaml.

vtbassmatt avatar vtbassmatt commented on July 19, 2024

(And we will definitely consider this feedback as we evolve the feature - thank you!)

from azure-pipelines-yaml.

vtbassmatt avatar vtbassmatt commented on July 19, 2024

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.

vtbassmatt avatar vtbassmatt commented on July 19, 2024

Since this feature has shipped, closing the issue.

from azure-pipelines-yaml.

vutkin avatar vutkin commented on July 19, 2024

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.

vijayma avatar vijayma commented on July 19, 2024

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.

buckleyGI avatar buckleyGI commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.