Oneshot make + notify-tag working
This commit is contained in:
parent
33f5012583
commit
4b44a745e4
8
Makefile
8
Makefile
|
|
@ -11,13 +11,17 @@ cloner:
|
||||||
run: cloner
|
run: cloner
|
||||||
docker run -v $(GLOBALVOL):/data -it --rm $(TAGBASE)
|
docker run -v $(GLOBALVOL):/data -it --rm $(TAGBASE)
|
||||||
|
|
||||||
run-once: cloner
|
once: cloner
|
||||||
docker run -v $(GLOBALVOL):/data -it --rm $(TAGBASE) /usr/local/bin/cron-command
|
docker run -v $(GLOBALVOL):/data -it --rm $(TAGBASE) /usr/local/bin/cron-command
|
||||||
|
|
||||||
run-bash: cloner
|
bash: cloner
|
||||||
docker run -v $(GLOBALVOL):/data -it --rm $(TAGBASE) /bin/bash
|
docker run -v $(GLOBALVOL):/data -it --rm $(TAGBASE) /bin/bash
|
||||||
|
|
||||||
# wizzard
|
# wizzard
|
||||||
wizzard: cloner
|
wizzard: cloner
|
||||||
docker run -v $(GLOBALVOL):/data -it --rm $(TAGBASE) /usr/local/bin/wizzard
|
docker run -v $(GLOBALVOL):/data -it --rm $(TAGBASE) /usr/local/bin/wizzard
|
||||||
|
|
||||||
|
singleshot: cloner
|
||||||
|
docker run -v $(GLOBALVOL):/data -e BASE=/data/cloner-t456 --user executor -it --rm $(TAGBASE) run-checker
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# tags that changed or was pushed as new
|
# tags that changed or were pushed as new
|
||||||
git --git-dir $repodir tag -l | while read tagname
|
git --git-dir $repodir tag -l | while read tagname
|
||||||
do
|
do
|
||||||
[ -f $DET_TAGS/$tagname ] || touch $DET_TAGS/$tagname
|
[ -f $DET_TAGS/$tagname ] || touch $DET_TAGS/$tagname
|
||||||
|
|
@ -91,15 +91,24 @@ do
|
||||||
if ! [ "$oldsha" = "$newsha" ]
|
if ! [ "$oldsha" = "$newsha" ]
|
||||||
then
|
then
|
||||||
# TAG_HASH = $newsha
|
# TAG_HASH = $newsha
|
||||||
|
# TAG_NAME = $tagname
|
||||||
# TAG_AUTHOR
|
# TAG_AUTHOR
|
||||||
git --git-dir $repodir log $newsha -1 --pretty=format:"%an"
|
author=$(git --git-dir $repodir log $newsha -1 --pretty=format:"%an <%ae>")
|
||||||
|
# PROJECT_NAME = $cloner_project_name
|
||||||
|
|
||||||
|
# call the notify script
|
||||||
|
set +e
|
||||||
|
env TAG_HASH="$newsha" \
|
||||||
|
TAG_NAME="$tagname" \
|
||||||
|
TAG_AUTHOR="$author" \
|
||||||
|
PROJECT_NAME="$cloner_project_name" \
|
||||||
|
notify-tag
|
||||||
|
rc=$?
|
||||||
|
[ $rc -eq 0 ] || echo "Notify $tagname: return code = $rc"
|
||||||
|
set -e
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# save hash to keep things clear
|
# save hash to keep things clear
|
||||||
#detectorSumPersist $repodir
|
#detectorSumPersist $repodir
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user