3

I have a pipeline in Azure DevOps which requires the parameter libName. The pipeline starts like this:

name: ${{ parameters.libName }}
trigger: none
pr: none

When I start the pipeline manually, a dialog box appears where I can provide the libName. So far so good.

However, I want to trigger this pipeline when I create a Pull Request. In that case I receive an error

A value for the 'libName' parameter must be provided.

Is there a way to provide this parameter when I create the PR?

1
  • 1
    I think you cannot provide parameter on pipeline start during PR. If it helps, you can set default value for parameter parameters: - name: libName default: some_library Commented Oct 12, 2022 at 18:36

1 Answer 1

3

It is currently not supported to pass parameter along with the Pull Request.

If you want to define a specific value for parameter, you must manually trigger this pipeline and put in the value.

For PR trigger, you are not allowed to define the parameter value automatically, try adding some default value for it.

To fix this error:

A value for the 'libName' parameter must be provided.

You could provide a default value for your parameter. For example:

parameters: 
- name: libName 
  default: some library

Refer to this official doc for details: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/runtime-parameters?view=azure-devops&tabs=script

Sign up to request clarification or add additional context in comments.

1 Comment

thanks, I was afraid it was not supported.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.