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 GitRepository object to BuildDefinition #82

Merged
merged 40 commits into from
Aug 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
98a0da2
adapt integration test to additional VSTS pool 'Hosted Ubuntu 1604'
KaiWalter Jul 26, 2018
0954436
Updating psd1 and readme but not releasing new version yet.
DarqueWarrior Jul 29, 2018
6895c67
Merge remote-tracking branch 'upstream/master'
KaiWalter Jul 29, 2018
7afb6ed
breaking BuildDefinition down to Target
KaiWalter Jul 29, 2018
2a1ab7d
added integration tests for BuildDefinition
KaiWalter Jul 29, 2018
ac087b0
fixed identation in integration test
KaiWalter Jul 29, 2018
53ba724
added integration tests for BuildDefinition
KaiWalter Jul 29, 2018
2c5d978
Merge branch 'master' of github.com:KaiWalter/vsteam
KaiWalter Jul 29, 2018
6cae4b7
merge upstream
KaiWalter Jul 30, 2018
a279ff2
removed pools.ps1xml again from vsteam.psd1
KaiWalter Jul 31, 2018
7f5dc06
merge upstream
KaiWalter Aug 1, 2018
9809f21
rollback to version w/o Process and Phase
KaiWalter Aug 1, 2018
751f792
added integration test for BuildDefinition
KaiWalter Aug 1, 2018
b8c5491
rollback process and phase breakdown
KaiWalter Aug 1, 2018
288d2e5
fix typo
KaiWalter Aug 1, 2018
5a3fa0d
Merge remote-tracking branch 'upstream/master'
KaiWalter Aug 2, 2018
12e5073
Merge remote-tracking branch 'darquewarrior/master'
DarqueWarrior Aug 3, 2018
d41898d
Updated readme and updated build def tests to run on TFS and VSTS.
DarqueWarrior Aug 3, 2018
c8d1260
Merge remote-tracking branch 'upstream/master'
KaiWalter Aug 3, 2018
aea1e4d
Merge remote-tracking branch 'upstream/master'
KaiWalter Aug 12, 2018
2c2a36e
initial drilldown build def to process, phases, steps
KaiWalter Aug 13, 2018
f0fe9d8
added basic attrs to build def steps
KaiWalter Aug 13, 2018
84a8626
fixed build def unit tests
KaiWalter Aug 13, 2018
e7cb346
adapted formats for typed build defs
KaiWalter Aug 13, 2018
8102338
hooked up build def with PS provider project
KaiWalter Aug 13, 2018
5108cc4
add formats for process+phase+step
KaiWalter Aug 13, 2018
0481690
added missing Build Def + Phase properties
KaiWalter Aug 14, 2018
b7c2898
Merge remote-tracking branch 'upstream/master'
KaiWalter Aug 15, 2018
187f257
Getting Close. All tests passing.
DarqueWarrior Aug 17, 2018
afea396
Merge branch 'reivew'
DarqueWarrior Aug 17, 2018
b32ef6f
100% code coverage on teamspsdrive file.
DarqueWarrior Aug 17, 2018
e43475b
All integration tests passing.
DarqueWarrior Aug 17, 2018
a7fa45d
Added yaml and phased process types.
DarqueWarrior Aug 17, 2018
0c0d97b
Updated help for version class.
DarqueWarrior Aug 18, 2018
b50149c
Fixed broken tests
DarqueWarrior Aug 18, 2018
014258d
realign with upstream
KaiWalter Aug 21, 2018
bb94a10
remove obsolete output from buildDefinitions module
KaiWalter Aug 22, 2018
337172a
added GitRepository object to BuildDefinition
KaiWalter Aug 22, 2018
9a90727
rolled back Get-VSTeamGitRepo in Get-VSTeamBuildDef
KaiWalter Aug 23, 2018
582a113
Merge branch 'master' of github.com:KaiWalter/vsteam
KaiWalter Aug 26, 2018
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Build Definition / Process / Phases / Steps are broken down into separate object
(Get-VSTeamBuildDefinition -ProjectName MyProject -Id 42).Process.Phases[0].Steps[0]
```

<<<<<<< HEAD

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a merge issue snuck in


=======
>>>>>>> upstream/master
## 3.0.7

Removed some common code and took dependency on Trackyon.Utils that did the same things.
Expand Down
1 change: 1 addition & 0 deletions integration/test/010_projects.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ Describe 'VSTeam Integration Tests' -Tag 'integration' {
$buildDefId | Should Not Be $null
$buildDef = Get-VSTeamBuildDefinition -ProjectName $newProjectName -Id $buildDefId
$buildDef.Name | Should Be $($newProjectName + "-CI1")
$buildDef.GitRepository | Should Not be $null
$buildDef.Process.Phases.Count | Should Be 1
$buildDef.Process.Phases[0].Name | Should Be "Phase 1"
$buildDef.Process.Phases[0].Steps.Count | Should Be 1
Expand Down
2 changes: 0 additions & 2 deletions src/buildDefinitions.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ function Get-VSTeamBuildDefinition {
$resp = _callAPI -ProjectName $ProjectName -Id $item -Area build -Resource definitions -Version $([VSTeamVersions]::Build) `
-QueryString @{revision = $revision}

Write-Verbose $resp
$item = [VSTeamBuildDefinition]::new($resp, $ProjectName)

Write-Output $item
Expand All @@ -48,7 +47,6 @@ function Get-VSTeamBuildDefinition {
$objs = @()

foreach ($item in $resp.value) {
Write-Verbose $item
$objs += [VSTeamBuildDefinition]::new($item, $ProjectName)
}

Expand Down
24 changes: 20 additions & 4 deletions src/teamspsdrive.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ class VSTeamAccount : SHiPSDirectory {
[string]$Name
) : base($Name) {
$this.AddTypeName('Team.Account')

# Invalidate any cache of projects.
[VSTeamProjectCache]::timestamp = -1
}

[object[]] GetChildItem() {
Expand Down Expand Up @@ -568,6 +571,7 @@ class VSTeamBuildDefinition : VSTeamDirectory {
[object]$Triggers = $null
[object]$Variables = $null
[object]$Repository = $null
[VSTeamGitRepository]$GitRepository = $null
[object]$RetentionRules = $null
[VSTeamUser]$AuthoredBy = $null
[string]$BuildNumberFormat = $null
Expand All @@ -587,7 +591,6 @@ class VSTeamBuildDefinition : VSTeamDirectory {
$this.Revision = $obj.revision
$this.Variables = $obj.variables
$this.CreatedOn = $obj.createdDate
$this.Repository = $obj.repository
$this.JobAuthorizationScope = $obj.jobAuthorizationScope
$this.AuthoredBy = [VSTeamUser]::new($obj.authoredBy, $Projectname)

Expand All @@ -608,9 +611,17 @@ class VSTeamBuildDefinition : VSTeamDirectory {
$this.Tags = $obj.tags
}

if ($obj.PSObject.Properties.Match('repository').count -gt 0) {
if($obj.repository.type -eq "TfsGit") {
$this.GitRepository = [VSTeamGitRepository]::new($obj.repository, $Projectname)
} else {
$this.Repository = $obj.repository
}
}

# This is only in VSTS. In TFS it is a build property
if ($obj.PSObject.Properties.Match('process').count -gt 0) {
$this.Process = [VSTeamBuildDefinitionProcess]::new($obj.process, $Projectname)
$this.Process = [VSTeamBuildDefinitionProcess]::new($obj.process, $Projectname)
}

# TFS 2017/2018
Expand Down Expand Up @@ -996,8 +1007,13 @@ class VSTeamGitRepository : VSTeamDirectory {
$this.DefaultBranch = $obj.defaultBranch
}

$this.RemoteURL = $obj.remoteURL
$this.Project = [VSTeamProject]::new($obj.project)
if ($obj.PSObject.Properties.Match('remoteURL').count -gt 0) {
$this.RemoteURL = $obj.remoteURL
}

if ($obj.PSObject.Properties.Match('project').count -gt 0) {
$this.Project = [VSTeamProject]::new($obj.project)
}

$this._internalObj = $obj

Expand Down