diff options
Diffstat (limited to 'salt/openbook')
| -rw-r--r-- | salt/openbook/ansible/files/deploy-dev-env.sh | 2 | ||||
| -rw-r--r-- | salt/openbook/ansible/files/find_next_tag.sh | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/salt/openbook/ansible/files/deploy-dev-env.sh b/salt/openbook/ansible/files/deploy-dev-env.sh index b47774e..176ae6f 100644 --- a/salt/openbook/ansible/files/deploy-dev-env.sh +++ b/salt/openbook/ansible/files/deploy-dev-env.sh @@ -8,5 +8,5 @@ rm -f env.yaml ln -s env.yaml.openbook env.yaml popd pushd ${buildroot} -ansible-playbook -i inventory_json.rb openbook_installer.yaml +ansible-playbook -vvv -i inventory_json.rb openbook_installer.yaml popd diff --git a/salt/openbook/ansible/files/find_next_tag.sh b/salt/openbook/ansible/files/find_next_tag.sh new file mode 100644 index 0000000..638215c --- /dev/null +++ b/salt/openbook/ansible/files/find_next_tag.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +cd "${1}" +basetag="${2}" + +lastbuild=$(git for-each-ref --sort=taggerdate --format '%(tag)' | grep -F "${basetag}" | tail -n 1 | awk -F. '{print $3}') +if [ "${lastbuild}" == "" ]; then + newtag="${basetag}.1" +else + newtag="${basetag}.$(( ${lastbuild} + 1 ))" +fi +git tag -a "build-${newtag}" -m "tagged by jenkins: $(date)" +git push origin "build-${newtag}" +echo -n "${newtag}" |
