vsts_create_release: Azure DevOps Project Release Information

View source: R/release.R

vsts_create_releaseR Documentation

Azure DevOps Project Release Information

Description

These functions will allow you to create releases from Azure DevOps.

Usage

vsts_create_release(domain, project, auth_key, body)

Arguments

domain

The name of the Azure DevOps organization.

project

the name of the project in domain to look at

auth_key

authentication key generated by using vsts_auth_key

body

a list of extra parameters that can need to be sent to the API call (* mandatory):

artifacts *

[list] Sets list of artifact to create a release. Check Details for more information.

definitionId *

[integer] Sets definition Id to create a release.

description *

[character] Sets description to create a release.

isDraft

[logical] Sets 'true' to create release in draft mode, 'false' otherwise.

manualEnvironments

[character] Sets list of environments to manual as condition.

properties

[list] The class represents a property bag as a collection of key-value pairs.

reason

[character] Sets reason to create a release.

Details

The artifacts object within the body contains two items:

  • alias[character] Sets alias of artifact.

  • instanceReference[list] Sets instance reference of artifact. e.g. for build artifact it is build number.

For more information about release API calls check https://docs.microsoft.com/en-us/rest/api/vsts/release/releases.

Examples

## Not run: 
# Add in own details to get a non-NULL output
auth_key <- vsts_auth_key("<username>", "<password>")
art_list <- list(
  list(alias = "Art1", instanceReference = list(id = 1)),
  list(alias = "Art2", instanceReference = list(id = 2))
)
body <- list(
  definitionId = 1, description = "R API Release",
  artifacts = I(art_list)
)
vsts_create_release("domain", "project", auth_key, body)

## End(Not run)

ashbaldry/vstsr documentation built on Aug. 24, 2023, 12:11 a.m.