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

Added cmdlet Test-VSTeamYamlPipelines for testing YAML pipeline code #272

Merged
merged 21 commits into from
Mar 11, 2020
Merged
Changes from 1 commit
Commits
Show all changes
21 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
26 changes: 23 additions & 3 deletions .docs/Test-VSTeamYamlPipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,31 @@
```PowerShell
PS C:\> Test-VSTeamYamlPipeline -Project DemoProject -PipelineId 24 -FilePath './azure-pipelines.yml'

Build Definition Build Number Status Result
---------------- ------------ ------ ------
Demo-CI Demo-CI-45 notStarted
Name Id url state
---- -- --- -----
-1 https://dev.azure.com/devsdb/3428bdd7-9fed-4c30-a6c9-fcb52f084ab9/_apis/pipelines/24/runs/-1 unknown
```

This example checks the YAML pipeline with ID 24 and the file './azure-pipelines.yml' for consistency on Azure DevOps to see if the changes still work.

### -------------------------- EXAMPLE 2 --------------------------

```PowerShell
PS C:\> $yamlOverride = [string](Get-Content -raw $FilePath)
PS C:\> Test-VSTeamYamlPipeline -Project DemoProject -PipelineId 24 -YamlOverride $yamlOverride
```

This example checks the YAML pipeline with ID 24 and the content of a yaml file in the variable $yamlOverride for consistency on Azure DevOps to see if the changes still work.

### -------------------------- EXAMPLE 3 --------------------------

```PowerShell
PS C:\> $yamlOverride = [string](Get-Content -raw $FilePath)
SebastianSchuetze marked this conversation as resolved.
Show resolved Hide resolved
PS C:\> Test-VSTeamYamlPipeline -Project DemoProject -PipelineId 24
```

This example checks the YAML pipeline with ID 24 for consistency on Azure DevOps to see if the existing YAML of the pipeline works.

## PARAMETERS

<!-- #include "./params/projectName.md" -->
Expand Down Expand Up @@ -66,3 +84,5 @@ PipelineId
If you do not set the default project by called Set-VSTeamDefaultProject before calling Add-VSTeamBuild you will have to type in the names.

## RELATED LINKS

[Get-VSTeamBuildDefinition](Get-VSTeamBuildDefinition.md)