From fe787a69b9da31c54b322d638112b6cf610a8216 Mon Sep 17 00:00:00 2001 From: Edlyn Liew Date: Thu, 23 May 2024 01:26:17 +0000 Subject: [PATCH] Initial setup CaC for OpenTelemetryPlugin [sc-67609] --- .octopus/deployment_process.ocl | 89 ++++++++++++++++++++++++++++++++ .octopus/deployment_settings.ocl | 13 +++++ .octopus/schema_version.ocl | 1 + .octopus/variables.ocl | 13 +++++ 4 files changed, 116 insertions(+) create mode 100644 .octopus/deployment_process.ocl create mode 100644 .octopus/deployment_settings.ocl create mode 100644 .octopus/schema_version.ocl create mode 100644 .octopus/variables.ocl diff --git a/.octopus/deployment_process.ocl b/.octopus/deployment_process.ocl new file mode 100644 index 0000000..7ab2738 --- /dev/null +++ b/.octopus/deployment_process.ocl @@ -0,0 +1,89 @@ +step "deploy-to-internal-teamcity" { + name = "Deploy to Internal TeamCity" + + action { + action_type = "Octopus.Script" + environments = ["test"] + notes = "We can't do this yet because we can't upgrade a plugin without restarting TeamCity server. We hope this feature will be enabled soon. See [TW-12604](https://youtrack.jetbrains.com/issue/TW-12604)." + properties = { + Octopus.Action.Script.ScriptBody = "echo \"Not yet implemented\"" + Octopus.Action.Script.ScriptSource = "Inline" + Octopus.Action.Script.Syntax = "Bash" + } + worker_pool = "hosted-ubuntu" + } +} + +step "publish-to-jetbrains-marketplace" { + name = "Publish to Jetbrains Marketplace" + + action { + action_type = "Octopus.Script" + channels = ["release"] + environments = ["production"] + properties = { + Octopus.Action.Script.ScriptBody = <<-EOT + set -eu + + authHeader="Authorization: Bearer $(get_octopusvariable "jbHubPermanentToken")" + pluginId="$(get_octopusvariable "jbPackageId")" + filePath="$(get_octopusvariable "Octopus.Action.Package[Octopus.TeamCity.OpenTelemetry].PackageFilePath")" + + echo "#{Octopus.Release.Notes | MarkdownToHTML}" >> notes.txt + + channel="$(get_octopusvariable "jbChannel")" + if [ -z $channel ]; then + channel="Stable" + fi + curl -i -s --header "$authHeader" -F pluginId=$pluginId -F file=@$filePath -F channel=$channel -F "notes=