Scenario details
- Print
- PDF
Scenario details
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
Views the scenario details of the SourceDeploy project.
Requests
API URL
GET {SOURCEDEPLOY_API_URL}/project/{projectId}/stage/{stageId}/scenario/{scenarioId}
Request parameters
Item | Type | Description | Note |
---|---|---|---|
projectId | string | Project ID | View with projectList API |
stageId | string | stage ID | View with stageList API |
scenarioId | string | Scenario ID | View with scenarioList API |
Request queries
None
Request bodies
None
Responses
Response bodies
{
"project": {
"id": "number",
"name": "string"
},
"stage": {
"id": "number",
"name": "string"
},
"id": "number",
"name": "string",
"description": "string",
"type": "string",
"config": "TScenarioServer" | "TScenarioAutoScaling" | "TSecnarioKubernetesService" | "TSecnarioObjectStorage"
}
Item | Type | Description | Note |
---|---|---|---|
project.id | number | Project ID | |
project.name | string | Project name | |
stage.id | number | stage id | |
stage.name | string | Stage name | |
id | number | Scenario ID | |
name | string | Scenario name | |
description | string | Scenario description | |
type | string | Deployment target type | "Server" |
Config | TScenarioServer | TScenarioAutoScalingGroup | TSecnarioKubernetesService |
TScenarioServer
{
"strategy": "string",
"sequence": "boolean",
"file": {
"type": "string",
"ObjectStorage": {
"bucket": "string",
"object": "string"
},
"SourceBuild": {
"id": "number",
"name": "string"
}
},
"rollback": "boolean",
"cmd": {
"pre": [
{
"user": "string",
"cmd": "string"
}
],
"deploy": [
{
"sourcePath": "string",
"deployPath": "string"
}
],
"post": [
{
"user": "string",
"cmd": "string"
}
]
}
}
Item | Type | Description | Note |
---|---|---|---|
strategy | string | Deployment strategy | "normal" |
sequence | boolean | Consecutive deployment status | |
file.type | string | Deployment file type | "ObjectStorage" |
file.ObjectStorage.bucket | string | ObjectStorage bucket name | file.type=ObjectStorage |
file.ObjectStorage.object | string | ObjectStorage object location | file.type=ObjectStorage |
file.SourceBuild.id | number | SourceBuild id | file.type=SourceBuild |
file.SourceBuild.name | string | SourceBuild project name | file.type=SourceBuild |
rollback | boolean | Roll back if deployment fails | |
cmd.pre.user | string | Run before deployment>Account | |
cmd.pre.cmd | string | Run before deployment>Command | |
cmd.deploy.sourcePath | string | File deployment>Source file path | |
cmd.deploy.deployPath | string | File deployment>Deployment path | |
cmd.post.user | string | Run after deployment>Account | |
cmd.post.cmd | string | Run after deployment>Command |
TScenarioAutoScalingGroup
{
"strategy": "string",
"sequence": "boolean",
"file": {
"type": "string",
"ObjectStorage": {
"bucket": "string",
"object": "string"
},
"SourceBuild": {
"id": "number",
"name": "string"
}
},
"rollback": "boolean",
"cmd": {
"pre": [
{
"user": "string",
"cmd": "string"
}
],
"deploy": [
{
"sourcePath": "string",
"deployPath": "string"
}
],
"post": [
{
"user": "string",
"cmd": "string"
}
]
},
"loadBalancer": {
"loadBalancerTargetGroupNo": "number",
"loadBalancerTargetGroupName": "string",
"deleteAsg": "boolean",
"deleteServer": "boolean"
}
}
Item | Type | Description | Note |
---|---|---|---|
strategy | string | Deployment strategy | "normal" |
sequence | boolean | Consecutive deployment status | |
file.type | string | Deployment file type | "ObjectStorage" |
file.ObjectStorage.bucket | string | ObjectStorage bucket name | file.type=ObjectStorage |
file.ObjectStorage.object | string | ObjectStorage object location | file.type=ObjectStorage |
file.SourceBuild.id | number | SourceBuild id | file.type=SourceBuild |
file.SourceBuild.name | string | SourceBuild project name | file.type=SourceBuild |
rollback | boolean | Roll back if deployment fails | |
cmd.pre.user | string | Run before deployment>Account | |
cmd.pre.cmd | string | Run before deployment>Command | |
cmd.deploy.sourcePath | string | File deployment>Source file path | |
cmd.deploy.deployPath | string | File deployment>Deployment path | |
cmd.post.user | string | Run after deployment>Account | |
cmd.post.cmd | string | Run after deployment>Command | |
loadBalancer.loadBalancerTargetGroupNo | number | Load Balancer target group number | strategy=blueGreen |
loadBalancer.loadBalancerTargetGroupName | string | Load Balancer target group name | strategy=blueGreen |
loadBalancer.deleteAsg | boolean | Existing Auto Scaling Group deletion status | strategy=blueGreen |
loadBalancer.deleteServer | boolean | Deletion status of server in the existing Auto Scaling Group | strategy=blueGreen |
TSecnarioKubernetesService
{
"manifest": {
"type": "string",
"url": "string",
"serverUrl": "string",
"owner": "string",
"repository": "string",
"branch": "string",
"path": ["string"]
},
"strategy": "string",
"canaryConfig": {
"canaryCount": "number",
"analysisType": "string",
"timeout": "number",
"prometheus": "string",
"env": {
"baseline": "string",
"canary": "string"
},
"metrics": [
{
"name": "string",
"successCriteria": "string",
"queryType": "string",
"weight": "number",
"metric": "string",
"filter": "string",
"query": "string"
}
],
"analysisConfig": {
"duration": "number",
"delay": "number",
"interval": "number",
"step": "number"
},
"passScore": "number"
}
}
Item | Type | Description | Note |
---|---|---|---|
strategy | string | Deployment strategy | "rolling" |
manifest.type | string | Manifest file repository | "SourceCommit" |
manifest.url | string | Repository URL | When manifest.type=Github Enterprise Server and logged in with an SSH key |
manifest.serverUrl | string | Server URL | When manifest.type=Github Enterprise Server and logged in with OAuth, Personal Access Token, or Username/Password |
manifest.owner | string | Owner | When manifest.type=Github Enterprise Server |
manifest.repository | string | Repository | |
manifest.branch | string | Repository branch | |
manifest.path | string[] | File location | |
canaryConfig.analysisType | string | Canary analysis method | When strategy=canary, "manual" |
canaryConfig.timeout | number | Maximum time of deployment/cancellation | When strategy=canary & canaryConfig.analysisType=manual |
canaryConfig.canaryCount | number | Number of baselines and canary pods | When strategy=canary & (canaryConfig.analysisType=manual |
canaryConfig.prometheus | string | Prometheus Url | When strategy=canary & canaryConfig.analysisType=auto |
canaryConfig.env.baseline | string | Analysis environment variable > baseline | When strategy=canary & canaryConfig.analysisType=auto |
canaryConfig.env.canary | string | Analysis environment variable > canary | When strategy=canary & canaryConfig.analysisType=auto |
canaryConfig.metrics.name | string | Metric name | When strategy=canary & canaryConfig.analysisType=auto |
canaryConfig.metrics.successCriteria | string | Succeeded criteria | When strategy=canary & canaryConfig.analysisType=auto "base" |
canaryConfig.metrics.queryType | string | Query type | When strategy=canary & canaryConfig.analysisType=auto "default" |
canaryConfig.metrics.weight | number | Weight | strategy=canary & canaryConfig.analysisType=auto |
canaryConfig.metrics.metric | string | Metric | strategy=canary & canaryConfig.analysisType=auto &canaryConfig.metrics.queryType="default" |
canaryConfig.metrics.filter | string | Filter | strategy=canary & canaryConfig.analysisType=auto &canaryConfig.metrics.queryType="default" |
canaryConfig.metrics.query | string | Query | strategy=canary & canaryConfig.analysisType=auto & canaryConfig.metrics.queryType="promQL" |
canaryConfig.analysisConfig.duration | number | Analysis time | strategy=canary & canaryConfig.analysisType=auto |
canaryConfig.analysisConfig.delay | number | Analysis delay time | strategy=canary & canaryConfig.analysisType=auto |
canaryConfig.analysisConfig.interval | number | Analysis cycle | strategy=canary & canaryConfig.analysisType=auto |
canaryConfig.analysisConfig.step | number | Metric collection cycle | strategy=canary & canaryConfig.analysisType=auto |
canaryConfig.passScore | number | Analysis success score | strategy=canary & canaryConfig.analysisType=auto |
TSecnarioObjectStorage
{
"file": {
"type": "string",
"ObjectStorage": {
"bucket": "string",
"object": "string"
},
"SourceBuild": {
"id": "number",
"name": "string"
}
},
"path": [
{
"sourcePath": "string",
"deployPath": "string"
}
]
}
Item | Type | Description | Note |
---|---|---|---|
file.type | string | Deployment file type | "ObjectStorage" |
file.ObjectStorage.bucket | string | ObjectStorage bucket name | file.type=ObjectStorage |
file.ObjectStorage.object | string | ObjectStorage object location | file.type=ObjectStorage |
file.SourceBuild.id | number | SourceBuild id | file.type=SourceBuild |
file.SourceBuild.name | string | SourceBuild project name | file.type=SourceBuild |
path.sourcePath | string | Source file path | |
path.deployPath | string | Deployment path |
Was this article helpful?