summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cirrus/git_authors_to_irc_nicks.csv4
-rwxr-xr-xcontrib/cirrus/success.sh7
-rwxr-xr-xcontrib/imgprune/entrypoint.sh14
3 files changed, 18 insertions, 7 deletions
diff --git a/contrib/cirrus/git_authors_to_irc_nicks.csv b/contrib/cirrus/git_authors_to_irc_nicks.csv
index 4334b5cd2..a584cc76a 100644
--- a/contrib/cirrus/git_authors_to_irc_nicks.csv
+++ b/contrib/cirrus/git_authors_to_irc_nicks.csv
@@ -3,6 +3,10 @@
# Sorting is done at runtime - first-found e-mail match wins.
# Comments (like this) and blank lines are ignored.
+bbaude@redhat.com,baude
+matthew.heon@pm.me,mheon
+matthew.heon@gmail.com,mheon
+emilien@redhat.com,EmilienM
rothberg@redhat.com,vrothberg
santiago@redhat.com,edsantiago
gscrivan@redhat.com,giuseppe
diff --git a/contrib/cirrus/success.sh b/contrib/cirrus/success.sh
index f2c9fbc7f..30d375d95 100755
--- a/contrib/cirrus/success.sh
+++ b/contrib/cirrus/success.sh
@@ -4,12 +4,14 @@ set -e
source $(dirname $0)/lib.sh
-req_env_var CIRRUS_BRANCH CIRRUS_BUILD_ID CIRRUS_REPO_FULL_NAME
+req_env_var CIRRUS_BRANCH CIRRUS_BUILD_ID CIRRUS_REPO_FULL_NAME CIRRUS_BASE_SHA CIRRUS_CHANGE_IN_REPO
cd $CIRRUS_WORKING_DIR
if [[ "$CIRRUS_BRANCH" =~ "pull" ]]
then
+ echo "Retrieving latest HEADS and tags"
+ git fetch --all --tags
echo "Finding commit authors for PR $CIRRUS_PR"
unset NICKS
if [[ -r "$AUTHOR_NICKS_FILEPATH" ]]
@@ -20,7 +22,8 @@ then
# Depending on branch-state, it's possible SHARANGE could be _WAY_ too big
MAX_NICKS=10
# newline separated
- COMMIT_AUTHORS=$(git log --format='%ae' $SHARANGE | \
+ GITLOG="git log --format='%ae'"
+ COMMIT_AUTHORS=$($GITLOGt $SHARANGE || $GITLOG -1 HEAD | \
sort -u | \
egrep -v "$EXCLUDE_RE" | \
tail -$MAX_NICKS)
diff --git a/contrib/imgprune/entrypoint.sh b/contrib/imgprune/entrypoint.sh
index 829e9938e..b0f006332 100755
--- a/contrib/imgprune/entrypoint.sh
+++ b/contrib/imgprune/entrypoint.sh
@@ -6,13 +6,17 @@ source /usr/local/bin/lib_entrypoint.sh
req_env_var GCPJSON GCPNAME GCPPROJECT IMGNAMES
-BASE_IMAGES=""
-# When executing under Cirrus-CI, have access to current source
-if [[ "$CI" == "true" ]] && [[ -r "$CIRRUS_WORKING_DIR/$SCRIPT_BASE" ]]
+unset BASE_IMAGES
+# When executing under Cirrus-CI, script have access to current source
+LIB="$CIRRUS_WORKING_DIR/$SCRIPT_BASE/lib.sh"
+if [[ "$CI" == "true" ]] && [[ -r "$LIB" ]]
then
# Avoid importing anything that might conflict
- eval "$(egrep -sh '^export .+BASE_IMAGE=' < $CIRRUS_WORKING_DIR/$SCRIPT_BASE/lib.sh)"
- BASE_IMAGES="$UBUNTU_BASE_IMAGE $PRIOR_UBUNTU_BASE_IMAGE $FEDORA_BASE_IMAGE $PRIOR_FEDORA_BASE_IMAGE"
+ for env in $(sed -ne 's/^[^#]\+_BASE_IMAGE=/img=/p' "$LIB")
+ do
+ eval $env
+ BASE_IMAGES="$BASE_IMAGES $img"
+ done
else
# metadata labeling may have broken for some reason in the future
echo "Warning: Running outside of Cirrus-CI, very minor-risk of base-image deletion."