feat: Add rebrand CI/CD workflows to main branch

- Add 72 rebrand workflow files (polkadot→pezkuwi, substrate→bizinikiwi, cumulus→pezcumulus)
- Add GitHub actions, issue templates, and configs
- Removed unnecessary workflows (fork-sync, gitspiegel, upstream-tracker, sync-templates, backport)
- Renamed zombienet test files to match new naming convention
This commit is contained in:
2025-12-19 22:51:57 +03:00
parent 0ec342b620
commit ee389beb8c
131 changed files with 16523 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -e
PRODUCT=$1
VERSION=$2
PROFILE=${PROFILE:-production}
cargo install --version 2.7.0 cargo-deb --locked -q
echo "Using cargo-deb v$(cargo-deb --version)"
echo "Building a Debian package for '$PRODUCT' in '$PROFILE' profile"
cargo deb --profile $PROFILE --no-strip --no-build -p $PRODUCT --deb-version $VERSION
deb=target/debian/$PRODUCT_*_amd64.deb
cp $deb target/production/
+40
View File
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
# This is used to build our binaries:
# - pezkuwi
# - pezkuwi-teyrchain
# - pezkuwi-omni-node
#
# set -e
BIN=$1
PACKAGE=${2:-$BIN}
# must be given as feature1,feature2,feature3...
FEATURES=$3
if [ -n "$FEATURES" ]; then
FEATURES="--features ${FEATURES}"
fi
PROFILE=${PROFILE:-production}
ARTIFACTS=/artifacts/$BIN
echo "Artifacts will be copied into $ARTIFACTS"
mkdir -p "$ARTIFACTS"
git log --pretty=oneline -n 1
time cargo build --profile $PROFILE --locked --verbose --bin $BIN --package $PACKAGE $FEATURES
echo "Artifact target: $ARTIFACTS"
cp ./target/$PROFILE/$BIN "$ARTIFACTS"
pushd "$ARTIFACTS" > /dev/null
sha256sum "$BIN" | tee "$BIN.sha256"
chmod a+x "$BIN"
VERSION="$($ARTIFACTS/$BIN --version)"
EXTRATAG="$(echo "${VERSION}" |
sed -n -r 's/^'$BIN' ([0-9.]+.*-[0-9a-f]{7,13})-.*$/\1/p')"
EXTRATAG="${VERSION}-${EXTRATAG}-$(cut -c 1-8 $ARTIFACTS/$BIN.sha256)"
echo "$BIN version = ${VERSION} (EXTRATAG = ${EXTRATAG})"
echo -n ${VERSION} > "$ARTIFACTS/VERSION"
echo -n ${EXTRATAG} > "$ARTIFACTS/EXTRATAG"
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
# This is used to build our binaries:
# - pezkuwi
# - pezkuwi-teyrchain
# - pezkuwi-omni-node
# set -e
BIN=$1
PACKAGE=${2:-$BIN}
PROFILE=${PROFILE:-production}
# parity-macos runner needs a path where it can
# write, so make it relative to github workspace.
ARTIFACTS=$GITHUB_WORKSPACE/artifacts/$BIN
VERSION=$(git tag -l --contains HEAD | grep -E "^v.*")
# must be given as feature1,feature2,feature3...
FEATURES=$3
if [ -n "$FEATURES" ]; then
FEATURES="--features ${FEATURES}"
fi
echo "Artifacts will be copied into $ARTIFACTS"
mkdir -p "$ARTIFACTS"
git log --pretty=oneline -n 1
time cargo build --profile $PROFILE --locked --verbose --bin $BIN --package $PACKAGE $FEATURES
echo "Artifact target: $ARTIFACTS"
cp ./target/$PROFILE/$BIN "$ARTIFACTS"
pushd "$ARTIFACTS" > /dev/null
sha256sum "$BIN" | tee "$BIN.sha256"
EXTRATAG="$($ARTIFACTS/$BIN --version |
sed -n -r 's/^'$BIN' ([0-9.]+.*-[0-9a-f]{7,13})-.*$/\1/p')"
EXTRATAG="${VERSION}-${EXTRATAG}-$(cut -c 1-8 $ARTIFACTS/$BIN.sha256)"
echo "$BIN version = ${VERSION} (EXTRATAG = ${EXTRATAG})"
echo -n ${VERSION} > "$ARTIFACTS/VERSION"
echo -n ${EXTRATAG} > "$ARTIFACTS/EXTRATAG"
+68
View File
@@ -0,0 +1,68 @@
#!/usr/bin/env bash
set -e
# --- Configuration ---
PRODUCT=${1:?"Usage: $0 <product_name> <version>"}
VERSION=${2:?"Usage: $0 <product_name> <version>"}
PROFILE=${PROFILE:-production}
ARCH="x86_64"
SOURCE_DIR="target/${PROFILE}"
STAGING_DIR="/tmp/${PRODUCT}-staging"
DEST_DIR="target/production"
# --- Script Start ---
echo "📦 Starting RPM build for '$PRODUCT' version '$VERSION'..."
# 1. Clean up and create a fresh staging directory
echo "🔧 Setting up staging directory: ${STAGING_DIR}"
rm -rf "$STAGING_DIR"
mkdir -p "$STAGING_DIR/usr/bin"
mkdir -p "$STAGING_DIR/usr/lib/${PRODUCT}"
mkdir -p "$STAGING_DIR/usr/lib/systemd/system"
mkdir -p "$STAGING_DIR/etc/default"
# 2. Copy compiled binaries and assets into the staging directory
echo "📂 Copying application files..."
cp "${SOURCE_DIR}/${PRODUCT}" "${STAGING_DIR}/usr/bin/"
cp "${SOURCE_DIR}/${PRODUCT}-prepare-worker" "${STAGING_DIR}/usr/lib/${PRODUCT}/"
cp "${SOURCE_DIR}/${PRODUCT}-execute-worker" "${STAGING_DIR}/usr/lib/${PRODUCT}/"
# MODIFIED PATH: Prefixed with the subdirectory name
cp "pezkuwi/scripts/packaging/pezkuwi.service" "${STAGING_DIR}/usr/lib/systemd/system/"
# Create default config file
echo 'PEZKUWI_CLI_ARGS=""' > "$STAGING_DIR/etc/default/pezkuwi"
# 3. Use fpm to package the staging directory into an RPM
# fpm config file .fpm is located in the pezkuwi-sdk root directory
echo "🎁 Running fpm to create the RPM package..."
fpm \
-s dir \
-t rpm \
-n "$PRODUCT" \
-v "$VERSION" \
-a "$ARCH" \
--rpm-os linux \
--description "Pezkuwi Node" \
--license "GPL-3.0-only" \
--url "https://pezkuwi.network/" \
--depends systemd \
--depends shadow-utils \
--after-install "pezkuwi/scripts/packaging/rpm-maintainer-scripts/rpm-postinst.sh" \
--before-remove "pezkuwi/scripts/packaging/rpm-maintainer-scripts/rpm-preun.sh" \
--after-remove "pezkuwi/scripts/packaging/rpm-maintainer-scripts/rpm-postun.sh" \
--config-files "/etc/default/pezkuwi" \
-C "$STAGING_DIR" \
.
# 4. Move the final RPM to the artifacts directory
echo "🚚 Moving RPM to '${DEST_DIR}'..."
mkdir -p "$DEST_DIR"
mv "${PRODUCT}-${VERSION}-1.${ARCH}.rpm" "$DEST_DIR/"
# 5. Clean up the staging directory
echo "🧹 Cleaning up temporary files..."
rm -rf "$STAGING_DIR"
echo "✅ RPM package build complete!"
ls -l "$DEST_DIR"
+39
View File
@@ -0,0 +1,39 @@
Origin: Parity
Label: Parity
Codename: release
Architectures: amd64
Components: main
Description: Apt repository for software made by Parity Technologies Ltd.
SignWith: 90BD75EBBB8E95CB3DA6078F94A4029AB4B35DAE
Origin: Parity
Label: Parity Staging
Codename: staging
Architectures: amd64
Components: main
Description: Staging distribution for Parity Technologies Ltd. packages
SignWith: 90BD75EBBB8E95CB3DA6078F94A4029AB4B35DAE
Origin: Parity
Label: Parity stable2407
Codename: stable2407
Architectures: amd64
Components: main
Description: Apt repository for software made by Parity Technologies Ltd.
SignWith: 90BD75EBBB8E95CB3DA6078F94A4029AB4B35DAE
Origin: Parity
Label: Parity stable2409
Codename: stable2409
Architectures: amd64
Components: main
Description: Apt repository for software made by Parity Technologies Ltd.
SignWith: 90BD75EBBB8E95CB3DA6078F94A4029AB4B35DAE
Origin: Parity
Label: Parity stable2412
Codename: stable2412
Architectures: amd64
Components: main
Description: Apt repository for software made by Parity Technologies Ltd.
SignWith: 90BD75EBBB8E95CB3DA6078F94A4029AB4B35DAE
@@ -0,0 +1,112 @@
#!/bin/bash
# pgpkms wrapper to make it compatible with RPM's GPG interface
# This script translates RPM's GPG arguments to pgpkms format
# Debug: log all arguments to stderr
echo "pgpkms-gpg-wrapper called with args: $*" >&2
# Parse arguments to find the input file and options
input_file=""
output_file=""
detach_sign=false
armor=false
local_user=""
read_from_stdin=false
while [[ $# -gt 0 ]]; do
case $1 in
--detach-sign)
detach_sign=true
shift
;;
--armor)
armor=true
shift
;;
--local-user)
local_user="$2"
shift 2
;;
-u)
local_user="$2"
shift 2
;;
-sbo)
# RPM uses -sbo which means: -s (sign), -b (detach), -o (output to file)
detach_sign=true
# The next argument should be the output file
shift
if [[ -n "$1" ]] && [[ "$1" != "--" ]]; then
output_file="$1"
shift
fi
;;
--no-verbose|--no-armor|--no-secmem-warning|--batch|--no-tty|--pinentry-mode|--passphrase-fd)
# Skip these GPG-specific options
shift
;;
--)
# End of options marker
shift
break
;;
--*)
# Skip other long options
shift
;;
-*)
# Skip other short options
shift
;;
*)
# This could be a file argument
if [[ "$1" == "-" ]]; then
read_from_stdin=true
elif [[ -z "$input_file" ]] && [[ -f "$1" ]]; then
input_file="$1"
fi
shift
;;
esac
done
# Handle remaining arguments after --
while [[ $# -gt 0 ]]; do
if [[ "$1" == "-" ]]; then
read_from_stdin=true
elif [[ -z "$input_file" ]] && [[ -f "$1" ]]; then
input_file="$1"
fi
shift
done
echo "Parsed: input_file='$input_file', output_file='$output_file', read_from_stdin=$read_from_stdin, armor=$armor" >&2
# If we're supposed to read from stdin, we need to create a temp file
if [[ "$read_from_stdin" == "true" ]]; then
temp_input=$(mktemp)
cat > "$temp_input"
input_file="$temp_input"
echo "Created temp file for stdin: $input_file" >&2
fi
if [[ -z "$input_file" ]]; then
echo "Error: No input file found" >&2
exit 1
fi
echo "Signing file: $input_file" >&2
# Call pgpkms with the appropriate arguments
pgpkms_args="sign --input $input_file"
if [[ -n "$output_file" ]]; then
pgpkms_args="$pgpkms_args --output $output_file"
fi
if [[ "$armor" != "true" ]]; then
pgpkms_args="$pgpkms_args --binary"
fi
echo "Running: /home/runner/.local/bin/pgpkms $pgpkms_args" >&2
exec /home/runner/.local/bin/pgpkms $pgpkms_args
+206
View File
@@ -0,0 +1,206 @@
#!/usr/bin/env bash
# Set the new version by replacing the value of the constant given as pattern
# in the file.
#
# input: pattern, version, file
#output: none
set_version() {
pattern=$1
version=$2
file=$3
sed -i "s/$pattern/\1\"${version}\"/g" $file
return 0
}
# Commit changes to git with specific message.
# "|| true" does not let script to fail with exit code 1,
# in case there is nothing to commit.
#
# input: MESSAGE (any message which should be used for the commit)
# output: none
commit_with_message() {
MESSAGE=$1
git commit -a -m "$MESSAGE" || true
}
# Retun list of the runtimes filterd
# input: none
# output: list of filtered runtimes
get_filtered_runtimes_list() {
grep_filters=("runtime.*" "test|template|starters|substrate")
git grep spec_version: | grep .rs: | grep -e "${grep_filters[0]}" | grep "lib.rs" | grep -vE "${grep_filters[1]}" | cut -d: -f1
}
# Sets provided spec version
# input: version
set_spec_versions() {
NEW_VERSION=$1
runtimes_list=(${@:2})
printf "Setting spec_version to $NEW_VERSION\n"
for f in ${runtimes_list[@]}; do
printf " processing $f"
sed -ri "s/spec_version: [0-9]+_[0-9]+_[0-9]+,/spec_version: $NEW_VERSION,/" $f
done
commit_with_message "Bump spec_version to $NEW_VERSION"
git_show_log 'spec_version'
}
# Displays formated results of the git log command
# for the given pattern which needs to be found in logs
# input: pattern, count (optional, default is 10)
git_show_log() {
PATTERN="$1"
COUNT=${2:-10}
git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=iso-strict | \
head -n $COUNT | grep -iE "$PATTERN" --color=always -z
}
# Get a spec_version number from the crate version
#
# ## inputs
# - v1.12.0 or 1.12.0
#
# ## output:
# 1_012_000 or 1_012_001 if SUFFIX is set
function get_spec_version() {
INPUT=$1
SUFFIX=${SUFFIX:-000} #this variable makes it possible to set a specific runtime version like 93826 it can be initialised as system variable
[[ $INPUT =~ .*([0-9]+\.[0-9]+\.[0-9]{1,2}).* ]]
VERSION="${BASH_REMATCH[1]}"
MATCH="${BASH_REMATCH[0]}"
if [ -z $MATCH ]; then
return 1
else
SPEC_VERSION="$(sed -e "s/\./_0/g" -e "s/_[^_]*\$/_$SUFFIX/" <<< $VERSION)"
echo "$SPEC_VERSION"
return 0
fi
}
# Reorganize the prdoc files for the release
#
# input: VERSION (e.g. v1.0.0)
# output: none
reorder_prdocs() {
VERSION="$1"
printf "[+] ️ Reordering prdocs:"
VERSION=$(sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+).*$/\1/' <<< "$VERSION") #getting reed of the 'v' prefix
mkdir -p "prdoc/$VERSION"
mv prdoc/pr_*.prdoc prdoc/$VERSION
git add -A
commit_with_message "Reordering prdocs for the release $VERSION"
}
# Bump the binary version of the pezkuwi-teyrchain binary with the
# new bumped version and commit changes.
#
# input: version e.g. 1.16.0
set_pezkuwi_teyrchain_binary_version() {
bumped_version="$1"
cargo_toml_file="$2"
set_version "\(^version = \)\".*\"" $bumped_version $cargo_toml_file
cargo update --workspace --offline # we need this to update Cargo.loc with the new versions as well
MESSAGE="Bump versions in: ${cargo_toml_file}"
commit_with_message "$MESSAGE"
git_show_log "$MESSAGE"
}
upload_s3_release() {
alias aws='podman run --rm -it docker.io/paritytech/awscli -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_BUCKET aws'
product=$1
version=$2
target=$3
echo "Working on product: $product "
echo "Working on version: $version "
echo "Working on platform: $target "
URL_BASE=$(get_s3_url_base $product)
echo "Current content, should be empty on new uploads:"
aws s3 ls "s3://${URL_BASE}/${version}/${target}" --recursive --human-readable --summarize || true
echo "Content to be uploaded:"
artifacts="release-artifacts/$target/$product/"
ls "$artifacts"
aws s3 sync --acl public-read "$artifacts" "s3://${URL_BASE}/${version}/${target}"
echo "Uploaded files:"
aws s3 ls "s3://${URL_BASE}/${version}/${target}" --recursive --human-readable --summarize
echo "✅ The release should be at https://${URL_BASE}/${version}/${target}"
}
# Upload runtimes artifacts to s3 release bucket
#
# input: version (stable release tag e.g. pezkuwi-stable2412 or pezkuwi-stable2412-rc1)
# output: none
upload_s3_runtimes_release_artifacts() {
alias aws='podman run --rm -it docker.io/paritytech/awscli -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_BUCKET aws'
version=$1
echo "Working on version: $version "
echo "Current content, should be empty on new uploads:"
aws s3 ls "s3://releases.parity.io/pezkuwi/runtimes/${version}/" --recursive --human-readable --summarize || true
echo "Content to be uploaded:"
artifacts="artifacts/runtimes/"
ls "$artifacts"
aws s3 sync --acl public-read "$artifacts" "s3://releases.parity.io/pezkuwi/runtimes/${version}/"
echo "Uploaded files:"
aws s3 ls "s3://releases.parity.io/pezkuwi/runtimes/${version}/" --recursive --human-readable --summarize
echo "✅ The release should be at https://releases.parity.io/pezkuwi/runtimes/${version}"
}
# Pass the name of the binary as input, it will
# return the s3 base url
function get_s3_url_base() {
name=$1
case $name in
pezkuwi | pezkuwi-execute-worker | pezkuwi-prepare-worker )
printf "releases.parity.io/pezkuwi"
;;
pezkuwi-teyrchain)
printf "releases.parity.io/pezkuwi-teyrchain"
;;
pezkuwi-omni-node)
printf "releases.parity.io/pezkuwi-omni-node"
;;
chain-spec-builder)
printf "releases.parity.io/chain-spec-builder"
;;
frame-omni-bencher)
printf "releases.parity.io/frame-omni-bencher"
;;
substrate-node)
printf "releases.parity.io/substrate-node"
;;
eth-rpc)
printf "releases.parity.io/eth-rpc"
;;
subkey)
printf "releases.parity.io/subkey"
;;
*)
printf "UNSUPPORTED BINARY $name"
exit 1
;;
esac
}
+4
View File
@@ -0,0 +1,4 @@
%_signature gpg
%_gpg_name 90BD75EBBB8E95CB3DA6078F94A4029AB4B35DAE
%__gpg /home/runner/work/pezkuwi-sdk/pezkuwi-sdk/.github/scripts/release/pgpkms-gpg-wrapper.sh
%__gpgbin /home/runner/work/pezkuwi-sdk/pezkuwi-sdk/.github/scripts/release/pgpkms-gpg-wrapper.sh