This POST service will perform the same action found on the Release Screen. This service can be is used to create a new releaseFlexDeploy Release, or update an existing one. This API returns the release id, which is a required input for some of the other APIs.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/release/createOrUpdateRelease |
Note |
---|
The authenticated user must be a member of a group which has FlexDeploy Administrator privileges. |
Create New Release Sample JSON Request
| |||||||
---|---|---|---|---|---|---|---|
| Opening bracket Authentication section, used on all types of requests. | ||||||
Required parameters for creating or editing a release. | |||||||
| Create a release named Demo Release The release is to be in | ||||||
Optionally, include any of this information. Verify that your JSON is valid; check for trailing commas if you don't include this section. | |||||||
|
|
|
|
|
|
}
],
"releaseCMSDetails":
[
{
"instanceCode": "SERVICENOW",
"overrideDefaultSettings": true,
"overriddenDefaultConfigurations":
{
"requireChangeTicketForDeployment": true
}
,
"overriddenEnvironmentConfigurations":
[
{
"environmentCode": "DEV",
"requireChangeTicketForDeployment": false
}
,
{
"environmentCode": "TEST",
|
}
]
An optional Description of |
.
Set user "tom"
as the Primary Manager for the release |
Set user "bob"
as the Secondary Manager for the release.
Use the An optional list of Projects and 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 Set the Priority of this project to Build this project in the Put this project in " Using build environment as DEV, if there is only one build environment then this parameter can be omitted. Add the Project located at Set the Priority of this project to Build this project in the Put this project in Optionally Request All Files when performing a |
Configure a Change Management System to be used on the release.
Use the "SERVICENOW"
instance for CMS on this release. Required if using releaseCMSDetails
.
Optionally Override the Default Properties from the CMS
instance for this release.
Use the overriddenDefaultConfigurations
object to update the overridden CMS Default Settings
Specify whether or not to Require a Change Ticket for Deployment of the release projects. (Boolean)
Optionally Override Environment Configurations from the CMS
instance for this release.
Override settings for the "DEV
" Environment.
Do not Require a Change Ticket for Deployment to this environment. (Boolean)
Override settings for the "TEST"
Environment.
. |
(Boolean)
} | Closing bracket |
Parameters
Parameter | Required | Type | Description | |||
---|---|---|---|---|---|---|
| Y | Object | The login information for the user connecting to FlexDeploy. | |||
| Y | String | The name of the release being created or updated. | |||
| Y | String | An updated status for the release. Can be | |||
| N | String | A description to give to the release. | |||
| N | String | The username of the FlexDeploy user to assign as the Primary Manager for this release. | |||
| N | String | The username of the FlexDeploy user to assign as the Secondary Manager for this release. | |||
| N | String | The name of a pipeline to associate to this release. | |||
scheduledBuildExpression | N | String | Cron expression for scheduled build of release projects. For example, 0 0 12 * * ?, which will initiate build for projects at noon everyday. | |||
releaseProjectDetails | N | ListArray | A list An array of projects to be associated to the release. | |||
qualifiedProjectName | Y* | String | The full path within FlexDeploy to a project. | |||
priority | N | Integer | The deploy priority for this project. | |||
streamName | Y*N | String | The SCM stream to use when building this project. Defaults to the main stream. | |||
groupName | N | String | A group on the release to put the project in. | |||
releaseCMSDetails requestAllFiles | N | List | A list of CMS properties to be configured on the release. | instanceCode | Y*Boolean | Should the project use all files? If true, don't specify packageName. If false, specify packageName. |
packageName | N | String | The instance code of a valid CMS instance | |||
overrideDefaultSettings | N | Boolean | Override the CMS instance's configuration. | |||
overriddenDefaultConfigurations | Y* | Object | An object containing the "Default" properties for CMS on the release. | |||
requireChangeTicketForDeployment | Y* | Boolean | Set this to true to require a change ticket for all deployments. | |||
overriddenEnvironmentConfigurations | N | List | A list of environments and properties to override on this release. | |||
environmentCode | Y* | String | The environment code of a valid instance being used in this release. | |||
requireChangeTicketForDeployment | Y* | Boolean | Set this to true to require a change ticket for deployments to this environmentname of the package to be built and deployed. Required if not using all files. | |||
buildEnvironmentCode | N | String | Build 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. |
Info |
---|
Properties marked with an asterisk (*) are only required when using a property that contains them. For example, |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"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"
}]
} |