tests/assets/releaseDefinition.json

{
    "source": 2,
    "revision": 82,
    "description": null,
    "createdBy": {
        "displayName": "Mathieu.Gravil",
        "url": "https://app.vssps.visualstudio.com/A7ec1c3fc-8d29-4313-9db5-dd6598c70dd8/_apis/Identities/766ad09b-7243-6a3d-b31f-ad0ff90beda1",
        "_links": {
            "avatar": {
                "href": "https://tgits-code.visualstudio.com/_apis/GraphProfile/MemberAvatars/aad.NzY2YWQwOWItNzI0My03YTNkLWIzMWYtYWQwZmY5MGJlZGEx"
            }
        },
        "id": "766ad09b-7243-6a3d-b31f-ad0ff90beda1",
        "uniqueName": "Mathieu.Gravil@Total.com",
        "imageUrl": "https://tgits-code.visualstudio.com/_apis/GraphProfile/MemberAvatars/aad.NzY2YWQwOWItNzI0My03YTNkLWIzMWYtYWQwZmY5MGJlZGEx",
        "descriptor": "aad.NzY2YWQwOWItNzI0My03YTNkLWIzMWYtYWQwZmY5MGJlZGEx"
    },
    "createdOn": "2019-05-22T15:44:05.023Z",
    "modifiedBy": {
        "displayName": "Mathieu.Gravil",
        "url": "https://app.vssps.visualstudio.com/A7ec1c3fc-8d29-4313-9db5-dd6598c70dd8/_apis/Identities/766ad09b-7243-6a3d-b31f-ad0ff90beda1",
        "_links": {
            "avatar": {
                "href": "https://tgits-code.visualstudio.com/_apis/GraphProfile/MemberAvatars/aad.NzY2YWQwOWItNzI0My03YTNkLWIzMWYtYWQwZmY5MGJlZGEx"
            }
        },
        "id": "766ad09b-7243-6a3d-b31f-ad0ff90beda1",
        "uniqueName": "Mathieu.Gravil@Total.com",
        "imageUrl": "https://tgits-code.visualstudio.com/_apis/GraphProfile/MemberAvatars/aad.NzY2YWQwOWItNzI0My03YTNkLWIzMWYtYWQwZmY5MGJlZGEx",
        "descriptor": "aad.NzY2YWQwOWItNzI0My03YTNkLWIzMWYtYWQwZmY5MGJlZGEx"
    },
    "modifiedOn": "2019-06-06T08:56:15.680Z",
    "isDeleted": false,
    "variables": {
        "appdomainname": {
            "value": "azr.tgscloud.net"
        },
        "apphostname": {
            "value": "games-dev-tetris"
        },
        "appname": {
            "value": "tetris"
        },
        "apppath": {
            "value": "NONE"
        },
        "environment": {
            "value": "test"
        },
        "helmParams": {
            "value": ""
        },
        "projectname": {
            "value": "msa"
        }
    },
    "variableGroups": [],
    "environments": [{
            "id": 32,
            "name": "Stage 1",
            "rank": 1,
            "owner": {
                "displayName": "Mathieu.Gravil",
                "url": "https://app.vssps.visualstudio.com/A7ec1c3fc-8d29-4313-9db5-dd6598c70dd8/_apis/Identities/766ad09b-7243-6a3d-b31f-ad0ff90beda1",
                "_links": {
                    "avatar": {
                        "href": "https://tgits-code.visualstudio.com/_apis/GraphProfile/MemberAvatars/aad.NzY2YWQwOWItNzI0My03YTNkLWIzMWYtYWQwZmY5MGJlZGEx"
                    }
                },
                "id": "766ad09b-7243-6a3d-b31f-ad0ff90beda1",
                "uniqueName": "Mathieu.Gravil@Total.com",
                "imageUrl": "https://tgits-code.visualstudio.com/_apis/GraphProfile/MemberAvatars/aad.NzY2YWQwOWItNzI0My03YTNkLWIzMWYtYWQwZmY5MGJlZGEx",
                "descriptor": "aad.NzY2YWQwOWItNzI0My03YTNkLWIzMWYtYWQwZmY5MGJlZGEx"
            },
            "variables": {},
            "variableGroups": [],
            "preDeployApprovals": {
                "approvals": [{
                        "rank": 1,
                        "isAutomated": true,
                        "isNotificationOn": false,
                        "id": 94
                    }
                ],
                "approvalOptions": {
                    "requiredApproverCount": null,
                    "releaseCreatorCanBeApprover": false,
                    "autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped": false,
                    "enforceIdentityRevalidation": false,
                    "timeoutInMinutes": 0,
                    "executionOrder": 1
                }
            },
            "deployStep": {
                "id": 95
            },
            "postDeployApprovals": {
                "approvals": [{
                        "rank": 1,
                        "isAutomated": true,
                        "isNotificationOn": false,
                        "id": 96
                    }
                ],
                "approvalOptions": {
                    "requiredApproverCount": null,
                    "releaseCreatorCanBeApprover": false,
                    "autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped": false,
                    "enforceIdentityRevalidation": false,
                    "timeoutInMinutes": 0,
                    "executionOrder": 2
                }
            },
            "deployPhases": [{
                    "deploymentInput": {
                        "parallelExecution": {
                            "parallelExecutionType": 0
                        },
                        "agentSpecification": null,
                        "skipArtifactsDownload": false,
                        "artifactsDownloadInput": {
                            "downloadInputs": []
                        },
                        "queueId": 816,
                        "demands": [],
                        "enableAccessToken": false,
                        "timeoutInMinutes": 0,
                        "jobCancelTimeoutInMinutes": 1,
                        "condition": "succeeded()",
                        "overrideInputs": {}
                    },
                    "rank": 1,
                    "phaseType": 1,
                    "name": "Agent job",
                    "refName": null,
                    "workflowTasks": [{
                            "environment": {},
                            "taskId": "068d5909-43e6-48c5-9e01-7c8a94816220",
                            "version": "0.*",
                            "name": "Install Helm 2.16.1",
                            "refName": "",
                            "enabled": true,
                            "alwaysRun": false,
                            "continueOnError": false,
                            "timeoutInMinutes": 0,
                            "definitionType": "task",
                            "overrideInputs": {},
                            "condition": "succeeded()",
                            "inputs": {
                                "helmVersion": "2.16.1",
                                "checkLatestHelmVersion": "false",
                                "installKubeCtl": "true",
                                "kubectlVersion": "1.8.9",
                                "checkLatestKubeCtl": "true"
                            }
                        }, {
                            "environment": {},
                            "taskId": "6c731c3c-3c68-459a-a5c9-bde6e6595b5b",
                            "version": "3.*",
                            "name": "AksLogin",
                            "refName": "",
                            "enabled": true,
                            "alwaysRun": false,
                            "continueOnError": false,
                            "timeoutInMinutes": 0,
                            "definitionType": "task",
                            "overrideInputs": {},
                            "condition": "succeeded()",
                            "inputs": {
                                "targetType": "inline",
                                "filePath": "",
                                "arguments": "",
                                "script": "source $(System.DefaultWorkingDirectory)/Release.bash\nAksLogin $(tenantid) $(subscriptionaks) $(resourcegroup) $(clustername) $(spappid) \'$(sppasswd)\'\n\n",
                                "workingDirectory": "",
                                "failOnStderr": "false",
                                "noProfile": "true",
                                "noRc": "true"
                            }
                        }, {
                            "environment": {},
                            "taskId": "6c731c3c-3c68-459a-a5c9-bde6e6595b5b",
                            "version": "3.*",
                            "name": "AddRepo",
                            "refName": "",
                            "enabled": true,
                            "alwaysRun": false,
                            "continueOnError": false,
                            "timeoutInMinutes": 0,
                            "definitionType": "task",
                            "overrideInputs": {},
                            "condition": "succeeded()",
                            "inputs": {
                                "targetType": "inline",
                                "filePath": "",
                                "arguments": "",
                                "script": "source $(System.DefaultWorkingDirectory)/Release.bash\nAddRepo $(acr-server-login-it) $(acr-user-it) \"$(acr-password-it)\"\nhelm repo list",
                                "workingDirectory": "",
                                "failOnStderr": "false",
                                "noProfile": "true",
                                "noRc": "true"
                            }
                        }, {
                            "environment": {},
                            "taskId": "6c731c3c-3c68-459a-a5c9-bde6e6595b5b",
                            "version": "3.*",
                            "name": "CreateNamespace",
                            "refName": "",
                            "enabled": true,
                            "alwaysRun": false,
                            "continueOnError": false,
                            "timeoutInMinutes": 0,
                            "definitionType": "task",
                            "overrideInputs": {},
                            "condition": "succeeded()",
                            "inputs": {
                                "targetType": "inline",
                                "filePath": "",
                                "arguments": "",
                                "script": "source $(System.DefaultWorkingDirectory)/Release.bash\nCreateNamespace $(projectname) $(environment)",
                                "workingDirectory": "",
                                "failOnStderr": "false",
                                "noProfile": "true",
                                "noRc": "true"
                            }
                        }, {
                            "environment": {},
                            "taskId": "6c731c3c-3c68-459a-a5c9-bde6e6595b5b",
                            "version": "3.*",
                            "name": "CreateDockerSecret",
                            "refName": "",
                            "enabled": true,
                            "alwaysRun": false,
                            "continueOnError": false,
                            "timeoutInMinutes": 0,
                            "definitionType": "task",
                            "overrideInputs": {},
                            "condition": "succeeded()",
                            "inputs": {
                                "targetType": "inline",
                                "filePath": "",
                                "arguments": "",
                                "script": "source $(System.DefaultWorkingDirectory)/Release.bash\nCreateDockerSecret \"$(projectname)-$(environment)\" $(acr-server-login) $(acr-user) $\"(acr-password)\"",
                                "workingDirectory": "",
                                "failOnStderr": "false",
                                "noProfile": "true",
                                "noRc": "true"
                            }
                        }, {
                            "environment": {},
                            "taskId": "6c731c3c-3c68-459a-a5c9-bde6e6595b5b",
                            "version": "3.*",
                            "name": "CreateQuota",
                            "refName": "",
                            "enabled": true,
                            "alwaysRun": false,
                            "continueOnError": false,
                            "timeoutInMinutes": 0,
                            "definitionType": "task",
                            "overrideInputs": {},
                            "condition": "succeeded()",
                            "inputs": {
                                "targetType": "inline",
                                "filePath": "",
                                "arguments": "",
                                "script": "source $(System.DefaultWorkingDirectory)/Release.bash\nCreateQuota $(projectname) $(environment)",
                                "workingDirectory": "",
                                "failOnStderr": "false",
                                "noProfile": "true",
                                "noRc": "true"
                            }
                        }, {
                            "environment": {},
                            "taskId": "6c731c3c-3c68-459a-a5c9-bde6e6595b5b",
                            "version": "3.*",
                            "name": "DeployHelmPackage",
                            "refName": "",
                            "enabled": true,
                            "alwaysRun": false,
                            "continueOnError": false,
                            "timeoutInMinutes": 0,
                            "definitionType": "task",
                            "overrideInputs": {},
                            "condition": "succeeded()",
                            "inputs": {
                                "targetType": "inline",
                                "filePath": "",
                                "arguments": "",
                                "script": "source $(System.DefaultWorkingDirectory)/Release.bash ;source Release.bash\nDeployHelmPackage $(projectname) $(appname) $(environment) $(chartversion) ${RELEASE_ARTIFACTS__BUILD_TOTAL_HP_BUILDNUMBER} $(acr-server-login) $(acr-server-login-it) $(chartname) \"$(helmParams)\" \n",
                                "workingDirectory": "",
                                "failOnStderr": "false",
                                "noProfile": "true",
                                "noRc": "true"
                            }
                        }
                    ]
                }
            ],
            "environmentOptions": {
                "emailNotificationType": "OnlyOnFailure",
                "emailRecipients": "release.environment.owner;release.creator",
                "skipArtifactsDownload": false,
                "timeoutInMinutes": 0,
                "enableAccessToken": false,
                "publishDeploymentStatus": true,
                "badgeEnabled": false,
                "autoLinkWorkItems": false,
                "pullRequestDeploymentEnabled": false
            },
            "demands": [],
            "conditions": [],
            "executionPolicy": {
                "concurrencyCount": 1,
                "queueDepthCount": 0
            },
            "schedules": [],
            "retentionPolicy": {
                "daysToKeep": 30,
                "releasesToKeep": 3,
                "retainBuild": true
            },
            "processParameters": {},
            "properties": {},
            "preDeploymentGates": {
                "id": 0,
                "gatesOptions": null,
                "gates": []
            },
            "postDeploymentGates": {
                "id": 0,
                "gatesOptions": null,
                "gates": []
            },
            "environmentTriggers": []
        }
    ],
    "artifacts": [],
    "triggers": [],
    "releaseNameFormat": "Release-$(rev:r)",
    "tags": [],
    "pipelineProcess": {
        "type": 1
    },
    "properties": {
        "DefinitionCreationSource": {
            "$type": "System.String",
            "$value": "ReleaseNew"
        }
    },
    "id": 0,
    "name": "fakeRelease",
    "path": "\\TGITS-TESTS",
    "projectReference": null,
    "_links": {}
}