Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 17 additions & 77 deletions .octopus/deployment_process.ocl
Original file line number Diff line number Diff line change
@@ -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"
}
}
7 changes: 5 additions & 2 deletions .octopus/deployment_settings.ocl
Original file line number Diff line number Diff line change
@@ -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"
}
}
37 changes: 37 additions & 0 deletions .octopus/runbooks/deprovision-infrastructure.ocl
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
33 changes: 33 additions & 0 deletions .octopus/runbooks/provision-infrastructure.ocl
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
2 changes: 1 addition & 1 deletion .octopus/schema_version.ocl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = 8
version = 10
38 changes: 4 additions & 34 deletions .octopus/variables.ocl
Original file line number Diff line number Diff line change
@@ -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" {}
}
Loading