Scriptw for manual release workflow of OpenH264

* build -> :POST && send-email && wait for 3rd party data extraction -> :PUBLISH
 * Publish in :PUBLISH must not publish rpms only repodata
 * Details at https://en.opensuse.org/OpenH264
This commit is contained in:
Lubos Kocman 2023-01-04 17:51:12 +01:00
parent b4e25496e4
commit 05e986e15e
4 changed files with 145 additions and 0 deletions

43
openh264/README.md Normal file
View File

@ -0,0 +1,43 @@
# Tools for manual release workflow of openh264 for openSUSE
Please make sure to ask the openh264 [maintainer](https://build.opensuse.org/project/users/multimedia:libs:cisco-openh264) if there isn't any upcoming change before making a publish request.
I do not expect to make a such request more than twice a year.
We use a three-step approach to ensure that we always have a set of related binaries in OBS.
**Details at https://en.opensuse.org/OpenH264**
## Step 1
Make a snapshot of data that is about to be sent or "POSTed" over for manual extraction at https://ciscobinary.openh264.org
<em>Please note that rpms from this project are signed by the official openSUSE key.</em>
openh264_release_to_post
This can be only done by somebody who has access to the project openSUSE:Factory:openh264.
Typically done by lkocman
## Step 2
Make an archive from the snapshot of data from **Step 1** ([:POST](https://build.opensuse.org/project/show/openSUSE:Factory:openh264:POST) subproject)
openh264_make_archive
Trused person / maintainer sends the generated .zip archive containing openSUSE signed rpms attached email to a contact person in Cisco.
<em>Contact the openSUSE Release Team for a particular contact on the Cisco side.</em>
## Step 3
This can be only executed after the archive from **Step 2** was successfully extracted at ciscobinary.openh264.org
You'd get typically confirmation from Cisco over email.
You can manually check presence of files. The example location of published rpms can be found [here](https://en.opensuse.org/OpenH264#Which_files_are_currently_hosted_on_the_Cisco_infra).
Following will release content from [:POST](https://build.opensuse.org/project/show/openSUSE:Factory:openh264:POST) to [:PUBLISHED](https://build.opensuse.org/project/show/openSUSE:Factory:openh264:PUBLISHED) and will trigger repodata refresh of openSUSE's openh264 repositories.
openh264_release_to_publish

54
openh264/openh264_make_archive Executable file
View File

@ -0,0 +1,54 @@
#!/bin/bash
#
# Archive last build of openh264 to :POST and make a zip file from its contents
#
# Contact openSUSE Release Team for more information or contacts
# https://en.opensuse.org/openSUSE:Release_team
#
# More details about OpenH264 in openSUSE at https://en.opensuse.org/OpenH264"
PROJ="openSUSE:Factory:openh264:POST"
echo
echo "This tool will make zip archive with binaries from $PROJ"
echo "This zip archive can be then sent over to Cisco for extraction at ciscobinary.openh264.org."
echo
echo "Please make sure that you've made snapshot of data (release_to_post.sh) prior proceeding."
echo
echo "Pres Enter to proceed or ctrl+c to cancel."
read
tempdr=`mktemp -d /tmp/cisco-binary-opensuse-XXXX`
bindr="$tempdr/cisco-openh264-rpms-opensuse"
checkoutdr="$tempdr/checkout"
mkdir $bindr
mkdir $checkoutdr
pushd $checkoutdr
# Checkout only metadata to speed it up
osc -A https://build.opensuse.org co -M $PROJ
pushd $PROJ:POST
# Get binaries for all repos / arches
for pkg in *; do
pushd $pkg
for repo in `osc repos | awk '{ print $1 }' | sort | uniq`; do
osc getbinaries $repo -d $bindr
done
popd
done
pushd $tempdr
# make zip only of rpms, skip logs and metadata
archive="`basename $bindr`"
zip "$archive.zip" -i "*.rpm" -r "$archive"
rm -rf $checkoutdr
rm -rf $bindr
echo
echo
echo "Please send email with $tempdr/$archive.zip via to Cisco to get it extracted at ciscobinary.openh264.org."
echo
echo "Execute publish_repodata_openh264.sh !ONLY! once you get confirmation that data was extracted at ciscobinary.openh264.org."

View File

@ -0,0 +1,23 @@
#!/bin/bash
#
# Make a snapshot of data prior to sending archive with rpms to Cisco
#
# Contact openSUSE Release Team for more information or contacts
# https://en.opensuse.org/openSUSE:Release_team
#
# More details about OpenH264 in openSUSE at https://en.opensuse.org/OpenH264"
SOURCE_PROJ="openSUSE:Factory:openh264"
PROJ="openSUSE:Factory:openh264:POST"
echo "This script will release data from $SOURCE_PROJ into $PROJ."
echo
echo "Pres Enter to proceed or ctrl+c to cancel."
read
osc -A https://build.opensuse.org release --no-delay $SOURCE_PROJ
osc -A https://build.opensuse.org prjresults $SOURCE_PROJ
echo
echo "Please proceed by running 'make_archive.sh' once the data was released."

View File

@ -0,0 +1,25 @@
#!/bin/bash
# Release snapshot of data from :POST to :PUBLISH.
# This will result into refreshing repodata for openSUSE's openh264 repo
#
# Contact openSUSE Release Team for more information or contacts
# https://en.opensuse.org/openSUSE:Release_team
#
# More details about OpenH264 in openSUSE at https://en.opensuse.org/OpenH264"
SOURCE_PROJ="openSUSE:Factory:openh264:POST"
PROJ="openSUSE:Factory:openh264:PUBLISHED"
echo "This script will release data from $SOURCE_PROJ into $PROJ."
echo "This step is expected to be executed only after"
echo "confirmation that archive with openh264 rpms was published at ciscobinary.openh264.org"
echo
echo "Pres Enter to proceed or ctrl+c to cancel."
read
osc -A https://build.opensuse.org release --no-delay $SOURCE_PROJ
osc -A https://build.opensuse.org prjresults $SOURCE_PROJ
echo
echo "Done"