dmitryserbin / azdev-release-orchestrator

Azure DevOps extension to manage and orchestrate release pipelines
MIT License
23 stars 12 forks source link

Can we integrate yaml pipeline and classic pipeline through Release Orchestrator task? #77

Open aakanshaverma1310 opened 2 years ago

aakanshaverma1310 commented 2 years ago

Can we integrate yaml pipeline and classic pipeline through Release Orchestrator pipeline?

For example - I have to run a sequence of pipelines where i have to run few classic editor pipelines and then few yaml pipleines and then again few classic pipelines. So can this be automate through release orchestrator task?

dmitryserbin commented 2 years ago

Yes it is possible. You need to use V2 version of the task to target classic pipelines and V3 for YAML. Both tasks can work side by side in a pipeline no problem.

Hope this helps.

aakanshaverma1310 commented 2 years ago

Tried out that. but fall into this error. what is understand is we have a group with the name Project Collection Build Service which needs Queue build permissions, so we have given Allowed permission in Manage Security to Project Collection Build Service But still getting this error.

Could you suggest something.

Error: TF215106: Access denied. Project Collection Build Service (my-org-name) needs Queue builds permissions for build pipeline 937:ADF-pipeline in team project my-ado-project-name to perform the action. For more information, contact the Azure DevOps administrator. at RestClient. (/home/vsts/work/_tasks/releaseorchestrator_5d38d46b-4c0a-4c14-8f0c-04df59e4dc27/3.0.1663/node_modules/typed-rest-client/RestClient.js:202:31)

aakanshaverma1310 commented 2 years ago

@dmitryserbin pls check my above comment.

dmitryserbin commented 2 years ago

sounds like permissions issue. you need to double check you've done it right.

here's a few screenshots to help you with that.

for YAML:

image

image

for classic:

image

image

aakanshaverma1310 commented 2 years ago

Thanks

aakanshaverma1310 commented 2 years ago

My yaml pipeline has the stages and requires approval at the upper environment, PFB image

image

If I run this pipeline through release orchestrator pipeline, then the pipeline keeps on running after dev stage gets completes, and show below results

image

my task -

                - task: releaseorchestrator@3
                  inputs:
                    endpointType: 'integrated'
                    projectName: 'my-project'
                    definitionName: 'Create Templates Indexer'
                    strategy: 'new'
                    stages: 'Release to Dev,Release to QA,Release to INT,Release to Prod'
                    branchName: 'main'
                    updateInterval: 5
                    stageStartAttempts: 10
                    stageStartInterval: 60
                    approvalInterval: 60
                    approvalAttempts: 10

I tried providing stage:'Release to Dev' only, but then i get below error -

image

Do you think you can suggest something here , need to run only for Dev as of now and it should skip upper env stages.

aakanshaverma1310 commented 2 years ago

@dmitryserbin pls check my comment

dmitryserbin commented 2 years ago

If I run this pipeline through release orchestrator pipeline, then the pipeline keeps on running after dev stage gets completes, and show below results

@aakanshaverma1310 seems like you build service account doesn't have approval rights to the environment. You need to add it to the approval users first i.e. next the the real people who normally approve your releases. See docs [here]().

aakanshaverma1310 commented 2 years ago

I have few release variables like below..

image

task - image

im passing their values from release orchestrator task, like below

                - task: releaseorchestrator@2
                  displayName: 'disable-cdc-job'
                  enabled: true
                  inputs:
                    endpointType: 'integrated'
                    projectName: 'myproject'
                    definitionName: 'CDC-Enable-Disable-Release'
                    releaseStrategy: 'create'
                    definitionStage: 'Dev'
                    releaseVariables: Dev-EnableCDCCandidate=true
                    approvalRetry: 0
                    updateInterval: 5 

but i get below error -

image

My intention is to pass the value to my release variables from release orchestrator task. How can achieve that?