This repository has been archived by the owner on Jul 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add endtoend crossdock test * Only upload to docker hub on master
- Loading branch information
1 parent
846fde2
commit 9c74133
Showing
4 changed files
with
77 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
make crossdock-fresh | ||
|
||
export REPO=jaegertracing/xdock-java | ||
export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) | ||
export TAG=`if [ "$BRANCH" == "master" ]; then echo "latest"; else echo "${BRANCH///}"; fi` | ||
echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, REPO=$REPO, PR=$PR, BRANCH=$BRANCH, TAG=$TAG" | ||
|
||
# Only push the docker container to Docker Hub for master branch | ||
if [ "$BRANCH" == "master" ]; then echo 'upload to Docker Hub'; else echo 'skip docker upload for PR'; exit 0; fi | ||
|
||
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
|
||
set -x | ||
|
||
pushd 'jaeger-crossdock' | ||
docker build -f Dockerfile -t $REPO:$COMMIT . | ||
popd | ||
docker tag $REPO:$COMMIT $REPO:$TAG | ||
docker tag $REPO:$COMMIT $REPO:travis-$TRAVIS_BUILD_NUMBER | ||
docker push $REPO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
docker version | ||
|
||
# Install docker-compose | ||
sudo rm -f /usr/local/bin/docker-compose | ||
curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose | ||
chmod +x docker-compose | ||
sudo mv docker-compose /usr/local/bin | ||
docker-compose version |