Closed fredrikhr closed 1 year ago
@fredrikhr this may be related to backward compatibility in Azure DevOps for legacy domains can you validate?
@mikefactorial I cannot do that since this would change the URL of an in-production system where my entire organization deploys all of their source code.
I have researched a little bit more and discovered the following:
While running the Update Deployment Settings
runs the PowerShell script https://github.com/microsoft/coe-alm-accelerator-templates/blob/CenterofExcellenceALMAccelerator-August2022-HF1/PowerShell/update-deployment-settings.ps1
Ultimately, it calls the New-DeploymentPipelines
function defined at https://github.com/microsoft/coe-alm-accelerator-templates/blob/32ebecfccae4cd34e5a699c875427c8786ebe9a2/PowerShell/update-deployment-settings.ps1#L268-L278
In here, the https://github.com/microsoft/coe-starter-kit repository is cloned and checkout at branch main
(ref.: https://github.com/microsoft/coe-alm-accelerator-templates/blob/32ebecfccae4cd34e5a699c875427c8786ebe9a2/PowerShell/update-deployment-settings.ps1#L298)
Finally coe alm branch
is invoked at https://github.com/microsoft/coe-alm-accelerator-templates/blob/32ebecfccae4cd34e5a699c875427c8786ebe9a2/PowerShell/update-deployment-settings.ps1#L356. But the command only specifies the following parameters:
-o $orgUrl
-p "$projectName"
-r "$repo"
-d "$solutionName"
-a $env:SYSTEM_ACCESSTOKEN
-s $settings
(as printed in the log seen in the initial issue description)The command will ultimately invoke the branch
function defined at https://github.com/microsoft/coe-starter-kit/blob/d7a6df107e46a2ca1ec8999a02101282b51eb8b4/coe-cli/src/commands/devops.ts#L836-L873.
Here we can see that the branch function asks for a pipelineProject
argument. And sure enough the outut log states:
info: Pipeline Project: undefined
I suspect this issue is related to the pipelineProject
argument being unspecified. Note that there has been a change since in the code here since the last release (CoEStarterKit-August2022
). The original code for the branch
function does not ask for a pipelineProject
argument:
I would like to point out that it might not be safe to simply check-out the main branch in the azure-pipelines template. Wouldn't it be better to checkout a commit or tag that is known to work?
@fredrikhr to your last point, yes we are moving away from pulling down the cli from the main branch and shipping the CLI with the templates (https://github.com/microsoft/coe-alm-accelerator-templates/pull/179) going forward. However, this doesn't seem to be the root cause of the issue you are experiencing. There is a known issue with the backward compatibility of the azure devops url. Can you verify that your organization is using the url backward compatibility flag?
@mikefactorial The toggle is set to NOT use the new URL scheme. I do realize that we have to update to this at some point, however our organization has source code and Azure Package feeds that still rely on the old URL scheme. Therefore, I cannot toggle this setting now immediately since that would affect the entire organization. Are you telling me that there is absolutely no way to deal with this? When I set up Dependabot in organization I ran into a similar issue which I could resolve by setting an environment variable that overrode the DevOps URL that was used. Is there a similar approach I could temporarily use here? I would very much like our organization to start using the ALM workflow in order to be able to promote PowerPlatform and its benefits in good conscience to the organization.
@mikefactorial Alternatively, as I understand it the old URL <orgname>.visualstudio.com
will still continue to work, even if I toggle this setting. However, I have not found out for how long this might be the case. Do you have any insights to this (this would possibly help me justify switching to the new URL scheme earlier)?
@fredrikhr Unfortunately, I don't have insight into how or when Azure DevOps will stop allowing the backward compatibility if you toggle it on. Ideally, we would like to add support for this scenario, but it hasn't been raised often so it hasn't been prioritized. If you are able to nail down the specific issue in your investigation and can share that with us via a PR or on this thread, would be happy to review.
Reopening based on regression mentioned in the PR
@mikefactorial I found a new regression today with the newly released CenterofExcellenceALMAccelerator-October2022
tag:
Code above re-introduces the problem using hard-coded uri instead of correctly relying on VSTS predefined variables for the team project URL. The statements in the comment is incorrect. The pipeline defines both the pipeline-project and the target repository as pipeline-resource, therefore both can be accessed using pre-defined variables.
Hmm, I actually need this fixed immediately, so I'll get right on it. Expect a PR from me in next hours or so 😁
This has been resolved closing this issue.
Describe the issue
I have set up our ALM Accelerator with validation, test and production environments. All three environments specified by their Environment URL (i.e.
https://<urlname>.crm<region>.dynamics.com/
).I am exporting a solution from a developer environment. I have set up ALM accelerator to be able to talk to this dev-environment as well (running
coe alm connection add ...
).I have looked for the latest release on the repository https://github.com/microsoft/coe-alm-accelerator-templates and found https://github.com/microsoft/coe-alm-accelerator-templates/releases/tag/CenterofExcellenceALMAccelerator-August2022-HF1 (at the time of writing 12 days old). I pushed
tags/CenterofExcellenceALMAccelerator-August2022-HF1
intomain
in our Azure DevOps azure-pipelines repository, so that ALM Accelerator uses the templates from that release.When pressing the
Commit Solution
button in theALM Accelerator for PowerPlatform
app the pipelineexport-solution-to-git
is launched and completes all steps successfully until reaching the stepUpdate Deployment Settings
where it fails. From what I can see in the output it fails immediately aftertsc
has builtcoe@0.0.1
(presumably when executing the newly builtcoe
tool).Output (actual environment urls redacted):
Expected Behavior
The pipeline
export-solution-to-git
should complete successfully to enable the subsequent steps in the ALM workflow.What component are you experiencing the issue with?
ALM Accelerator Pipelines
What solution version are you using?
1.0.20220726.1
Steps To Reproduce
coe alm generate install -o install.json
, supply values for the validation, test, and prod environments, supply CoE for the managed solution environment. Installall
components.coe alm install -f install.json
coe alm connection add
to create a connection to the dev environmentCommit solution
button next to your solution.Anything else?
No response