How do I create a recurring schedule to deploy a release to our dev databases?

Hello All,

We use DevOps and Change Automation to deploy releases to our different environments. We also have separate jobs that drop our development databases daily and recreates them. Because of this, we sometimes have developers having to add back schema changes they need in development daily. To get around this, I created a separate branch that they pull their changes into and made a release pipeline. I can release successfully into development and I can schedule a release which fires off once (see pic for how thats setup) for the time specified, but never again. I guess I'm not clear on how to setup a deployment every day from this one release. From the below pic, I assumed this would deploy Monday through Friday at 6:30AM.



Tagged:

Best Answer

  • Kendra_LittleKendra_Little Portland, OR, USAPosts: 65 Gold 1
    Accepted Answer
    Hi,

    I was able to do a little more testing today, and found that if I set a schedule on the artifact in the release pipeline, then it will automatically run the stages defined if I leave the stages without a schedule.

    In other words, if I want the whole pipeline to run then I can put a schedule only on the artifact and I don't have to also put a schedule on the stage.

    I tested this by adding multiple schedules for one day, and that worked. It looks like it will work for multiple days per week but not enough time has passed to "prove" it.

    One note-- to get new changes to a branch to flow through, you will need a build to run to  produce a new version of the build artifact to pass off to the release pipeline. Otherwise we will just be deploying the last artifact which is available for this pipeline. I'm guessing you might already have that covered but just mentioning it in case that's not rigged up yet.

    Cheers,
    Kendra
    -------------------------------
    @Kendra_Little
    DevOps Advocate at Redgate

Answers

  • Kendra_LittleKendra_Little Portland, OR, USA Posts: 65 Gold 1
    Hi,

    Quick question -- from the screenshot it looks like the schedule is being set on a specific release stage using the classic release pipeline in Azure DevOps.

    Do you have a scheduled release trigger set on the Artifact? 

    I'm not an expert on this / haven't experimented much with schedules in Azure DevOps, but my theory is that you need a schedule to create the release on the artifact, and then if you want to control the flow to stages that the schedule on the stage would refine that schedule, if that makes sense.

    I'm at the end of my workday here in the UK but am blocking out some time tomorrow to experiment a bit and see if I can learn more.

    Kendra
    -------------------------------
    @Kendra_Little
    DevOps Advocate at Redgate
  • cmmccmmc Posts: 5 New member
    Thank you Kendra,

    That might be it. I just set the schedule on the artifact here:

    With these being the details of the schedule:
    So my assumption is that a new release will be made daily at 5AM, and then a deployment is made daily at 6:30AM based on the screenshot in my previous post. I guess I thought I could keep making deployments from one release, but if this works then I'll be happy.

    I'll post my results tomorrow morning.

    Thanks again!
  • cmmccmmc Posts: 5 New member
    Hi,

    I was able to do a little more testing today, and found that if I set a schedule on the artifact in the release pipeline, then it will automatically run the stages defined if I leave the stages without a schedule.

    In other words, if I want the whole pipeline to run then I can put a schedule only on the artifact and I don't have to also put a schedule on the stage.

    I tested this by adding multiple schedules for one day, and that worked. It looks like it will work for multiple days per week but not enough time has passed to "prove" it.

    One note-- to get new changes to a branch to flow through, you will need a build to run to  produce a new version of the build artifact to pass off to the release pipeline. Otherwise we will just be deploying the last artifact which is available for this pipeline. I'm guessing you might already have that covered but just mentioning it in case that's not rigged up yet.

    Cheers,
    Kendra

    Thank you, Kendra,

    I was also successful with a schedule on the artifact. I guess I complicated it a bit by also setting a schedule on the release itself as well, but it worked as well.

    Thanks again.
Sign In or Register to comment.