Skip to content
Draft
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
1 change: 1 addition & 0 deletions .github/workflows/go-releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
dist/*.rpm
dist/*.deb
dist/**/*.rb
dist/scoop/*.json

msi:
needs: goreleaser
Expand Down
14 changes: 14 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,17 @@ brews:
# bash_completion.install "completions/octopus.bash" => "octopus"
# zsh_completion.install "completions/octopus.zsh" => "_octopus"
# fish_completion.install "completions/octopus.fish"

scoops:
- name: "octopus-cli"

repository:
owner: OctopusDeploy
name: scoop-octopus

homepage: "https://github.com/OctopusDeploy/cli"
description: "The New CLI (octopus) for Octopus Deploy, a user-friendly DevOps tool for developers that supports release management, deployment automation, and operations runbooks"
license: "Apache-2.0"

# as with brews, Octopus pushes the generated manifest to the bucket repo
skip_upload: true
77 changes: 77 additions & 0 deletions .octopus/deployment_process.ocl
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,83 @@ step "push-homebrew-formula-updates-to-the-homebrew-taps-repo" {
}
}

step "push-scoop-manifest-to-the-scoop-bucket-repo" {
name = "Push scoop manifest to the scoop bucket repo"
start_trigger = "StartWithPrevious"

action {
action_type = "Octopus.Script"
environments = ["production"]
properties = {
Octopus.Action.Script.ScriptBody = <<-EOT
# push-scoop-manifest.ps1
param(
[String]$packageVersion, # e.g. "0.2.2"
[String]$extractedPath, # e.g. "C:\Users\Orion\Downloads\octopus-cli.0.2.2"
[String]$githubtoken
)

$origin="https://github.com/OctopusDeploy/scoop-octopus"

if ($OctopusParameters) {
$packageVersion = $OctopusParameters["Octopus.Action.Package[cli].PackageVersion"]
$extractedPath = $OctopusParameters["Octopus.Action.Package[cli].ExtractedPath"]
$gitUserName = $OctopusParameters["Publish:Scoop:Username"]
$gitUserEmail = $OctopusParameters["Publish:Scoop:UserEmail"]

$githubtoken = $OctopusParameters["Publish:Scoop:ApiKey"]
$origin="https://$($gitUserName):$($githubtoken)@github.com/OctopusDeploy/scoop-octopus"

}

if (!$packageVersion -or !$extractedPath) {
throw "Error: packageVersion or extractedPath are not set"
exit
} else {
write-host "Using: packageVersion $packageVersion from $extractedPath"
}

git clone --depth 1 $origin octopus-scoop-bucket
Set-Location octopus-scoop-bucket

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

# a scoop bucket is machine-maintained; commit straight to the default branch
New-Item -ItemType Directory -Path "bucket" -Force | Out-Null
Copy-Item -Path "$extractedPath/scoop/*" -Filter "*.json" -Destination "bucket" -Force

git diff-index --quiet HEAD || (git commit -a -m "Update for release $packageVersion" `
&& git push --repo $origin `
)

Set-Location ..
EOT
Octopus.Action.Script.ScriptSource = "Inline"
Octopus.Action.Script.Syntax = "PowerShell"
}
worker_pool = "hosted-ubuntu"

container {
feed = "docker-hub"
image = "octopusdeploy/worker-tools:6.6.4-ubuntu.24.04"
}

packages "cli" {
acquisition_location = "Server"
feed = "octopus-server-built-in"
package_id = "octopus-cli"
properties = {
Extract = "True"
Purpose = ""
SelectionMode = "immediate"
}
}
}
}

step "publish-to-apt-repo" {
name = "Publish to APT repo"
start_trigger = "StartWithPrevious"
Expand Down
23 changes: 20 additions & 3 deletions DISTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ goreleaser --> msi --> generate-packages-and-publish
subgraph "goreleaser"
build --> uploadToGHA

build[Build CLI binaries for all architectures including deb, rpm and generate homebrew formula]
uploadToGHA[Upload binaries+linux packages+homebrew formula to GHA artifact]
build[Build CLI binaries for all architectures including deb, rpm and generate homebrew formula + scoop manifest]
uploadToGHA[Upload binaries+linux packages+homebrew formula+scoop manifest to GHA artifact]
end
subgraph "msi"
fetch --> buildmsi --> signmsi --> attachMSIToRelease --> uploadMSIToGHA
Expand Down Expand Up @@ -72,11 +72,28 @@ flowchart LR
start[Fetch octopus-cli-VERSION.zip]
choco-push[Push CLI to chocolatey]
homebrew-pr[Create pull request to update homebrew]
scoop-push[Push manifest to the scoop bucket]
winget-pr[Create pull request to update winget]
apt-push[Publish to APT repo]
rpm-push[Publish to RPM repo]

start-->choco-push
start-->homebrew-pr
start-->scoop-push
start-->winget-pr
start-->apt-push
start-->rpm-push
```
```

## Scoop

Unlike the other Windows channels, Scoop is served from a bucket repository we own,
[OctopusDeploy/scoop-octopus](https://github.com/OctopusDeploy/scoop-octopus) — the official
`ScoopInstaller/Main` bucket only accepts widely-adopted tools (500+ stars, 150+ forks).

GoReleaser generates `dist/scoop/octopus-cli.json` from the Windows zip archives, and because
`skip_upload` is set it does not publish it; the Octopus deployment process commits the manifest
into `bucket/` in the bucket repo, mirroring how the homebrew formula is handled.

The manifest covers both `64bit` and `arm64`, so Scoop is currently the only Windows package
manager through which we ship a native ARM build.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ winget install OctopusDeploy.Cli

*Note:* At this time, the winget package is x64 only. If you are using Windows on ARM, download the manual archive instead.

#### Windows - Scoop

```shell
scoop bucket add octopus https://github.com/OctopusDeploy/scoop-octopus
scoop install octopus-cli
```

The Scoop package has native support for Windows x64 and Windows on ARM.

#### macOS - Homebrew

```shell
Expand Down