Skip to content

Commit 544fefa

Browse files
[Release|CI/CD] Fixes for the promote rc to final flow (paritytech#7877)
This PR contains few fixes for the Promote RC to final flow: - Now the `polkadot-preapre-worker` and `polkadot-execute-worker` artefacts will be uploaded alongside with the `polakdot` artefact (it was missing before) - Added missing upload of the deb package - Few typos fixed Closes: paritytech/release-engineering#241
1 parent e9a15dc commit 544fefa

6 files changed

+27
-21
lines changed

.github/scripts/common/lib.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -243,17 +243,17 @@ fetch_release_artifacts() {
243243
# - REPO in the form paritytech/polkadot
244244
fetch_debian_package_from_s3() {
245245
BINARY=$1
246-
echo "Version : $VERSION"
246+
echo "Version : $NODE_VERSION"
247247
echo "Repo : $REPO"
248248
echo "Binary : $BINARY"
249-
echo "Tag : $RELEASE_TAG"
249+
echo "Tag : $VERSION"
250250
OUTPUT_DIR=${OUTPUT_DIR:-"./release-artifacts/${BINARY}"}
251251
echo "OUTPUT_DIR : $OUTPUT_DIR"
252252

253253
URL_BASE=$(get_s3_url_base $BINARY)
254254
echo "URL_BASE=$URL_BASE"
255255

256-
URL=$URL_BASE/$RELEASE_TAG/x86_64-unknown-linux-gnu/${BINARY}_${VERSION}_amd64.deb
256+
URL=$URL_BASE/$VERSION/x86_64-unknown-linux-gnu/${BINARY}_${NODE_VERSION}_amd64.deb
257257

258258
mkdir -p "$OUTPUT_DIR"
259259
pushd "$OUTPUT_DIR" > /dev/null

.github/scripts/release/release_lib.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ git_show_log() {
7171
# 1_012_000 or 1_012_001 if SUFFIX is set
7272
function get_spec_version() {
7373
INPUT=$1
74-
SUFFIX=${SUFFIX:-000} #this variable makes it possible to set a specific ruuntime version like 93826 it can be intialised as sestem variable
74+
SUFFIX=${SUFFIX:-000} #this variable makes it possible to set a specific runtime version like 93826 it can be initialised as system variable
7575
[[ $INPUT =~ .*([0-9]+\.[0-9]+\.[0-9]{1,2}).* ]]
7676
VERSION="${BASH_REMATCH[1]}"
7777
MATCH="${BASH_REMATCH[0]}"

.github/workflows/release-11_rc-automation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Release - RC automation
22
on:
3-
# TODO: Activate it and delete old branches patterns, when the release process from stable is setteled
3+
# TODO: Activate it and delete old branches patterns, when the release process from stable is settled
44
#push:
55
# branches:
66
# # Catches release-polkadot-v1.2.3, release-v1.2.3-rc1, etc

.github/workflows/release-40_publish-deb-package.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Release - Publish polakdot deb package
1+
name: Release - Publish polkadot deb package
22

33
on:
44
workflow_dispatch:
55
inputs:
66
tag:
7-
description: Current final release tag in the format polakdot-stableYYMM or polkadot-stable-YYMM-X
7+
description: Current final release tag in the format polkadot-stableYYMM or polkadot-stable-YYMM-X
88
default: polkadot-stable2412
99
required: true
1010
type: string
@@ -44,9 +44,9 @@ jobs:
4444
needs: [validate-inputs]
4545
env:
4646
REPO: ${{ github.repository }}
47-
RELEASE_TAG: ${{ needs.validate-inputs.outputs.release_tag }}
47+
VERSION: ${{ needs.validate-inputs.outputs.release_tag }}
4848
outputs:
49-
VERSION: ${{ steps.fetch_artifacts_from_s3.outputs.VERSION }}
49+
NODE_VERSION: ${{ steps.fetch_artifacts_from_s3.outputs.NODE_VERSION }}
5050

5151
steps:
5252
- name: Checkout sources
@@ -57,8 +57,8 @@ jobs:
5757
run: |
5858
. ./.github/scripts/common/lib.sh
5959
60-
VERSION="$(get_polkadot_node_version_from_code)"
61-
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
60+
NODE_VERSION="$(get_polkadot_node_version_from_code)"
61+
echo "NODE_VERSION=${NODE_VERSION}" >> $GITHUB_OUTPUT
6262
6363
fetch_debian_package_from_s3 polkadot
6464
@@ -76,7 +76,7 @@ jobs:
7676
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
7777
AWS_DEB_PATH: "s3://releases-package-repos/deb"
7878
LOCAL_DEB_REPO_PATH: ${{ github.workspace }}/deb
79-
VERSION: ${{ needs.fetch-artifacts-from-s3.outputs.VERSION }}
79+
NODE_VERSION: ${{ needs.fetch-artifacts-from-s3.outputs.NODE_VERSION }}
8080

8181
steps:
8282
- name: Install pgpkkms
@@ -135,7 +135,7 @@ jobs:
135135
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
136136
run: |
137137
# Add the new deb to the repo
138-
reprepro -b "$LOCAL_DEB_REPO_PATH" includedeb "${{ inputs.distribution }}" "release-artifacts/polkadot_${VERSION}_amd64.deb"
138+
reprepro -b "$LOCAL_DEB_REPO_PATH" includedeb "${{ inputs.distribution }}" "release-artifacts/polkadot_${NODE_VERSION}_amd64.deb"
139139
140140
- name: Upload updated deb repo
141141
env:

.github/workflows/release-reusable-promote-to-final.yml

+13-7
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ jobs:
3535
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_RELEASE_ACCESS_KEY_ID }}
3636
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_RELEASE_SECRET_ACCESS_KEY }}
3737
AWS_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
38+
RELEASE_TAG: ${{ inputs.release_tag }}
39+
PACKAGE: ${{ inputs.package }}
40+
TARGET: ${{ inputs.target }}
3841

3942
steps:
4043
- name: Checkout sources
@@ -44,22 +47,25 @@ jobs:
4447
id: prepare_final_tag
4548
shell: bash
4649
run: |
47-
tag="$(echo ${{ inputs.release_tag }} | sed 's/-rc[0-9]*$//')"
50+
tag="$(echo $RELEASE_TAG | sed 's/-rc[0-9]*$//')"
4851
echo $tag
4952
echo "FINAL_TAG=${tag}" >> $GITHUB_OUTPUT
5053
5154
- name: Fetch binaries from s3 based on version
5255
run: |
5356
. ./.github/scripts/common/lib.sh
5457
55-
VERSION="${{ inputs.release_tag }}"
56-
if [[ ${{ inputs.package }} == 'polkadot' ]]; then
58+
VERSION="$RELEASE_TAG"
59+
if [[ "$PACKAGE" == 'polkadot' ]]; then
5760
packages=(polkadot polkadot-prepare-worker polkadot-execute-worker)
5861
for package in "${packages[@]}"; do
59-
fetch_release_artifacts_from_s3 $package ${{ inputs.target }}
62+
OUTPUT_DIR="./release-artifacts/$TARGET/${package}"
63+
fetch_release_artifacts_from_s3 "$package" "$TARGET"
6064
done
65+
NODE_VERSION="$(get_polkadot_node_version_from_code)"
66+
fetch_debian_package_from_s3 polkadot
6167
else
62-
fetch_release_artifacts_from_s3 ${{ inputs.package }} ${{ inputs.target }}
68+
fetch_release_artifacts_from_s3 "$PACKAGE" "$TARGET"
6369
fi
6470
6571
- name: Configure AWS Credentials
@@ -73,11 +79,11 @@ jobs:
7379
run: |
7480
. ./.github/scripts/release/release_lib.sh
7581
76-
if [[ ${{ inputs.package }} == 'polkadot' ]]; then
82+
if [[ "$PACKAGE" == 'polkadot' ]]; then
7783
packages=(polkadot polkadot-prepare-worker polkadot-execute-worker)
7884
for package in "${packages[@]}"; do
7985
upload_s3_release $package ${{ steps.prepare_final_tag.outputs.final_tag }} ${{ inputs.target }}
8086
done
8187
else
82-
upload_s3_release ${{ inputs.package }} ${{ steps.prepare_final_tag.outputs.final_tag }} ${{ inputs.target }}
88+
upload_s3_release "$PACKAGE" ${{ steps.prepare_final_tag.outputs.final_tag }} "$TARGET"
8389
fi

.github/workflows/release-reusable-rc-buid.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
type: string
1616

1717
release_tag:
18-
description: Tag matching the actual release candidate with the format stableYYMM-rcX or stableYYMM
18+
description: Tag matching the actual release candidate with the format polkadpt-stableYYMM(-rcX) or plkadot-stableYYMM-X(-rcX)
1919
required: true
2020
type: string
2121

0 commit comments

Comments
 (0)