roledesk is built on the boilerplate from here on: pipeline 2.0 (queue and scheduler), auth (one password, sessions, passkeys), the deploy kit and its docs, plus the coupling and packaging tests. Downstream copies, unedited. Refreshed from boilerplate/d56949f7d0f6c0bfe5745478e09007bfad67ae87 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
1.2 KiB
PowerShell
37 lines
1.2 KiB
PowerShell
<#
|
|
.SYNOPSIS
|
|
Publish the already-built production image to the registry.
|
|
.DESCRIPTION
|
|
Never rebuilds. If the push fails, fix access or connectivity and run this
|
|
again; the image is already on disk. `docker login` first, with a token
|
|
that has package-write access.
|
|
#>
|
|
[CmdletBinding()]
|
|
param()
|
|
Set-StrictMode -Version Latest
|
|
$ErrorActionPreference = 'Stop'
|
|
. "$PSScriptRoot/_common.ps1"
|
|
|
|
$Image = Setting IMAGE -Required
|
|
$Branch = Setting BRANCH 'production'
|
|
|
|
Push-Location $root
|
|
try {
|
|
$commit = git rev-parse --verify "$Branch^{commit}"
|
|
Assert-Ok 'resolve production commit'
|
|
$sha = (git rev-parse --short $commit.Trim()).Trim()
|
|
Assert-Ok 'resolve image tag'
|
|
$tagged = "${Image}:${sha}"
|
|
$latest = "${Image}:latest"
|
|
docker image inspect $tagged --format '{{.Id}}' | Out-Null
|
|
Assert-Ok "find local $tagged (run step 2 first)"
|
|
# latest must name this candidate, even if another image was built since.
|
|
docker tag $tagged $latest
|
|
Assert-Ok 'tag latest image'
|
|
docker push $tagged
|
|
Assert-Ok 'push commit image'
|
|
docker push $latest
|
|
Assert-Ok 'push latest image'
|
|
Write-Host "Published $tagged and $latest"
|
|
} finally { Pop-Location }
|