0

is it possible to pass a parameter when I make a Dev Ops pull request? I only see a way to create tags.

I created a new branch, made my change and I would like to now merge it with the master branch which will trigger a pipeline build in our setup.

In my pipeline, I'm using the "Build SSIS" task which needs the Project path, which is different for every SSIS solution. So I am hoping to pass that as a parameter on the pull request, so I don't need a separate pipeline for every SSIS solution we manage.

Similarly, I was hoping to parameterize the repo because we have many repos but that seems less possible to parameterize, but is less important. Also similarly, I am using the "Deploy SSIS" task in my release pipeline that I am hoping to pass a parameter for "Destination Path" which is what folder it should deploy the SSIS solution to on the SQL server.

I thought it might be a custom YAML pipeline instead of the GUI I used to set ours up, however, I think we would want the developer to input the parameter at the pull request step in the process. So it seems it should be upstream of the pipeline.

Thank you

torek
  • 448,244
  • 59
  • 642
  • 775
David Squires
  • 129
  • 1
  • 3
  • 11
  • YAML will give you more options. Perhaps you could explain your setup. Do you have all your SSIS projects in one repo, or are they in seperate repos? In YAML you can define "resources" that let you define which repo will be used. https://learn.microsoft.com/en-us/azure/devops/pipelines/process/resources?view=azure-devops&tabs=schema#define-a-repositories-resource It's hard to understand exactly what you are after. – Nick.Mc May 21 '22 at 06:33
  • No it's not possible to pass a parameter in the PR UI, however you could have two separate pipelines, each one containing the parameters or variables which differs from each other and then use the 'extends' tricky to reuse the main pipeline. – Bruno May 22 '22 at 12:53
  • As mentioned there is not a way to pass parameters for your pr. Instead you could define with more clever ways your building strategy and accomplish your goal. For example you could define a mapping on a txt file, read this file on the pipeline, and locate the folder you want to build for each project. More details about your setup could help on a solution – GeralexGR May 23 '22 at 08:44
  • Thank you. To give more detail, we have about 10 repos, each one with many SSIS solutions in them. Some have 30+, some have just a few. There's about 150 total. So I am trying to avoid creating a separate build pipeline & release pipeline for each, then for both Dev and Prod. There's only a few variables between each solution (the solution name, the azure dev ops git repo it's in, and the SSISDB folder it lands in (same as the repo, so there are only 2 dynamic values). We are currently using the GUI pipeline builder, not YAML code. Let me know any other detail needed. – David Squires May 24 '22 at 12:55
  • We have 2 pipelines in the "Pipeline" section. One for Dev and one for Prod. They are pretty straight forward with a Build SSIS task and Publish Artifact task. We have 2 pipelines in the "Releases" section (dev and prod). They use the Deploy SSIS task. We are using triggers /continuous integration to link everything together. A pull request from a new branch builds and releases on the dev pipelines, to our dev env. and requests a code review. Once approved, the original developer can complete the review that merges into master branch, and runs the build and release production pipelines. – David Squires May 24 '22 at 13:02

1 Answers1

0

This post helped quite a bit: Setting parameter value dynamically for automatic pipelines

I am using the $(BUILD.SOURCEVERSIONMESSAGE) variable in my YAML pipeline to read my pull request commit message (name of the SSIS solution) to pass to the Build SSIS task in my pipeline.

It's not perfect because I can't add any other text in the commit message (i'm trying to figure out how to parse text between some tags), it can only do 1 SSIS solution at a time (typical anyway), and the user has to remember to enter it in exactly otherwise the build won't work, but it should work for now.

David Squires
  • 129
  • 1
  • 3
  • 11