diff --git a/.octopus/deployment_process.ocl b/.octopus/deployment_process.ocl index fb7fb71319..cfb33b8256 100644 --- a/.octopus/deployment_process.ocl +++ b/.octopus/deployment_process.ocl @@ -1,86 +1,26 @@ -step "upload-microsite-to-aws-s3" { - name = "Upload Microsite to AWS S3" +process_template "run-a-process-template" { + name = "Run a Process Template" + process_template_slug = "deployment-deploy-octopus-microsite" + version_mask = "1.X" - action { - action_type = "Octopus.AwsUploadS3" - is_required = true - properties = { - Octopus.Action.Aws.AssumeRole = "False" - Octopus.Action.Aws.Region = "#{AWS.Region}" - Octopus.Action.Aws.S3.BucketName = "#{AWS.BucketName}" - Octopus.Action.Aws.S3.FileSelections = "[{\"type\":\"MultipleFiles\",\"tags\":[],\"metadata\":[{\"key\":\"Cache-Control\",\"value\":\"604800\"}],\"cannedAcl\":\"public-read\",\"path\":\"\",\"storageClass\":\"STANDARD\",\"bucketKey\":\"\",\"bucketKeyPrefix\":\"\",\"bucketKeyBehaviour\":\"Custom\",\"performVariableSubstitution\":\"False\",\"performStructuredVariableSubstitution\":\"False\",\"autoFocus\":true,\"pattern\":\"**/*\"}]" - Octopus.Action.Aws.S3.PackageOptions = "{\"bucketKey\":\"#{Project.AWS.BucketKey}\",\"bucketKeyBehaviour\":\"Custom\",\"bucketKeyPrefix\":\"\",\"storageClass\":\"STANDARD\",\"cannedAcl\":\"private\",\"variableSubstitutionPatterns\":\"\",\"structuredVariableSubstitutionPatterns\":\"\",\"metadata\":[],\"tags\":[]}" - Octopus.Action.Aws.S3.TargetMode = "FileSelections" - Octopus.Action.AwsAccount.UseInstanceRole = "False" - Octopus.Action.AwsAccount.Variable = "AWS.Account" - Octopus.Action.Package.DownloadOnTentacle = "False" - Octopus.Action.Package.FeedId = "octopus-server-built-in" - Octopus.Action.Package.PackageId = "#{PackageId}" - } - worker_pool = "hosted-ubuntu" - - packages { - acquisition_location = "Server" - feed = "octopus-server-built-in" - package_id = "#{PackageId}" - properties = { - SelectionMode = "immediate" - } - } + package_parameter "Microsite Package" { + feed = "octopus-server-built-in" + package_id = "DocsMicrosite" } -} - -step "clear-aws-cloudfront-cache" { - name = "Clear AWS CloudFront Cache" - action { - action_type = "Octopus.AwsRunScript" - properties = { - Octopus.Action.Aws.AssumeRole = "False" - Octopus.Action.Aws.Region = "#{AWS.Region}" - Octopus.Action.AwsAccount.UseInstanceRole = "False" - Octopus.Action.AwsAccount.Variable = "CloudFront.InvalidationAccount" - Octopus.Action.Script.ScriptBody = <<-EOT - aws cloudfront create-invalidation \ - --distribution-id #{AWS.Distribution} \ - --paths "/*" - EOT - Octopus.Action.Script.ScriptSource = "Inline" - Octopus.Action.Script.Syntax = "Bash" - OctopusUseBundledTooling = "False" - } - worker_pool = "hosted-ubuntu" + parameter "Azure Account" { + value = "Microsite.Azure.Account" + } - container { - feed = "docker-hub" - image = "octopusdeploy/worker-tools:6.2.1-ubuntu.22.04" - } + parameter "Worker Pool" { + value = "WorkerPools-3114" } -} -step "slack-notify-feed-website-automation" { - condition = "Always" - name = "Slack - Notify #feed-website-automation" + parameter "DockerHub Feed" { + value = "Feeds-4847" + } - action { - properties = { - Channel = "#feed-website-automation" - DeploymentInfoText = "#{Octopus.Project.Name} release #{Octopus.Release.Number} to <#{AWS.Website}|#{Octopus.Environment.Name} ↗️>" - HookUrl = "#{FeedWebsiteAutomation.WebHook}" - IconUrl = "https://octopus.com/content/resources/favicon.png" - IncludeErrorMessageOnFailure = "false" - IncludeFieldEnvironment = "True" - IncludeFieldMachine = "false" - IncludeFieldRelease = "True" - IncludeFieldReleaseNotes = "false" - IncludeFieldTenant = "false" - IncludeFieldUsername = "false" - IncludeLinkOnFailure = "True" - Octopus.Action.Template.Id = "ActionTemplates-181" - Octopus.Action.Template.Version = "10" - OctopusBaseUrl = "https://tenpillars.octopus.app" - Username = "Octopus Deploy" - } - worker_pool = "hosted-ubuntu" + parameter "Ephemeral Environment" { + value = "Environments-12022" } } \ No newline at end of file diff --git a/.octopus/deployment_settings.ocl b/.octopus/deployment_settings.ocl index 799f0a9dc9..7a33320de8 100644 --- a/.octopus/deployment_settings.ocl +++ b/.octopus/deployment_settings.ocl @@ -1,10 +1,13 @@ +cancel_queued_tasks = true +cancel_running_tasks = true + connectivity_policy { allow_deployments_to_no_targets = true } versioning_strategy { - donor_package { - step = "upload-microsite-to-aws-s3" + package = "microsite-package" + step = "run-a-process-template-upload-site-to-azure-blob" } } \ No newline at end of file diff --git a/.octopus/runbooks/deprovision-infrastructure.ocl b/.octopus/runbooks/deprovision-infrastructure.ocl new file mode 100644 index 0000000000..9e1d5f66e8 --- /dev/null +++ b/.octopus/runbooks/deprovision-infrastructure.ocl @@ -0,0 +1,37 @@ +name = "Deprovision Infrastructure" +cancel_queued_tasks = true +cancel_running_tasks = true +default_guided_failure_mode = "EnvironmentDefault" +description = "" + +connectivity_policy { + allow_deployments_to_no_targets = true +} + +run_retention_policy { + type = "Default" +} + +process { + process_template "run-a-process-template" { + name = "Run a Process Template" + process_template_slug = "runbook-deprovision-microsite" + version_mask = "1.X" + + parameter "Azure Account" { + value = "Microsite.Azure.Account" + } + + parameter "Worker Pool" { + value = "WorkerPools-3114" + } + + parameter "DockerHub Feed" { + value = "Feeds-4847" + } + + parameter "Manual Intervention Environment" { + value = "Environments-12021" + } + } +} \ No newline at end of file diff --git a/.octopus/runbooks/provision-infrastructure.ocl b/.octopus/runbooks/provision-infrastructure.ocl new file mode 100644 index 0000000000..88c7beda02 --- /dev/null +++ b/.octopus/runbooks/provision-infrastructure.ocl @@ -0,0 +1,33 @@ +name = "Provision Infrastructure" +cancel_queued_tasks = true +cancel_running_tasks = true +default_guided_failure_mode = "EnvironmentDefault" +description = "" + +connectivity_policy { + allow_deployments_to_no_targets = true +} + +run_retention_policy { + type = "Default" +} + +process { + process_template "run-a-process-template" { + name = "Run a Process Template" + process_template_slug = "runbook-provision-microsite" + version_mask = "1.X" + + parameter "Azure Account" { + value = "Microsite.Azure.Account" + } + + parameter "Worker Pool" { + value = "WorkerPools-3114" + } + + parameter "DockerHub Feed" { + value = "Feeds-4847" + } + } +} \ No newline at end of file diff --git a/.octopus/schema_version.ocl b/.octopus/schema_version.ocl index b6e3687a8a..500586ece7 100644 --- a/.octopus/schema_version.ocl +++ b/.octopus/schema_version.ocl @@ -1 +1 @@ -version = 8 \ No newline at end of file +version = 10 \ No newline at end of file diff --git a/.octopus/variables.ocl b/.octopus/variables.ocl index b8bdfa50d4..c5393abc37 100644 --- a/.octopus/variables.ocl +++ b/.octopus/variables.ocl @@ -1,37 +1,7 @@ -variable "AWS.Website" { - value "http://octopus-docs-production.s3-website-us-east-1.amazonaws.com/docs" { - environment = ["live"] - } - - value "http://octopus-docs-staging.s3-website-us-east-1.amazonaws.com/docs" { - environment = ["test"] - } -} - -variable "AWS.Region" { - value "us-east-1" {} -} - -variable "AWS.Distribution" { - value "E1M91AW6ZECI94" { - environment = ["live"] - } - - value "E2ABBGFOMEE5DL" { - environment = ["test"] - } -} - -variable "AWS.BucketName" { - value "octopus-docs-production" { - environment = ["live"] - } - - value "octopus-docs-staging" { - environment = ["test"] - } +variable "micrositeprefix" { + value "docs" {} } -variable "PackageId" { - value "DocsMicrosite" {} +variable "GitHub.Repository" { + value "OctopusDeploy/Docs" {} } \ No newline at end of file