Skip to content
Snippets Groups Projects
Commit e36cf8da authored by S. Li's avatar S. Li
Browse files

re-trigger docker build

parent fc57cb20
No related merge requests found
......@@ -41,4 +41,4 @@ deploy:
- master
after_deploy:
- cd .travis
- sh ./builddocker.sh
- ./builddocker.sh
#!/bin/bash
set -eu
set -euo pipefail
# TRAVIS_TAG='v0.7'
# TAG="v0.7"
# TRAVIS_BUILD_NUMBER="1234"
# TRAVIS_BRANCH="develop"
# PUSHTOKEN="secret"
CURL_HEADER="Content-Type: application/json"
CURL_URL="https://registry.hub.docker.com/u/rocketchat/rocket.chat/trigger/$PUSHTOKEN/"
if [ -z ${TRAVIS_TAG+x} ];
then "curl -H \"Content-Type: application/json\" --data \"{'source_type': 'Branch', 'source_name': '$TRAVIS_BRANCH', 'docker_tag': '$TAG.$TRAVIS_BUILD_NUMBER.$TRAVIS_BRANCH'}\" -X POST https://registry.hub.docker.com/u/rocketchat/rocket.chat/trigger/$PUSHTOKEN/";
else "curl -H \"Content-Type: application/json\" --data \"{'source_type': 'Tag', 'source_name': '$TRAVIS_TAG', 'docker_tag': '$TAG.$TRAVIS_BUILD_NUMBER.$TRAVIS_BRANCH'}\" -X POST https://registry.hub.docker.com/u/rocketchat/rocket.chat/trigger/$PUSHTOKEN/";
then
CURL_DATA='{"source_type": "Branch", "source_name": "'$TRAVIS_BRANCH'", "docker_tag": "'$TAG.$TRAVIS_BUILD_NUMBER.$TRAVIS_BRANCH'"}';
else
CURL_DATA='{"source_type": "Tag", "source_name": "'$TAG'", "docker_tag": "'$TAG.$TRAVIS_BUILD_NUMBER.$TRAVIS_BRANCH'"}';
fi
curl -H "${CURL_HEADER}" --data "${CURL_DATA}" -X POST "${CURL_URL}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment