Cake integration for Octopus variable management
#addin nuget:?package=Cake.OctoVariapus
OctoImportVariables(octopusUrl,
octoProjectName,
octoApiKey,
new List<OctoVariable>
{
new OctoVariable
{
Name = "ConnectionString",
IsSensitive = false,
IsEditable = true,
Value = "DataSource:localhost25",
Scopes = new List<OctoScope>
{
new OctoScope
{
Name = "Environment",
Values = new List<string> { "Development", "Stage" }
},
new OctoScope
{
Name = "Role",
Values = new List<string> { "Development" }
}
}
}
})
[
{
"Name": "ProductApiEndPoint",
"Value": "http://www.developmentProductApi.com",
"IsSensitive": false,
"IsEditable": true,
"Scopes": [
{
"Name": "Environment",
"Values": [
"Development"
]
}
]
},
{
"Name": "ProductApiEndPoint",
"Value": "http://www.stageProductApi.com",
"IsSensitive": false,
"IsEditable": true,
"Scopes": [
{
"Name": "Environment",
"Values": [
"Stage"
]
}
]
},
{
"Name": "ProductApiEndPoint",
"Value": "http://www.productionProductApi.com",
"IsSensitive": false,
"IsEditable": true,
"Scopes": [
{
"Name": "Environment",
"Values": [
"Production"
]
}
]
},
{
"Name": "ConnectionIsSafe",
"Value": "true",
"IsSensitive": false,
"IsEditable": true,
"Scopes": [
{
"Name": "Environment",
"Values": [
"Development",
"Stage",
"Production"
]
},
{
"Name": "Role",
"Values": [
"Development"
]
},
{
"Name": "Machine",
"Values": [
"Oguzhan's Machine Group"
]
},
{
"Name": "Step",
"Values": [
"1. Initial"
]
}
]
}
]
Execution:
OctoImportVariables(octopusUrl,
octoProjectName,
octoApiKey,
"./variables.json")