createOrUpdateRelease (version 0)

This POST service is used to create a new FlexDeploy Release, or update an existing one.  This API returns the release id, which is a required input for some of the other APIs.

API URL

http://host:port/flexdeploy/rest/release/createOrUpdateRelease

The authenticated user must be a member of a group which has FlexDeploy Administrator privileges.

Create New Release Sample JSON Request


{

"authentication": { "userId":"fdadmin", "password":"password1" },

Opening bracket

Authentication section, used on all types of requests.

Required parameters for creating or editing a release.

"releaseName": "Demo Release",

"status": "NOTSTARTED",


Create a release named Demo Release

The release is to be in "NOTSTARTED" status. Available statuses are: [NOTSTARTED, STARTED, SUSPENDED, COMPLETED, ABORTED]

Optionally, include any of this information.

Verify that your JSON is valid; check for trailing commas if you don't include this section.

"description": "This release was created using FlexDeploy's REST API",

"pipelineName": "DemoPipeline",

"scheduledBuildExpression": "",

"releaseProjectDetails":

[{

"qualifiedProjectName": "FlexDeploy/MyFolder/MyApp/MyProject",

"priority": 1,

"streamName": "trunk",

"groupName": "Group1",

"buildEnvironmentCode": "DEV"

},

{

"qualifiedProjectName": "FlexDeploy/MyFolder/MyApp/MyPartialDeployProject",

"priority": 2,

"streamName": "branch1",

"groupName": "Group2",

"requestAllFiles": true

}]

An optional Description of the release.

Use the "DemoPipeline" Pipeline for this release

An optional list of Projects and releaseProjectDetails to associate with the release.

An optional cron expression to setup Scheduled Build for release projects. For example, "0 0 12 * * ?" can be used to perform scheduled build at 12 noon everyday.


Add the Project located at "FlexDeploy/MyFolder/MyApp/MyProject" to the release.

Set the Priority of this project to 1.

Build this project in the trunk Stream.

Put this project in "Group1" on the release.

Using build environment as DEV, if there is only one build environment then this parameter can be omitted.



Add the Project located at "FlexDeploy/MyFolder/MyApp/MyPartialDeployProject" to the release.

Set the Priority of this project to 2.

Build this project in the "branch1" Stream.

Put this project in "Group2" on the release.

Optionally Request All Files when performing a build of a Partial Build project.



}Closing bracket

  

Parameters

Parameter

Required

Type

Description

authentication

Y

Object

The login information for the user connecting to FlexDeploy.

releaseName

Y

String

The name of the release being created or updated.

status

Y

String

An updated status for the release. Can be [NOTSTARTED, STARTED, SUSPENDED, COMPLETED, ABORTED]

description

N

String

A description to give to the release.

primaryManager

N

String

The username of the FlexDeploy user to assign as the Primary Manager for this release.

secondaryManager

N

String

The username of the FlexDeploy user to assign as the Secondary Manager for this release.

pipelineName

N

String

The name of a pipeline to associate to this release.

scheduledBuildExpressionNStringCron expression for scheduled build of release projects. For example, 0 0 12 * * ?, which will initiate build for projects at noon everyday.
releaseProjectDetailsNArrayAn array of projects to be associated to the release.
  qualifiedProjectNameY*StringThe full path within FlexDeploy to a project.
  priorityNIntegerThe deploy priority for this project.
  streamNameNStringThe SCM stream to use when building this project. Defaults to the main stream.
  groupNameNString

A group on the release to put the project in.

  requestAllFilesNBooleanShould the project use all files? If true, don't specify packageName. If false, specify packageName.
  packageNameNStringThe name of the package to be built and deployed. Required if not using all files.
    buildEnvironmentCodeNStringBuild environment code, must be associated with project's build instance. If omitted and only one environment is associated with project's build instance then it will be selected automatically.

Properties marked with an asterisk (*) are only required when using a property that contains them. For example, qualifiedProjectName is only required if releaseProjectDetails is used.

Example JSON
{
	"authentication": { "userId":"fdadmin", "password":"welcome1" },
	"releaseName": "R100",
	"status": "NOTSTARTED",
	"description": "This release was created using FlexDeploy's REST API",
	"pipelineName": "Common Pipeline",
    "scheduledBuildExpression": "0 0 12 * * ?", 
	"releaseProjectDetails":
        [{
            "qualifiedProjectName": "FlexDeploy/Trials/FolderDeployTest/NoActionPartial1",
            "priority": 1,
            "streamName": "master",
            "requestAllFiles": true
        },
        {
            "qualifiedProjectName": "FlexDeploy/Trials/FolderDeployTest/Project1",
            "priority": 2,
            "streamName": "trunk",
            "buildEnvironmentCode": "BUILD"
        }]
}
The following macros are not currently supported in the footer:
  • style