Skip to content

Commit

Permalink
breakdown Build Definition / Process / Phases / Steps into objects (#77)
Browse files Browse the repository at this point in the history
* adapt integration test to additional VSTS pool 'Hosted Ubuntu 1604'

* Updating psd1 and readme but not releasing new version yet.

* breaking BuildDefinition down to Target

* added integration tests for BuildDefinition

* fixed identation in integration test

* added integration tests for BuildDefinition

* removed pools.ps1xml again from vsteam.psd1

* rollback to version w/o Process and Phase

* added integration test for BuildDefinition

* rollback process and phase breakdown

* fix typo

* Updated readme and updated build def tests to run on TFS and VSTS.

* initial drilldown build def to process, phases, steps

* added basic attrs to build def steps

* fixed build def unit tests

* adapted formats for typed build defs

* hooked up build def with PS provider project

* add formats for process+phase+step

* added missing Build Def + Phase properties

* Getting Close. All tests passing.
Can navigate build defs for TFS and VSTS

* 100% code coverage on teamspsdrive file.

* All integration tests passing.

* Added yaml and phased process types.
Now they can be formatted differently

* Updated help for version class.
Updated help for update service endpoint
Clear last two Script Analyzer warnings

* Fixed broken tests
  • Loading branch information
KaiWalter authored and DarqueWarrior committed Aug 18, 2018
1 parent bec5c23 commit ec7b2cc
Show file tree
Hide file tree
Showing 73 changed files with 1,532 additions and 695 deletions.
2 changes: 2 additions & 0 deletions .docs/Update-VSTeamServiceEndpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Required: true
Accept pipeline input: true (ByPropertyName)
```
<!-- #include "./params/force.md" -->
## INPUTS
## OUTPUTS
Expand Down
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 4.0.0

**Breaking changes**:
The @VSTeamVersionTable was removed and replaced with a static VSTeamVersions class. This allows the values to flow between the provider and the rest of the functions in the module.

Due to this breaking change _Get-VSTeamAPIVersion_ was added to review the current version being used.

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/77) from [Kai Walter](https://github.com/KaiWalter) which included the following:

Build Definition / Process / Phases / Steps are broken down into separate objects

```PowerShell
(Get-VSTeamBuildDefinition -ProjectName MyProject -Id 42).Process
(Get-VSTeamBuildDefinition -ProjectName MyProject -Id 42).Process.Phases
(Get-VSTeamBuildDefinition -ProjectName MyProject -Id 42).Process.Phases[0].Steps
(Get-VSTeamBuildDefinition -ProjectName MyProject -Id 42).Process.Phases[0].Steps[0]
```


## 3.0.7

Removed some common code and took dependency on Trackyon.Utils that did the same things.
Expand Down Expand Up @@ -243,7 +262,7 @@ You can now tab complete your profiles.

Added support for Profiles. Now you can store different accounts and PATS as a profile using Add-VSTeamProfile. Then you can call Add-VSTeamAccount with the -Profile parameter and the PAT will be read from the profile. This prevents you having to remember the PAT to switch between accounts. Profiles also store the API version to use with the account.

Added $VSTeamVersionTable so you can experiment with different versions of the VSTS/TFS APIs. The variable contains the following:
Added $Global:VSTeamVersionTable so you can experiment with different versions of the VSTS/TFS APIs. The variable contains the following:

- 'Build' = '3.0'
- 'Release' = '3.0-preview'
Expand Down
10 changes: 5 additions & 5 deletions VSTeam.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
RootModule = ''

# Version number of this module.
ModuleVersion = '3.0.7'
ModuleVersion = '4.0.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -62,7 +62,6 @@

# Type files (.ps1xml) to be loaded when importing this module
TypesToProcess = @('types\Approvals.ps1xml',
'types\buildDefinitions.ps1xml',
'types\builds.ps1xml',
'types\cloudSubscriptions.ps1xml',
'types\repositories.ps1xml',
Expand All @@ -80,7 +79,6 @@

# Format files (.ps1xml) to be loaded when importing this module
FormatsToProcess = @('formats\Approvals.format.ps1xml',
'formats\buildDefinitions.format.ps1xml',
'formats\builds.format.ps1xml',
'formats\policyTypes.format.ps1xml',
'formats\profile.format.ps1xml',
Expand Down Expand Up @@ -206,7 +204,8 @@
'Remove-VSTeamAgent',
'Enable-VSTeamAgent',
'Disable-VSTeamAgent',
'Update-VSTeamProfile')
'Update-VSTeamProfile',
'Get-VSTeamAPIVersion')

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
# CmdletsToExport = @()
Expand Down Expand Up @@ -310,7 +309,8 @@
'Remove-Agent',
'Enable-Agent',
'Disable-Agent',
'Update-Profile')
'Update-Profile',
'Get-APIVersion')

# DSC resources to export from this module
# DscResourcesToExport = @()
Expand Down
8 changes: 8 additions & 0 deletions docs/Update-VSTeamServiceEndpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ Required: true
Accept pipeline input: true (ByPropertyName)
```
### -Force
Forces the command without confirmation
```yaml
Type: SwitchParameter
```
## INPUTS
## OUTPUTS
Expand Down
23 changes: 23 additions & 0 deletions en-US/VSTeam-Help.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13480,6 +13480,17 @@ Demo-CI Demo-CI-45 notStarted</dev:code>
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
<maml:name>Force</maml:name>
<maml:Description>
<maml:para>Forces the command without confirmation</maml:para>
</maml:Description>
<dev:type>
<maml:name>SwitchParameter</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>False</dev:defaultValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
Expand Down Expand Up @@ -13521,6 +13532,18 @@ Demo-CI Demo-CI-45 notStarted</dev:code>
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
<maml:name>Force</maml:name>
<maml:Description>
<maml:para>Forces the command without confirmation</maml:para>
</maml:Description>
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
<dev:type>
<maml:name>SwitchParameter</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>False</dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes />
<command:returnValues>
Expand Down
6 changes: 3 additions & 3 deletions en-US/about_vsteam.help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ LONG DESCRIPTION
-ProjectName parameter is dynamic and you can use tab completion to cycle
through all the projects.

Using the $VSTeamVersionTable variable you can control which version of the APIs are used.
Using the [VSTeamVersions] class you can control which version of the APIs are used.

PS C:\> $VSTeamVersionTable
PS C:\> Get-VSTeamAPIVersion

Name Value
---- -----
Expand Down Expand Up @@ -52,7 +52,7 @@ LONG DESCRIPTION

To use different API versions you can update the version in the version table.

PS C:\> $VSTeamVersionTable.Build = '4.0'
PS C:\> [VSTeamVersions]::Build = '4.0'

You can also use Set-VSTeamAPIVersion to set all the API versions for either
TFS2017, TFS2018 or VSTS. TFS2017 is the default.
Expand Down
45 changes: 0 additions & 45 deletions formats/buildDefinitions.format.ps1xml

This file was deleted.

Loading

0 comments on commit ec7b2cc

Please sign in to comment.