rsram312
rsram312

Reputation: 141

List of dates as azure pipeline parameter

I was currently using classic Azure pipelines and was trying to pass list of dates as azure pipeline parameter for user to chose from.

parameters:
- name: StartDate
  displayName: Scheduled start date
  type: string
  values: 
    - Today’s date (YYYY-MM-DD) format 
    - Next date
    - Subsequent date

Is there a way to compute the dates dynamically to show up as pipeline parameter

I found a way to get current date as variable - but was not able to as parameter

Upvotes: 1

Views: 334

Answers (1)

promicro
promicro

Reputation: 1646

Unfortenattely that is currently not out-of-the-box possible. There is however a topic op Visual Studio feedback on it, you might consider upvoting that one

Alternative

I could think of a rather heavy alternative by updating the azure-pipelines.yml by a PowerShell script and commit it your repo. Scheduling this update-PowerShell-script every night, with of course another pipeline triggered by cron schedule, will make sure that the dates are updated in the azure-pipelines.yml.

Again this is maybe a bit out-of-scope and heavy, but could solve you issue.

Upvotes: 2

Related Questions