Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Initial version of Save-AzDevOpsBuild #183

Merged
merged 20 commits into from
Jul 14, 2021
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Align psm1 file with actual script
fgheysels committed Jul 12, 2021

Verified

This commit was signed with the committer’s verified signature.
pepoviola Javier Viola
commit dab2f2dd26a8481357f84a8b39a4fb3a76fb7b5a
18 changes: 5 additions & 13 deletions src/Arcus.Scripting.DevOps/Arcus.Scripting.DevOps.psm1
Original file line number Diff line number Diff line change
@@ -80,31 +80,23 @@ Export-ModuleMember -Function Set-AzDevOpsArmOutputsToPipelineVariables
.Description
Indicates that the specified DevOps pipeline-run must be retained indefinetely.
.Parameter OrganizationName
The name of the organization in Azure DevOps. This name will be used in the Uri to the DevOps API: https://dev.azure.com/{OrganizationName}.
.Parameter ProjectId
The Id of the Project in Azure DevOps to which the build that must be retained, belongs to.
(You can use the predefined variable $(System.TeamProjectId) in an Azure DevOps pipeline).
.Parameter BuildId
The Id of the Build that must be retained.
(You can use the predefined variable $(Build.BuildId) in an Azure DevOps pipeline).
.Parameter AccessToken
The JWT access-token that must be used to authenticate with the DevOps API.
(You can use the predefined variable $(System.AccessToken) in an Azure DevOps pipeline).
#>
function Save-AzDevOpsBuild {
param(
[Parameter(Mandatory = $true)][string] $OrganizationName = $(throw "The name of the organization is required"),
param(
[Parameter(Mandatory = $true)][string] $ProjectId = $(throw "ProjectId is required"),
[Parameter(Mandatory = $true)][string] $BuildId = $(throw "BuildId is required"),
[Parameter(Mandatory = $true)][string] $AccessToken = $(throw "An access Token for the DevOps API is required")
[Parameter(Mandatory = $true)][string] $BuildId = $(throw "BuildId is required")
)

. $PSScriptRoot\Scripts\Save-AzDevOpsBuild.ps1 -OrganizationName $OrganizationName -ProjectId $ProjectId -BuildId $BuildId -AccessToken $AccessToken
. $PSScriptRoot\Scripts\Save-AzDevOpsBuild.ps1 -ProjectId $ProjectId -BuildId $BuildId
}

Export-ModuleMember -Function Save-AzDevOpsBuild