mina icon indicating copy to clipboard operation
mina copied to clipboard

[CI] Promote Debian and Docker manual job

Open dkijania opened this issue 1 year ago • 1 comments

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

dkijania avatar Feb 23 '24 21:02 dkijania

!ci-build-me

dkijania avatar Feb 24 '24 10:02 dkijania

!ci-build-me

dkijania avatar Feb 26 '24 11:02 dkijania

!ci-build-me

dkijania avatar Feb 27 '24 10:02 dkijania

!ci-build-me

dkijania avatar Feb 27 '24 18:02 dkijania

!ci-nightly-me

dkijania avatar Feb 27 '24 19:02 dkijania

!ci-build-me

dkijania avatar Feb 28 '24 11:02 dkijania

!ci-build-me

mrmr1993 avatar Feb 29 '24 13:02 mrmr1993

!ci-build-me

dkijania avatar Feb 29 '24 14:02 dkijania

!ci-build-me

dkijania avatar Mar 04 '24 08:03 dkijania

!ci-build-me

dkijania avatar Mar 04 '24 15:03 dkijania

!ci-build-me

dkijania avatar Mar 05 '24 14:03 dkijania

!approved-for-mainnet

mrmr1993 avatar Mar 06 '24 21:03 mrmr1993