summaryrefslogtreecommitdiff
path: root/salt
diff options
context:
space:
mode:
authorckonstanski <ckonstanski@pippiandcarlos.com>2017-10-17 12:06:21 -0600
committerckonstanski <ckonstanski@pippiandcarlos.com>2017-10-17 12:06:21 -0600
commitb584c55c5f222502a2401e1c5b57a20ecf338de2 (patch)
treebd380c240e844a0a54160e40f84a3605f69b5de6 /salt
parentea8450c11362bc09d71d27c633d7e40b6d43b708 (diff)
git tagging
Diffstat (limited to 'salt')
-rw-r--r--salt/openbook/ansible/files/find_next_tag.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/salt/openbook/ansible/files/find_next_tag.sh b/salt/openbook/ansible/files/find_next_tag.sh
index 638215c..753e40c 100644
--- a/salt/openbook/ansible/files/find_next_tag.sh
+++ b/salt/openbook/ansible/files/find_next_tag.sh
@@ -1,7 +1,8 @@
#!/bin/bash
cd "${1}"
-basetag="${2}"
+artifact="${2}"
+basetag="${3}"
lastbuild=$(git for-each-ref --sort=taggerdate --format '%(tag)' | grep -F "${basetag}" | tail -n 1 | awk -F. '{print $3}')
if [ "${lastbuild}" == "" ]; then
@@ -11,4 +12,5 @@ else
fi
git tag -a "build-${newtag}" -m "tagged by jenkins: $(date)"
git push origin "build-${newtag}"
-echo -n "${newtag}"
+echo -n "${newtag}" > "/tmp/newtag_${artifact}"
+echo 0