From cc516fae36d721da077979c650dd7d9974dae430 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Sat, 9 Mar 2019 20:25:17 -0600 Subject: [PATCH] Instead of defining it in the Jenkins config, create a Bash script. --- run-ppa-britney | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 run-ppa-britney diff --git a/run-ppa-britney b/run-ppa-britney new file mode 100755 index 0000000..417cd1b --- /dev/null +++ b/run-ppa-britney @@ -0,0 +1,21 @@ +#!/bin/bash + +for RELEASE in $RELEASES; do + # This ensures the variable can be read inside all of the scripts + export RELEASE=$RELEASE; + + # This is the main script, fetching the archives and running Britney + ./fetch-indexes; + + # Britney outputs the candidates for testing migration, read the additions + egrep -v '^(#|-)' britney_output/*/HeidiOutputDelta > candidates || echo "No candidates found."; + + while read -r -a package; do + # This can eventually be extendable to different archive types + if [ $ARCHIVE_TYPE = "ppa" ]; then + ./ubuntu-archive-tools/copy-package --dry-run -y -b -s $RELEASE --from "ppa:lubuntu-ci/ubuntu/unstable-ci-proposed" --to "ppa:lubuntu-ci/ubuntu/unstable-ci" --version "${package[1]}" "${package[0]}"; + ./ubuntu-archive-tools/remove-package --dry-run -y -s $RELEASE --archive "ppa:lubuntu-ci/ubuntu/unstable-ci-proposed" --version "${package[1]}" --removal-comment="moved to release" "${package[0]}"; + fi + done < candidates; + rm -rf britney_output/; +done