Skip to content

Commit

Permalink
fix: Update deployment process to use different user for homebrew pub…
Browse files Browse the repository at this point in the history
…lish (#212)

Use variable for the Git username

fix: Corrected the release-please setup for managing releases
  • Loading branch information
slewis74 authored Jul 14, 2022
1 parent 2fe77d1 commit 3707e96
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: '**'
release:
types: [published, edited]
types: [published]
schedule:
# Daily 5am australian/brisbane time (7pm UTC)
- cron: '0 19 * * *'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ jobs:
- uses: google-github-actions/release-please-action@v3
with:
release-type: simple
token: ${{ secrets.INTEGRATIONS_FNM_BOT_TOKEN }}
97 changes: 54 additions & 43 deletions .octopus/deployment_process.ocl
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
step "Upload OctopusTools to S3 public with hashes" {
step "upload-octopustools-to-s3-public-with-hashes" {
name = "Upload OctopusTools to S3 public with hashes"

action {
properties = {
Octopus.Action.Template.Id = "ActionTemplates-864"
Octopus.Action.Template.Version = "4"
PackageToUpload = "{\"PackageId\":\"OctopusTools.Zips\",\"FeedId\":\"Octopus Server (built-in)\"}"
PackageToUpload = "{\"PackageId\":\"OctopusTools.Zips\",\"FeedId\":\"octopus-server-built-in\"}"
S3BucketPath = "#{AwsBucket}/octopus-tools/#{Octopus.Action.Package[PackageToUpload].PackageVersion}/"
}
worker_pool = "Hosted Windows 2019"
worker_pool = "hosted-windows-2019"

packages "PackageToUpload" {
acquisition_location = "Server"
feed = "Octopus Server (built-in)"
feed = "octopus-server-built-in"
package_id = "OctopusTools.Zips"
properties = {
Extract = "True"
Expand All @@ -22,7 +23,8 @@ step "Upload OctopusTools to S3 public with hashes" {
}
}

step "Push Octopus.DotNet.Cli to NuGet style feed" {
step "push-octopus-dotnet-cli-to-nuget-style-feed" {
name = "Push Octopus.DotNet.Cli to NuGet style feed"
start_trigger = "StartWithPrevious"

action {
Expand All @@ -39,11 +41,11 @@ step "Push Octopus.DotNet.Cli to NuGet style feed" {
Octopus.Action.Script.ScriptSource = "Inline"
Octopus.Action.Script.Syntax = "PowerShell"
}
worker_pool = "Hosted Windows 2019"
worker_pool = "hosted-windows-2019"

packages "NuGet.CommandLine" {
acquisition_location = "Server"
feed = "NuGet"
feed = "nuget"
package_id = "NuGet.CommandLine"
properties = {
Extract = "True"
Expand All @@ -52,7 +54,7 @@ step "Push Octopus.DotNet.Cli to NuGet style feed" {

packages "Octopus.DotNet.Cli" {
acquisition_location = "Server"
feed = "Octopus Server (built-in)"
feed = "octopus-server-built-in"
package_id = "Octopus.DotNet.Cli"
properties = {
Extract = "False"
Expand All @@ -61,7 +63,8 @@ step "Push Octopus.DotNet.Cli to NuGet style feed" {
}
}

step "Push OctopusTools to NuGet style feed" {
step "push-octopustools-to-nuget-style-feed" {
name = "Push OctopusTools to NuGet style feed"
start_trigger = "StartWithPrevious"

action {
Expand Down Expand Up @@ -90,11 +93,11 @@ step "Push OctopusTools to NuGet style feed" {
Octopus.Action.Script.ScriptSource = "Inline"
Octopus.Action.Script.Syntax = "PowerShell"
}
worker_pool = "Hosted Windows 2019"
worker_pool = "hosted-windows-2019"

packages "NuGet.CommandLine" {
acquisition_location = "Server"
feed = "NuGet"
feed = "nuget"
package_id = "NuGet.CommandLine"
properties = {
Extract = "True"
Expand All @@ -103,7 +106,7 @@ step "Push OctopusTools to NuGet style feed" {

packages "OctopusTools" {
acquisition_location = "Server"
feed = "Octopus Server (built-in)"
feed = "octopus-server-built-in"
package_id = "OctopusTools"
properties = {
Extract = "False"
Expand All @@ -112,12 +115,13 @@ step "Push OctopusTools to NuGet style feed" {
}
}

step "Push OctopusTools to Chocolatey" {
step "push-octopustools-to-chocolatey" {
name = "Push OctopusTools to Chocolatey"
start_trigger = "StartWithPrevious"

action {
action_type = "Octopus.Script"
environments = ["Components - External"]
environments = ["components-external"]
properties = {
Octopus.Action.Script.ScriptBody = <<-EOT
$nugetPackagePath = $OctopusParameters["Octopus.Action.Package[NuGet.CommandLine].ExtractedPath"]
Expand All @@ -143,11 +147,11 @@ step "Push OctopusTools to Chocolatey" {
Octopus.Action.Script.ScriptSource = "Inline"
Octopus.Action.Script.Syntax = "PowerShell"
}
worker_pool = "Hosted Windows 2019"
worker_pool = "hosted-windows-2019"

packages "OctopusTools" {
acquisition_location = "Server"
feed = "Octopus Server (built-in)"
feed = "octopus-server-built-in"
package_id = "OctopusTools"
properties = {
Extract = "False"
Expand All @@ -156,7 +160,7 @@ step "Push OctopusTools to Chocolatey" {

packages "NuGet.CommandLine" {
acquisition_location = "Server"
feed = "NuGet"
feed = "nuget"
package_id = "NuGet.CommandLine"
properties = {
Extract = "True"
Expand All @@ -165,26 +169,27 @@ step "Push OctopusTools to Chocolatey" {
}
}

step "Publish Homebrew" {
step "publish-homebrew" {
name = "Publish Homebrew"
start_trigger = "StartWithPrevious"

action {
environments = ["Components - External"]
environments = ["components-external"]
properties = {
Octopus.Action.Template.Id = "ActionTemplates-882"
Octopus.Action.Template.Version = "19"
PackageToUpload = "{\"PackageId\":\"OctopusTools.Zips\",\"FeedId\":\"Octopus Server (built-in)\"}"
PackageToUpload = "{\"PackageId\":\"OctopusTools.Zips\",\"FeedId\":\"octopus-server-built-in\"}"
PubHomebrew-Email = "[email protected]"
PubHomebrew-FileName = "octopuscli.rb"
PubHomebrew-PersonalAccessToken = "#{HomeBrewKey}"
PubHomebrew-RepoName = "homebrew-taps"
PubHomebrew-Username = "OctoBob"
PubHomebrew-Username = "#{HomeBrewGitUsername}"
}
worker_pool = "Hosted Windows 2019"
worker_pool = "hosted-windows-2019"

packages "PackageToUpload" {
acquisition_location = "Server"
feed = "Octopus Server (built-in)"
feed = "octopus-server-built-in"
package_id = "OctopusTools.Zips"
properties = {
Extract = "True"
Expand All @@ -195,12 +200,13 @@ step "Publish Homebrew" {
}
}

step "Publish to APT repo" {
step "publish-to-apt-repo" {
name = "Publish to APT repo"
start_trigger = "StartWithPrevious"

action {
action_type = "Octopus.Script"
environments = ["Components - External"]
environments = ["components-external"]
properties = {
Octopus.Action.Script.ScriptBody = <<-EOT
cd OctopusTools.Packages.linux-x64 || exit
Expand All @@ -218,11 +224,11 @@ step "Publish to APT repo" {
Octopus.Action.Script.ScriptSource = "Inline"
Octopus.Action.Script.Syntax = "Bash"
}
worker_pool = "Hosted Ubuntu"
worker_pool = "hosted-ubuntu"

packages "OctopusTools.Packages.linux-x64" {
acquisition_location = "Server"
feed = "Octopus Server (built-in)"
feed = "octopus-server-built-in"
package_id = "OctopusTools.Packages.linux-x64"
properties = {
Extract = "True"
Expand All @@ -232,12 +238,13 @@ step "Publish to APT repo" {
}
}

step "Publish to RPM repo" {
step "publish-to-rpm-repo" {
name = "Publish to RPM repo"
start_trigger = "StartWithPrevious"

action {
action_type = "Octopus.Script"
environments = ["Components - External"]
environments = ["components-external"]
properties = {
Octopus.Action.Script.ScriptBody = <<-EOT
cd OctopusTools.Packages.linux-x64 || exit
Expand All @@ -255,11 +262,11 @@ step "Publish to RPM repo" {
Octopus.Action.Script.ScriptSource = "Inline"
Octopus.Action.Script.Syntax = "Bash"
}
worker_pool = "Hosted Ubuntu"
worker_pool = "hosted-ubuntu"

packages "OctopusTools.Packages.linux-x64" {
acquisition_location = "Server"
feed = "Octopus Server (built-in)"
feed = "octopus-server-built-in"
package_id = "OctopusTools.Packages.linux-x64"
properties = {
Extract = "True"
Expand All @@ -269,11 +276,12 @@ step "Publish to RPM repo" {
}
}

step "Push Docker Images to Prod" {
step "push-docker-images-to-prod" {
name = "Push Docker Images to Prod"

action {
action_type = "Octopus.Script"
environments = ["Components - External"]
environments = ["components-external"]
properties = {
Octopus.Action.Script.ScriptBody = <<-EOT

Expand Down Expand Up @@ -365,11 +373,11 @@ step "Push Docker Images to Prod" {
Octopus.Action.Script.ScriptSource = "Inline"
Octopus.Action.Script.Syntax = "PowerShell"
}
worker_pool = "Hosted Ubuntu"
worker_pool = "hosted-ubuntu"

packages "Octo.Docker.Image" {
acquisition_location = "Server"
feed = "Octopus Server (built-in)"
feed = "octopus-server-built-in"
package_id = "Octo.Docker.Image"
properties = {
Extract = "False"
Expand All @@ -380,12 +388,13 @@ step "Push Docker Images to Prod" {
}
}

step "Create release in Slipway" {
step "create-release-in-slipway" {
name = "Create release in Slipway"
start_trigger = "StartWithPrevious"

action {
action_type = "Octopus.Script"
environments = ["Components - External"]
environments = ["components-external"]
properties = {
Octopus.Action.Script.ScriptBody = <<-EOT
$slipwayToken = $OctopusParameters["SlipwayToken"]
Expand Down Expand Up @@ -435,11 +444,11 @@ step "Create release in Slipway" {
Octopus.Action.Script.ScriptSource = "Inline"
Octopus.Action.Script.Syntax = "PowerShell"
}
worker_pool = "Hosted Windows 2019"
worker_pool = "hosted-windows-2019"

packages "OctopusTools" {
acquisition_location = "NotAcquired"
feed = "Octopus Server (built-in)"
feed = "octopus-server-built-in"
package_id = "OctopusTools"
properties = {
Extract = "True"
Expand All @@ -448,7 +457,8 @@ step "Create release in Slipway" {
}
}

step "Invalidate CloudFront Cache" {
step "invalidate-cloudfront-cache" {
name = "Invalidate CloudFront Cache"

action {
properties = {
Expand All @@ -458,11 +468,12 @@ step "Invalidate CloudFront Cache" {
Octopus.Action.Template.Id = "ActionTemplates-962"
Octopus.Action.Template.Version = "1"
}
worker_pool = "Hosted Windows 2019"
worker_pool = "hosted-windows-2019"
}
}

step "Invalidate CloudFlare cache of the OctopusTools Manifest" {
step "invalidate-cloudflare-cache-of-the-octopustools-manifest" {
name = "Invalidate CloudFlare cache of the OctopusTools Manifest"

action {
properties = {
Expand All @@ -473,6 +484,6 @@ step "Invalidate CloudFlare cache of the OctopusTools Manifest" {
Octopus.Action.Template.Id = "ActionTemplates-963"
Octopus.Action.Template.Version = "6"
}
worker_pool = "Hosted Windows 2019"
worker_pool = "hosted-windows-2019"
}
}
2 changes: 1 addition & 1 deletion .octopus/deployment_settings.ocl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ versioning_strategy {

donor_package {
package = "PackageToUpload"
step = "Upload OctopusTools to S3 public with hashes"
step = "upload-octopustools-to-s3-public-with-hashes"
}
}
2 changes: 1 addition & 1 deletion .octopus/schema_version.ocl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = 3
version = 4

0 comments on commit 3707e96

Please sign in to comment.