Skip to content

Commit

Permalink
fix: octopus deploy process for homebrew
Browse files Browse the repository at this point in the history
* Octopus Schema Migration to v6

* Update deployment process
  • Loading branch information
domenicsim1 committed Sep 14, 2023
1 parent 8020fef commit 3c82836
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions .octopus/deployment_process.ocl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ step "push-cli-to-chocolatey" {
}
}
exit 1
EOT
EOT
Octopus.Action.Script.ScriptSource = "Inline"
Octopus.Action.Script.Syntax = "PowerShell"
}
Expand Down Expand Up @@ -79,7 +79,7 @@ step "push-homebrew-formula-updates-to-the-homebrew-taps-repo" {

$githubtoken = $OctopusParameters["Publish:HomeBrew:ApiKey"]
$origin="https://${githubtoken}@github.com/OctopusDeploy/homebrew-taps"

}

if (!$packageVersion || !$extractedPath) {
Expand All @@ -91,23 +91,23 @@ step "push-homebrew-formula-updates-to-the-homebrew-taps-repo" {

git clone --depth 1 $origin octopus-homebrew-taps
cd octopus-homebrew-taps

if ($gitUserName) {
git config user.name $gitUserName
git config user.email $gitUserEmail
}

$branchName = "releases/$packageVersion"
git checkout -b $branchName

Copy-Item -Path "$extractedPath/*" -Filter "*.rb" -Destination "." -Force

Copy-Item -Path "$extractedPath/homebrew/*" -Filter "*.rb" -Destination "." -Force
git diff-index --quiet HEAD || (git commit -a -m "Update for release $packageVersion" `
&& git push --repo $origin --set-upstream origin $branchName `
)

cd ..
EOT
EOT
Octopus.Action.Script.ScriptSource = "Inline"
Octopus.Action.Script.Syntax = "PowerShell"
}
Expand Down Expand Up @@ -151,7 +151,7 @@ step "publish-to-apt-repo" {
--env AWS_SECRET_ACCESS_KEY="$(get_octopusvariable "LinuxPackagePublisherAwsAccount.SecretKey")" \
octopusdeploy/publish-linux bash -c 'cd /working && bash publish-apt.sh' 2>&1 || exit

EOT
EOT
Octopus.Action.Script.ScriptSource = "Inline"
Octopus.Action.Script.Syntax = "Bash"
}
Expand Down Expand Up @@ -189,7 +189,7 @@ step "publish-to-rpm-repo" {
--env AWS_SECRET_ACCESS_KEY="$(get_octopusvariable "LinuxPackagePublisherAwsAccount.SecretKey")" \
octopusdeploy/publish-linux bash -c 'cd /working && bash publish-rpm.sh' 2>&1 || exit

EOT
EOT
Octopus.Action.Script.ScriptSource = "Inline"
Octopus.Action.Script.Syntax = "Bash"
}
Expand Down
2 changes: 1 addition & 1 deletion .octopus/deployment_settings.ocl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ deployment_changes_template = <<-EOT
#{each release in Octopus.Deployment.Changes}
#{release.ReleaseNotes}
#{/each}
EOT
EOT

connectivity_policy {
}
Expand Down
2 changes: 1 addition & 1 deletion .octopus/schema_version.ocl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = 5
version = 6

0 comments on commit 3c82836

Please sign in to comment.