feat: update controls in the admin, release token scope, build info in CI images [CI]
ci/woodpecker/push/main-amd64-build Pipeline was successful
ci/woodpecker/push/main-amd64-build Pipeline was successful
The versions page shows each node's update state with update buttons, API tokens get a release scope that can only register releases (used by CI), and the CI image and release builds now pass the tag, commit and build time.
This commit is contained in:
1 parent
993dd5c41c
commit
251e0cee99
17 files changed
+470
-141
No files matched your search
@@ -49,6 +49,7 @@ local_image="localhost/monitor-$component:main-amd64-check"
|
||||
python3 "$root/ci/stage-node-image.py" "$component" "$context"
|
||||
buildah bud --layers --network host --tls-verify=true --arch amd64 \
|
||||
--build-arg APP_VERSION=main \
|
||||
--build-arg "MONITOR_TAG=$dev_tag" --build-arg "MONITOR_COMMIT=${CI_COMMIT_SHA:0:10}" --build-arg "MONITOR_BUILT_AT=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
|
||||
-f "$context/Containerfile" \
|
||||
-t "$local_image" "$context"
|
||||
|
||||
|
||||
@@ -51,6 +51,11 @@ $output = Join-Path $root ".release\publish\$RuntimeIdentifier\$Component"
|
||||
$buildRoot = Join-Path $root ".release\build\$RuntimeIdentifier-$Component"
|
||||
$null = New-Item -ItemType Directory -Force -Path $output
|
||||
|
||||
# 构建信息:程序里显示的 tag、提交、构建时间
|
||||
$env:MONITOR_TAG = if ($env:CI_COMMIT_TAG) { $env:CI_COMMIT_TAG } else { "main-$($env:CI_COMMIT_SHA.Substring(0, 10))" }
|
||||
$env:MONITOR_COMMIT = $env:CI_COMMIT_SHA.Substring(0, 10)
|
||||
$env:MONITOR_BUILT_AT = (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ')
|
||||
|
||||
Push-Location $backend
|
||||
try {
|
||||
& dotnet publish $project `
|
||||
|
||||
@@ -45,6 +45,11 @@ build_root="$root/.release/build/linux-$arch-backend"
|
||||
container_context="$root/.release/container/linux-$arch"
|
||||
mkdir -p "$output" "$build_root" "$container_context/app" "$container_context/data"
|
||||
|
||||
# 构建信息:tag 发布用 tag,main 构建用 main-<提交>
|
||||
export MONITOR_TAG="${MONITOR_TAG:-${tag:-main-${CI_COMMIT_SHA:0:10}}}"
|
||||
export MONITOR_COMMIT="${MONITOR_COMMIT:-${CI_COMMIT_SHA:0:10}}"
|
||||
export MONITOR_BUILT_AT="${MONITOR_BUILT_AT:-$(date -u +%Y-%m-%dT%H:%M:%SZ)}"
|
||||
|
||||
(cd "$root/backend" && dotnet publish src/Monitor.Backend \
|
||||
-m:3 -c Release --no-self-contained \
|
||||
-p:DebugType=none -p:DebugSymbols=false \
|
||||
|
||||
Reference in new issue
Block a user