Skip to content

Commit

Permalink
Don't build default run images in travis
Browse files Browse the repository at this point in the history
  • Loading branch information
bkgoksel committed Mar 14, 2019
1 parent 2e1629c commit c0edf2b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@ jobs:
- CODALAB_USERNAME=codalab CODALAB_PASSWORD=testpassword CI=false
python: 2.7
after_success: echo "skipped"
before_deploy:
- pip install twine
deploy:
# Build docker images using tag if it's a version tag (we're releasing)
# Otherwise if we're on master or staging build named images
- provider: script
# Remove first char of tag (v) to get version number from tag
script: ./scripts/travis_deploy.sh ${$TRAVIS_TAG:1} release
script: ./scripts/travis_deploy.sh ${TRAVIS_TAG#?} release
on:
branch: release
# only build on valid semver tags
tags: true
condition: $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+
Expand Down
12 changes: 6 additions & 6 deletions docker/build_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ echo "==> Building the frontend Docker image"
docker build -t codalab/frontend:$TAG -f docker/Dockerfile.frontend .
echo "==> Building the worker Docker image"
docker build -t codalab/worker:$TAG -f docker/Dockerfile.worker .
echo "==> Building the default-cpu Docker image"
docker build -t codalab/default-cpu:$TAG -f docker/Dockerfile.cpu .
echo "==> Building the default-gpu Docker image"
docker build -t codalab/default-gpu:$TAG -f docker/Dockerfile.gpu .
#echo "==> Building the default-cpu Docker image"
#docker build -t codalab/default-cpu:$TAG -f docker/Dockerfile.cpu .
#echo "==> Building the default-gpu Docker image"
#docker build -t codalab/default-gpu:$TAG -f docker/Dockerfile.gpu .

if [ "$PUSH" = "1" ]; then
docker login -u $DOCKER_USER -p $DOCKER_PWD
docker push codalab/bundleserver:$TAG
docker push codalab/frontend:$TAG
docker push codalab/worker:$TAG
docker push codalab/default-cpu:$TAG
docker push codalab/default-gpu:$TAG
# docker push codalab/default-cpu:$TAG
# docker push codalab/default-gpu:$TAG
fi
2 changes: 1 addition & 1 deletion scripts/travis_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fi
if [ "$RELEASE" = "1" ]; then
./docker/build_images.sh $TAG -p
./docker/build_images.sh latest -p
./upload_to_pypi.sh $TAG
./scripts/upload_to_pypi.sh $TAG
else
./docker/build_images.sh $TAG -p
fi
2 changes: 1 addition & 1 deletion scripts/upload_to_pypi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ usage()
VER=$1

echo "==> Packaging codalabworker"
cd ../worker
cd ./worker
python setup.py sdist
echo "==> Uploading codalabworker"
twine upload dist/codalabworker-$VER.tar.gz
Expand Down

0 comments on commit c0edf2b

Please sign in to comment.