question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Set pipeline's variable groups and triggers

See original GitHub issue

Is your feature request related to a problem? Please describe. I would like to be able to set pipeline’s variable groups and triggers using CLI.

Describe the solution you’d like

# set pipeline's variable groups
az pipelines set variable-groups --id ${PIPELINE_ID} \
 --name ${VARIABLE_GROUPS_NAME} 
    ・
    ・
    ・
# set pipeline's triggers(continuous integration)
az pipelines set triggers ci --id ${PIPELINE_ID} \
    --override-the-yml-ci-trigger-from-here true
    --enable-ci true \
    ・
    ・
    ・
# set pipeline's triggers(pull request)
az pipelines set triggers pr --id ${PIPELINE_ID} \
    --override-the-yml-ci-trigger-from-here true
    --enable-pr true \
    ・
    ・
    ・
# set pipeline's triggers(scheduled)
az pipelines set triggers scheduled --id=${PIPELINE_ID} \
    --when-to-build mon
    ・
    ・
    ・

I would appreciate your kind consideration.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
atbaggacommented, Oct 9, 2019

@sho-yamashita Dynamic Variable-Group and Triggers is not supported as you pointed the issue itself. Since the eventual goal for pipelines is to put everything in the yaml rather than as pipeline metadata on the server, this enhancement to put these params in the command might not get prioritized as it will break sooner or later.

I had written a util script to do so for variable-groups which you can use. Checkout the script here - https://github.com/atbagga/PsSamples/tree/master/DevopsVarGroup

You can probably do something similar for setting up dynamic triggers.

Let me know if this is helpful.

1reaction
sho-yamashitacommented, Oct 7, 2019

@atbagga I thought that variable groups and triggers can only be set after pipeline generation. I think I can do it with the method you told me. I’ll try it. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release triggers - Azure Pipelines - Microsoft Learn
In this article. Continuous deployment triggers; Scheduled release triggers; Pull request triggers; Stage triggers. Azure DevOps Services | ...
Read more >
Allow variables in variable groups to be settable at build time
GUI (8 steps) - Edit pipeline, select triggers, select variables, select variable groups, unlink variable group for last environment and relink variable group...
Read more >
Passing Variables into Workflows and Pipelines from Triggers
Pass variables from a Harness Trigger into a Harness Workflow or Pipeline, to be used during Workflow steps or configuration.
Read more >
Azure DevOps - Pipeline should not trigger build for PR
To resolve this issue, we could enable CI triggers for the main branch with ** condition** eq(variables['Commitcomment'], 'Merge pull request') ...
Read more >
GitLab CI/CD
Trigger pipelines through the API. Merge request pipelines, Design a pipeline structure for running a pipeline in merge requests. Integrate with Kubernetes ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found