From c0edf2bc36f7fd7d71ba9c2476e255f6f392a9f6 Mon Sep 17 00:00:00 2001 From: Kerem Goksel Date: Wed, 13 Mar 2019 15:39:48 -0700 Subject: [PATCH] Don't build default run images in travis --- .travis.yml | 5 +++-- docker/build_images.sh | 12 ++++++------ scripts/travis_deploy.sh | 2 +- scripts/upload_to_pypi.sh | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1f0e2aa81..ae92c133b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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]+ diff --git a/docker/build_images.sh b/docker/build_images.sh index f62a28d76..614adf9af 100755 --- a/docker/build_images.sh +++ b/docker/build_images.sh @@ -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 diff --git a/scripts/travis_deploy.sh b/scripts/travis_deploy.sh index 0d9a29d38..49c52be6a 100755 --- a/scripts/travis_deploy.sh +++ b/scripts/travis_deploy.sh @@ -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 diff --git a/scripts/upload_to_pypi.sh b/scripts/upload_to_pypi.sh index 384b5d949..08b3454fe 100755 --- a/scripts/upload_to_pypi.sh +++ b/scripts/upload_to_pypi.sh @@ -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