Add Azure DevOps support#125
Merged
ljtill merged 36 commits intoAzure:mainfrom Aug 6, 2020
ljtill:feat/azdevops
Merged
Conversation
* AzOps pipeline [skip ci] * Move pipeline * Merged PR 20: Use ADO APIs Related work items: #85, #86, #87, #88 * Merged PR 21: Revert 'Use ADO APIs' Reverts !20 * Ado (#2) * Reset AzOps pipeline * Merged PR 18: Support for SCMPlatform Prepares the ground for working with ADO Related work items: #85 * Merged PR 19: AzOps-ContainerBuildAndPush Related work items: #86 * Use ADO APIs to raise PRs/comments/labels * remove unused var * Update *.parameters.json location (#7) * Update *.parameters.json location * Update ubuntu-latest.yml * Update ubuntu-latest.yml * Update ubuntu-latest.yml * Update AzOpsDockerBuild.yml for Azure Pipelines * Update AzOpsDockerBuild.yml for Azure Pipelines * Devug azure creds * Update AzOpsDockerBuild.yml for Azure Pipelines * Remove debugging * debugthisshiz * Update triggers * debug git * is git installed? * moar * Remove debugging * Enable parallel jobs in pipeline (#10) * Update pipeline to allow parallel test runs * Add variables for important values * Added dependsOn for 2nd stage jobs * Update timeoutInMinutes variable * Remove quotes from PSVersionTable * Move environment configuration to script * Move Initialize-AzOpsTestEnvironment to /test/scripts/ folder * Add query params for get PR * Add verbose output * Add token output * Change git merge to git reset * Add force push * Move token output outside if block * Attempt response.count for REST response * Add active check for PR query * removing azops reference folder (#12) * removing azopsreference * changing variable name to AzOpsReferenceFolder * changing Write-Ouput to Write-AzOpsLog * adding AzOps Log * Move pipeline * Reset AzOps pipeline * AzOps pipeline [skip ci] * Merged PR 18: Support for SCMPlatform Prepares the ground for working with ADO Related work items: #85 * Merged PR 19: AzOps-ContainerBuildAndPush Related work items: #86 * Use ADO APIs to raise PRs/comments/labels * remove unused var * Update AzOpsDockerBuild.yml for Azure Pipelines * Update AzOpsDockerBuild.yml for Azure Pipelines * Devug azure creds * Update AzOpsDockerBuild.yml for Azure Pipelines * Remove debugging * debugthisshiz * Update triggers * debug git * is git installed? * moar * Remove debugging * Add query params for get PR * Add verbose output * Add token output * Change git merge to git reset * Add force push * Move token output outside if block * Attempt response.count for REST response * Add active check for PR query * removing stong type from save-azopsmg (#13) * Update container tag * Moar variables * Create ado specific comment * Add replaceme tags Co-authored-by: Matt White <mawhi@microsoft.com> Co-authored-by: Matt White <Matthew.White@microsoft.com> Co-authored-by: Lyon J Till <158992+ljtill@users.noreply.github.com> Co-authored-by: Kevin Rowlandson <kevin.rowlandson@monoconsultancy.com> Co-authored-by: uday31in <14359777+uday31in@users.noreply.github.com> * AzOps pipeline [skip ci] * Move pipeline * Merged PR 20: Use ADO APIs Related work items: #85, #86, #87, #88 * Merged PR 21: Revert 'Use ADO APIs' Reverts !20 * Ado (#2) * Reset AzOps pipeline * Merged PR 18: Support for SCMPlatform Prepares the ground for working with ADO Related work items: #85 * Merged PR 19: AzOps-ContainerBuildAndPush Related work items: #86 * Use ADO APIs to raise PRs/comments/labels * remove unused var * Update *.parameters.json location (#7) * Update *.parameters.json location * Update ubuntu-latest.yml * Update ubuntu-latest.yml * Update ubuntu-latest.yml * Update AzOpsDockerBuild.yml for Azure Pipelines * Update AzOpsDockerBuild.yml for Azure Pipelines * Devug azure creds * Update AzOpsDockerBuild.yml for Azure Pipelines * Remove debugging * debugthisshiz * Update triggers * debug git * is git installed? * moar * Remove debugging * Enable parallel jobs in pipeline (#10) * Update pipeline to allow parallel test runs * Add variables for important values * Added dependsOn for 2nd stage jobs * Update timeoutInMinutes variable * Remove quotes from PSVersionTable * Move environment configuration to script * Move Initialize-AzOpsTestEnvironment to /test/scripts/ folder * Add query params for get PR * Add verbose output * Add token output * Change git merge to git reset * Add force push * Move token output outside if block * Attempt response.count for REST response * Add active check for PR query * removing azops reference folder (#12) * removing azopsreference * changing variable name to AzOpsReferenceFolder * changing Write-Ouput to Write-AzOpsLog * adding AzOps Log * Move pipeline * Reset AzOps pipeline * AzOps pipeline [skip ci] * Merged PR 18: Support for SCMPlatform Prepares the ground for working with ADO Related work items: #85 * Merged PR 19: AzOps-ContainerBuildAndPush Related work items: #86 * Use ADO APIs to raise PRs/comments/labels * remove unused var * Update AzOpsDockerBuild.yml for Azure Pipelines * Update AzOpsDockerBuild.yml for Azure Pipelines * Devug azure creds * Update AzOpsDockerBuild.yml for Azure Pipelines * Remove debugging * debugthisshiz * Update triggers * debug git * is git installed? * moar * Remove debugging * Add query params for get PR * Add verbose output * Add token output * Change git merge to git reset * Add force push * Move token output outside if block * Attempt response.count for REST response * Add active check for PR query * removing stong type from save-azopsmg (#13) * Update container tag * Moar variables * Create ado specific comment * Add replaceme tags Co-authored-by: Matt White <mawhi@microsoft.com> Co-authored-by: Matt White <Matthew.White@microsoft.com> Co-authored-by: Lyon J Till <158992+ljtill@users.noreply.github.com> Co-authored-by: Kevin Rowlandson <kevin.rowlandson@monoconsultancy.com> Co-authored-by: uday31in <14359777+uday31in@users.noreply.github.com> * title & & body for ADO PR * Remove INPUT prefix from SCMPLATFORM variable name * Use $(Build.SourceBranchName) for docker tag * Updated AzOpsDockerBuild.yml * Fix env var name * Update AzOpsDockerBuild.yml for Azure Pipelines * Update AzOpsDockerBuild.yml for Azure Pipelines * Add replaceme tags * Correct GH references * Remove as this is now included upstream * Remove explicit -Verbose * Add Out-Nulls to REST requests * Remove null redirects Co-authored-by: Matt White <Matthew.White@microsoft.com> Co-authored-by: Matt White <mawhi@microsoft.com> Co-authored-by: Lyon J Till <158992+ljtill@users.noreply.github.com> Co-authored-by: Kevin Rowlandson <kevin.rowlandson@monoconsultancy.com> Co-authored-by: uday31in <14359777+uday31in@users.noreply.github.com>
uday31in
previously approved these changes
Aug 4, 2020
Member
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
uday31in
reviewed
Aug 5, 2020
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
uday31in
approved these changes
Aug 6, 2020
Member
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per PR (#19):
This change has been borne of customer requirements, they have an existing investment in ADO and do not wish to migrate to GH Enterprise.
@liamfoneill and @matt-FFFFFF have jointly worked on this capability.
This PR should be considered in conjunction with the corresponding change to the Enterprise-Scale repo Azure/Enterprise-Scale#22
Change summary:
AzOps Pull Use git reset --hard origin/main to reset system branch, then force push. This is to fix a bug where the system branch already existed and main did not contain a ./azops directory. In this case there would be no changes from system->main so the PR would not be created.
Action Introduce a input called SCMPlatform - this is set to GitHub by default and does not change any functionality in the GitHub workflow. switch statements are used where the PowerShell calls out to the APIs for creating PRs, PR comments, etc.
ADO Implementation
The ADO pipeline works by pulling the AzOps Docker image from a registry. Additional environment variables are used to pass in required information and to make the container function in ADO.
We know ADO is not the priority at the moment, but we are in the situation where we have to support our customer. Keeping this ADO solution in sync with the upstream repo will be very time consuming and this PR means we don't have to be refreshing our code to keep up to date.
Conversely, we believe that this does not introduce significant ongoing maintenance work for the maintainers of this repo.