diff --git a/.travis.yml b/.travis.yml index a638be6..8dab11e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,39 @@ +sudo: required + +services: +- docker + language: java + install: - - gradle clean - - gradle assemble +- gradle clean +- gradle assemble + script: - - gradle check - - gradle distZip +- gradle check +- gradle distZip +- gradle distTar + +deploy: +- provider: releases + api_key: + secure: sfRsmy+ERytUMTj5IX8lIltu5C+hK1XjyEE4pNqLAtMpZhKUJDDoaJuiqLe1dTKs+hwFuViGHFgGUw5RGA+J57GTZCkkSvhe2e8ECMwBkmgXMX5PgFTtBpIkaqjppqy/qoyFkMIsyzzuxS76UnA7oG4cz4y0xgo4Wsuh75txGBHgpn718VwFUoTAR8cLfhsILbgyOau7YeDdTB13K+Pe2d+kOu02IeOCIUDpBMCVmAtj7FjWQmHWqoddZWxFOKxI4gDi2/DUx+3H9AHT+bzoe3fwE0oEiX/54fVK7HWMt8HjSdM43SYBokw3vn9Wn5A+ywMHOP2JCkKFIe6GIj8Fk2t/3MAeivh2WdBx4Hf/U6GiDzG2xPthO8js0/2chFjG7q1uRetnJtlx64kaMHnd45ZoPeESXIs1zRNVL/k9S4yc/Lfdj++Q/o7Q+5gJx39M1b8Gk1QCb6ZreflsH7fuCXtEIE8JLeEmEmyKnkuOq8ynWs+bMH7Go/qhD53ic9s+0sJxE21XOBkc4r4NQMljfcJSQQLgAtC8NyitfGSOcZiXvY3vxmINEkWpEufh1cKHe6ii9LV9vF/E8206Q/xfT2C4CfxsHgNApZzWQMf+Bm2cZplx5ooZNuO6Eg5m4Br5x2Quty/4U7dz/F6jAChsY8Mac6Bizx3XaqwBuqdabnA= + file_glob: true + file: + - dragonite-*/build/distributions/*.tar + - dragonite-*/build/distributions/*.zip + skip_cleanup: true + on: + branch: master + tags: true +- provider: script + script: "sh docker-build.sh" + skip_cleanup: true + on: + branch: master + tags: true + +env: + global: + - secure: TZHUNeZcWY1EksRm/dHPqH46cWrgQN3um6pfGF1pvIfBwgmmwfKh8jyvV/GA6h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G8kFezIf36iqYW2AsstpgFQbTm/iQf7tTn/cVRYswcoJ665xmJMpBERVh8mbaRMyRWNjaHdCRS+w/BdbzkHFRDk5fy8P3UgBF2EKD1Fw/YMtsrUOUMZ06WWrmVBjTJ8zGom9mgj1fILzI/jZrreYyYWm69aiJek+D6OkJShqrPoWFIOkcx9hsv67Vp1+6pmMwC9xf6uWPqOdx3Gj+ippYblUMqngQ/KYlvrzk= diff --git a/Dockerfile b/Dockerfile index 638b7cc..1595007 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -FROM openjdk:latest +FROM openjdk:slim -EXPOSE 5233 5234 1080 +EXPOSE 5233/udp 5234/udp 1080/tcp WORKDIR /code diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 92000b7..ec80219 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -1,6 +1,6 @@ FROM openjdk:alpine -EXPOSE 5233 5234 1080 +EXPOSE 5233/udp 5234/udp 1080/tcp WORKDIR /code diff --git a/docker-build.sh b/docker-build.sh new file mode 100755 index 0000000..ea393d0 --- /dev/null +++ b/docker-build.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +REPO='dragonitenetwork/dragonite-java' + +docker login -u $DOCKER_USER -p $DOCKER_PASS +docker build . -f Dockerfile -t $REPO +docker build . -f Dockerfile.alpine -t $REPO:alpine +docker tag $REPO $REPO:$TRAVIS_TAG +docker tag $REPO:alpine $REPO:$TRAVIS_TAG-alpine +docker push $REPO