mina
mina copied to clipboard
[CI] Promote Debian and Docker manual job
Intro
Aim of this PR is to allow manual debians and docker promoting.
In context of debian, promoting means moving package from channel a to b while gradation is defined like:
a) unstable -> nightly
b) unstable -> alpha -> beta -> stable
c) unstable -> umt
d) unstable -> itn
In context of docker promoting is an operation of adding a new tag and maybe publishing it to docker.io. For example if we would like to publish docker as nightly we can add new tag: nightly- berkeley-bullseye
in case of umt it can be 2.0.0umt
etc.
How to use pipeline
Manual promoting can be run by triggering it from special pipeline: promote-package
Pipeline setup code looks like below (content is tailored to only essential parameters):
steps:
- commands:
- "./buildkite/scripts/run_promote_build_job.sh | buildkite-agent pipeline upload"
plugins:
environment:
- "DOCKERS=Daemon"
- "TAG=nightly-berkeley-bullseye"
- "VERSION=2.0.0berkeley-rc1-develop-bccb79c-bullseye-berkeley"
- "CODENAME=Bullseye"
- "FROM_CHANNEL=Unstable"
- "TO_CHANNEL=Nightly"
Before running one must modify env variables under environment
section. One can define each of below env variable:
DEBIANS The comma delimitered debian names. For example: 'Daemon,LogProc'
DOCKERS The comma delimitered docker names. For example: 'Daemon,Archive'
CODENAME [Related to DEBIANS] The Debian codename (Bullseye, Buster etc.)
VERSION The Docker or Debian version
FROM_CHANNEL [Related to DEBIANS] The Source debian channel (Unstable, Nightly)
TO_CHANNEL [Related to DEBIANS] The Target debian channel (Unstable, Nightly)
TAG [Related to DOCKERS] The Additional tag for docker
PUBLISH [Related to DOCKERS] The Publish to docker.io flag. If defined, script will publish docker do docker.io. Otherwise it will still resides in gcr.io
There is some relation of parameters, for example TAG is only needed when dockers are defined etc.
Debugging
I experienced that there are strange errors from pipeline like:
024-02-23 19:37:34 FATAL Pipeline parsing of "" failed (Failed to parse pipeline: line 2: mapping values are not allowed in this context) 🚨 Error: The command exited with status 1
Actual error can be revealed after removing | buildkite-agent pipeline upload
part from command
!ci-build-me
!ci-build-me
!ci-build-me
!ci-build-me
!ci-nightly-me
!ci-build-me
!ci-build-me
!ci-build-me
!ci-build-me
!ci-build-me
!ci-build-me
!approved-for-mainnet