sudo: required services: - docker env: global: - VERSION=17437 - GITHUB_REPO=crazy-max/docker-jetbrains-license-server - DOCKER_USERNAME=crazymax - DOCKER_REPONAME=jetbrains-license-server - QUAY_USERNAME=crazymax - QUAY_REPONAME=jetbrains-license-server - MICROBADGER_HOOK=https://hooks.microbadger.com/images/crazymax/jetbrains-license-server/PWF7sHnaK1djP4E9r5VY5suUqVk= - secure: JwfXiiIM4c6E+80O6XHQBhw6IdkerfGxlKo+YHvmtkHyz5Fvpc1ZRvWSZYHZhxE1gocThbKUCy4GsgIyiq+dsER27kdAnnvp6JLw8SZ5OSqtOOLjqCKilN2hwFaS/g6Xc3mGvTo+4ScAc9CDJamDCwGY+6r2g/+IdmCbgqOo8yaD4VkhP4eVB3f4el6F7jEwjo626QDzFZ1LVS0qmmeVBSU+xxfL5HolG+j//hLQ/49XIIGnsWtQmHbX1u2trSESyNRTFdY/KZ7qaW8l+BgLhplKu+YXAExb1POGcKJnffSJjCl22ggX1JUHANMgrcQfZe2DKkUJFqr8FvTCktj+lfAuMYwl3k24zcZHe8eTyBFh8YLs7pn++tOFWg0XcKCWO9vzHgbTf/m95F6tpDMx4Y49jRclJIslxkjf8YIuNvDOO4kPKp2bw4ymqjsayPLx3P4xB8vgvyAZeFBQevUkh3ia/3uCfwEwzWimlT1FTeDUj8h4A9y+zRy/AqGf35LneC/Sbwt5dNaCujAwOGFeCvTp43uYd10S5Rz026ecH/8XlcHzuH4+nUvXDnesRI79+6NkaKl8PdcTx0ZC44jIAULn60rur5ybNkQmv5GWjem1C24izosPuC8bLHYY6BSRPn+vacNZH9SYTw2wHiVunxZORWz4FsYAidFkoaygt9E= # DOCKER_PASSWORD - secure: Z+SIP2bLs70GcInLxGdYv68vXD47RIfowafFP8KpVt7EHki6AsIVJxrEH4/noj0jsx0Zyi93xAo+Z9Ms+BDsjUKeLjODS/mHjRQBrnryenjAnS8cRVvJUUDYcoY95SIOO4j6OSEIb+aI2d+6T2QX/iEgnEFDjiia2mLJ60orsWDtgoU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sxsO8PWKUA4FEoC3Ic9g5DBVte4SQJ5n6Ni2+DFnq4PZhBdCVwWnHh648sUfKncHdmbqTnIq6bN+RI9ZlY8MyeRKVVbbDU9mrmdM2aWlTeu4HQWd7J6ErHrTRDgkRJxKGbPDUemkX4Nhws= # GITHUB_TOKEN before_install: - sudo apt-get update - docker --version - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) - export DOCKER_TAG=$(if [ "$BRANCH" == "master" ]; then echo "latest"; else echo $BRANCH; fi) - export WAN_IP=$(dig +short myip.opendns.com @resolver1.opendns.com) - echo "WAN_IP=$WAN_IP, TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH, DOCKER_TAG=$DOCKER_TAG" install: - | docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg VCS_REF=${TRAVIS_COMMIT::8} \ --build-arg VERSION=${VERSION} \ -t $DOCKER_USERNAME/$DOCKER_REPONAME . before_script: - docker run -d -p 8000:80 -e JLS_VIRTUAL_HOSTS=$WAN_IP --name $DOCKER_REPONAME $DOCKER_USERNAME/$DOCKER_REPONAME - sleep 20 - docker logs $DOCKER_REPONAME script: - docker ps | grep $DOCKER_REPONAME after_success: - | test $TRAVIS_PULL_REQUEST = false \ && echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin \ && docker tag $DOCKER_USERNAME/$DOCKER_REPONAME $DOCKER_USERNAME/$DOCKER_REPONAME:$DOCKER_TAG \ && docker tag $DOCKER_USERNAME/$DOCKER_REPONAME $DOCKER_USERNAME/$DOCKER_REPONAME:$VERSION \ && docker push $DOCKER_USERNAME/$DOCKER_REPONAME \ && echo "$QUAY_PASSWORD" | docker login quay.io --username "$QUAY_USERNAME" --password-stdin \ && docker tag $DOCKER_USERNAME/$DOCKER_REPONAME quay.io/$DOCKER_USERNAME/$DOCKER_REPONAME:$DOCKER_TAG \ && docker tag $DOCKER_USERNAME/$DOCKER_REPONAME quay.io/$DOCKER_USERNAME/$DOCKER_REPONAME:$VERSION \ && docker push quay.io/$QUAY_USERNAME/$QUAY_REPONAME \ && curl -X POST $MICROBADGER_HOOK branches: except: - /^[0-9]/ notifications: webhooks: secure: aSAfpOXZ2sZF4lR+e0Pi8O1/ePVft0wwSQm6L2nugmk+bIkZO/iC+SaNTK1rbbiba/zEjSmxvtA+3Sx+Sw9eOPZaP3sm6PvaVycukmZeUeVMlDUDDiV1xKshAisYuheVSO4kvRFzqoSo/IwClukHbGtYO9bquxgfy+Nan5wkzx0rzFDNsSChDbAEcnZKXxSrXSlOYVtY1fRcBTq52BwnBJzE4+6zDDNJz47sJY3dhAToodOpg+LkiX6b8kY8iAtEf25HKGrJ+O7mGLJOrtZmHLBQXAhcMHLNGtajuP3xZe/1Nq/rezRzbD/Tv7breXoIABnHR6y7oGf2Iry46Uzeg758AEYNU4FymD2sDz1zF1362OFBDq50pZm/MG2K4YqrKcWoy+TzCm4+H/XzsXG1jootRj2vsy1/QFL6zI/vVk6ZsN2ISSEFrJ2T/SZZWHxhYihGemfaSLoLZ0o316KrJxmzj37YucYjJYY/b+iAQruAFPJLd3vtanHfTaFQdUiXJdU7rrolESKI1zg/1cx5rV8PrnUZJXrSNATXgoyXsEvDRsdekHg8w+6ml6OenhgrNoJYG1c+GFtCf/cUaKe9bw6WniiqXtgw75Tdz0BqzNTu9BibhnDdeKYFBzT6wgsBRs47fgWcnmy++CryMvWymTdiiDnTaljUGB/rikA9QTk=