Skip to content

Commit

Permalink
Merge pull request #42 from karpis/feature/update-vsteambuilddefinition
Browse files Browse the repository at this point in the history
Update-VSTeamBuildDefinition
  • Loading branch information
DarqueWarrior authored Mar 15, 2018
2 parents cae351e + 68f0849 commit 9dddd52
Show file tree
Hide file tree
Showing 8 changed files with 398 additions and 51 deletions.
3 changes: 3 additions & 0 deletions .docs/Team.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,8 @@ Provides access to your Visual Studio Team Services (VSTS) and Team Foundation S
### [Update-VSTeamBuild](Update-VSTeamBuild.md)
#include "./synopsis/Update-VSTeamBuild.md"

### [Update-VSTeamBuildDefinition](Update-VSTeamBuildDefinition.md)
#include "./synopsis/Update-VSTeamBuildDefinition.md"

### [Update-VSTeamProject](Update-VSTeamProject.md)
#include "./synopsis/Update-VSTeamProject.md"
85 changes: 85 additions & 0 deletions .docs/Update-VSTeamBuildDefinition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#include "./common/header.md"

# Update-VSTeamBuildDefinition

## SYNOPSIS
#include "./synopsis/Update-VSTeamBuildDefinition.md"

## SYNTAX

```
Update-VSTeamBuildDefinition [-ProjectName] <String> [-Id] <Int32> [-InFile] <String> [-Force]
```

## DESCRIPTION
Reads a JSON file off disk and uses that file to update an existing
build defintion in the provided project.

You must call Add-VSTeamAccount before calling this function.

## EXAMPLES

### -------------------------- EXAMPLE 1 --------------------------
```
PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 123 -InFile build.json
```

This command reads build.json and updates existing build defintion with
id 123 from it on the demo team project.

## PARAMETERS

### -Id
Specifies the build definition to update by ID.

To find the ID of a build defintion, type Get-VSTeamBuildDefinition.

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -InFile
Specifies the JSON file that contains the updated build defintion.
Enter a path and file name.
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
#include "./params/projectName.md"
## INPUTS
### System.Int32
### System.String
## OUTPUTS
### None
## NOTES
This function has a Dynamic Parameter for ProjectName that specifies the
project for which this function gets build definitions.
You can tab complete from a list of available projects.
You can use Set-VSTeamDefaultProject to set a default project so you do not have
to pass the ProjectName with each call.
## RELATED LINKS
1 change: 1 addition & 0 deletions .docs/synopsis/Update-VSTeamBuildDefinition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updates a build definition for a team project.
135 changes: 93 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,70 @@
![build status](https://loecda.visualstudio.com/_apis/public/build/definitions/3e857acd-880f-4056-a46b-1de672ca55cc/5/badge "Build status")
# Team

![build status](https://loecda.visualstudio.com/_apis/public/build/definitions/3e857acd-880f-4056-a46b-1de672ca55cc/5/badge "Build status")

Home of PowerShell module for accessing TFS and VSTS

To get started you can visit this blog [PowerShell I would like you to meet TFS and VSTS](http://www.donovanbrown.com/post/PowerShell-I-would-like-you-to-meet-TFS-and-VSTS)

# Contributors
## Contributors

The cases of every file is very important. This module is to be used on Windows, Linux and OSx so case is important. If the casing does not match Linux and OSx might fail.

# Release Notes
## 2.1.6
## Release Notes

### 2.1.7

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/42) from [Michal Karpinski](https://github.com/karpis) which included the following:

- Added a function for updating an existing build definition from an input json file

### 2.1.6

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/39) from [Francisco Cabral](https://github.com/franciscocabral) which included the following:

- Fix GET Approval filter by release ids

## 2.1.5
### 2.1.5

Fixed issue [#40](https://github.com/DarqueWarrior/vsteam/issues/40) so adding a SonarQube or AzureRM Service Endpoint returns the endpoint.

## 2.1.4
### 2.1.4

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/37) from [David Roberts](https://github.com/davidroberts63) which included the following:

- Add functions to get/edit code policies

## 2.1.3
### 2.1.3

Added support for Service Endpoint Types
Updated the ValidateSet for StatusFilter of Approvals

## 2.1.2
Fixed issue [#36](https://github.com/DarqueWarrior/vsteam/issues/36) so all git repositories are returned when you do not provide an project.
### 2.1.2

Fixed issue [#36](https://github.com/DarqueWarrior/vsteam/issues/36) so all git repositories are returned when you do not provide an project.

## 2.1.1
Removed the External Module Dependencies so SHiPS is installed with the module.
### 2.1.1

Removed the External Module Dependencies so SHiPS is installed with the module.

### 2.1.0

## 2.1.0
Lots of code refactorying and clean up.

Replaced Add-VSTeamReleaseEnvironment with Set-VSTeamEnvironmentStatus.

## 2.0.2
### 2.0.2

Pushed VSTeamVersionTable to global scope.

Added ReleaseId to release
Added ReleaseId to release

Added Add-VSTeamUser
Added Add-VSTeamUser

Added Invoke-VSTeamRequest. You can now call any REST API supported by TFS2017, TFS2018 or VSTS.

## 2.0.1
### 2.0.1

The module now has a dependency on SHiPS for PSDrive support.

You must be running 6.0.0-rc or later on Mac and Linux.
Expand All @@ -53,10 +74,12 @@ Added drive support created by [Stefan Stranger](https://github.com/stefanstrang

You can now tab complete your profiles.

## 1.0.5
### 1.0.5

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:

- 'Build' = '3.0'
- 'Release' = '3.0-preview'
- 'Core' = '3.0'
Expand All @@ -65,108 +88,136 @@ Added $VSTeamVersionTable so you can experiment with different versions of the V

You can update the version so try new versions of APIs. See Set-VSTeamAPIVersion.

## 1.0.4
### 1.0.4

Added support for Show-VSTeam that opens the configured TFS or VSTS in default browser.

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/26) from [Michel Perfetti](https://github.com/miiitch) which included the following:

- Remove deadlock when endpoint creation failed
## 1.0.3

### 1.0.3

Explicit export of alias
Fixed typo in help
Fixed typo in export of function
Changed projectName dynamic parameter to return projects in any state instead of just well-formed.

## 1.0.2
### 1.0.2

Added Show-VSTeam* functions

Fixed ReleaseDefinition functions not recognized bug

## 1.0.1
### 1.0.1

Renamed from Team to VSTeam. An alias for every function with it's original name is provided.

## 0.1.34
### 0.1.34

Added support to queue a build by ID using the Add-VSTeamBuild function. The Add-VSTeamBuild function also fully qualifies the names of build definitions when you tab complete from command line.

I added new full name extended property to build definition type.

Added support so you can update a project by ID as well as by Name.
## 0.1.33

### 0.1.33

The variable to test if you are on Mac OS changed from IsOSX to IsMacOS. Because I have Set-StrictMode -Version Latest trying to access a variable that is not set will crash.

## 0.1.32
### 0.1.32

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/16) from [Fergal](https://github.com/ObsidianPhoenix) which included the following:

- Added Support for Build Tags
- Added the ability to update KeepForever, and the Build Number
- Added the ability to pull artifact data from the build

## 0.1.31
### 0.1.31

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/17) from [Kees Verhaar](https://github.com/KeesV) which included the following:

- Add ProjectName as a property on team member so it can be used further down the pipeline

## 0.1.30
### 0.1.30

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/15) from [Kees Verhaar](https://github.com/KeesV) which included the following:

- Add support for teams

## 0.1.29
### 0.1.29

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/12) from [Andy Neillans](https://github.com/aneillans) which included the following:

- Fixed for on-premise URLS being incorrectly classed as VSTS accounts
- Fixed for projects validation if you have more than 100 projects

## 0.1.28
### 0.1.28

Added ID to approval default output

## 0.1.27
### 0.1.27

Clearing code analysis warnings

## 0.1.26
### 0.1.26

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/10) from [Roberto Peña](https://github.com/eulesv) which included the following:

- Adding a regular expression to validate VSTS account

## 0.1.25
### 0.1.25

- Moved -Expand parameter of Get-VSTeamRelease to all parameter sets.

## 0.1.24
### 0.1.24

- Added support so you can start a release from a Git commit

## 0.1.23
### 0.1.23

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/8) from [Michel Perfetti](https://github.com/miiitch) which included the following:

- Support for the [SonarQube extension](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube)

## 0.1.22
### 0.1.22

- Fixed bug in Set-VSTeamDefaultProject on Mac and Linux

## 0.1.21
### 0.1.21

- Added Get-VSTeamBuildLog that returns the logs of the provided build

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/6)from [Michel Perfetti](https://github.com/miiitch) which included the following:

- Added serviceEndpoint parameters to Add-VSTeamAzureRMServiceEndpoint cmdlet: if the serviceEndPoint parameters are not specified, the Automatic mode is used
- The _trackProgress function was changed too to reflect the return code of the api (https://www.visualstudio.com/en-us/docs/integrate/api/endpoints/endpoints)
- The URL in the payload changed to https://management.azure.com
- The _trackProgress function was changed too to reflect the return code of the api [endpoints](https://www.visualstudio.com/en-us/docs/integrate/api/endpoints/endpoints)
- The URL in the payload changed to [https://management.azure.com](https://management.azure.com)

### 0.1.19

## 0.1.19
Removed test folder from module

## 0.1.18
### 0.1.18

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/5) from [Christopher Mank](https://github.com/ChristopherMank) which included the following:

- Created new function in the release module named 'Add-VSTeamReleaseEnvironment'. New function deploys an environment from an existing release.

## 0.1.16
### 0.1.16

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/4) from [Andy Neillans](https://github.com/aneillans) which included the following:

- Bug fix for broken PAT code handling.

## 0.1.15
### 0.1.15

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/3) from [Andy Neillans](https://github.com/aneillans) which included the following:

- Corrected typos in help files.
- Refactored location of common methods.
- Implemented using DefaultCredentials when using TFS. This removes the need to create a PAT.

## 0.1.14
### 0.1.14

Initial Open Source release
8 changes: 5 additions & 3 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 = '2.1.6'
ModuleVersion = '2.1.7'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -181,7 +181,8 @@
'Remove-VSTeamUser',
'Add-VSTeamUser',
'Set-VSTeamEnvironmentStatus',
'Get-VSTeamServiceEndpointType')
'Get-VSTeamServiceEndpointType',
'Update-VSTeamBuildDefinition')

# 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 @@ -261,7 +262,8 @@
'ata',
'Set-EnvironmentStatus',
'Add-VSTeamReleaseEnvironment',
'Get-ServiceEndpointType')
'Get-ServiceEndpointType',
'Update-BuildDefinition')

# DSC resources to export from this module
# DscResourcesToExport = @()
Expand Down
Loading

0 comments on commit 9dddd52

Please sign in to comment.