Update build script
This commit is contained in:
parent
e3bacc0eae
commit
72d583858d
18
build.sh
18
build.sh
@ -4,17 +4,19 @@ set -e
|
|||||||
PROJECT=jetbrains-license-server
|
PROJECT=jetbrains-license-server
|
||||||
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||||
BUILD_TAG=docker_build
|
BUILD_TAG=docker_build
|
||||||
|
BUILD_WORKINGDIR=${BUILD_WORKINGDIR:-.}
|
||||||
|
DOCKERFILE=${DOCKERFILE:-Dockerfile}
|
||||||
VCS_REF=${TRAVIS_COMMIT::8}
|
VCS_REF=${TRAVIS_COMMIT::8}
|
||||||
RUNNING_TIMEOUT=120
|
RUNNING_TIMEOUT=120
|
||||||
RUNNING_LOG_CHECK="is listening on"
|
RUNNING_LOG_CHECK="is listening on"
|
||||||
|
|
||||||
PUSH_LATEST=${PUSH_LATEST:-true}
|
PUSH_LATEST=${PUSH_LATEST:-true}
|
||||||
DOCKER_USERNAME=${DOCKER_USERNAME:="crazymax"}
|
DOCKER_USERNAME=${DOCKER_USERNAME:-crazymax}
|
||||||
DOCKER_LOGIN=${DOCKER_LOGIN:="crazymax"}
|
DOCKER_LOGIN=${DOCKER_LOGIN:-crazymax}
|
||||||
DOCKER_REPONAME=${DOCKER_REPONAME:="jetbrains-license-server"}
|
DOCKER_REPONAME=${DOCKER_REPONAME:-jetbrains-license-server}
|
||||||
QUAY_USERNAME=${QUAY_USERNAME:="crazymax"}
|
QUAY_USERNAME=${QUAY_USERNAME:-crazymax}
|
||||||
QUAY_LOGIN=${QUAY_LOGIN:="crazymax"}
|
QUAY_LOGIN=${QUAY_LOGIN:-crazymax}
|
||||||
QUAY_REPONAME=${QUAY_REPONAME:="jetbrains-license-server"}
|
QUAY_REPONAME=${QUAY_REPONAME:-jetbrains-license-server}
|
||||||
|
|
||||||
# Check local or travis
|
# Check local or travis
|
||||||
BRANCH=${TRAVIS_BRANCH:-local}
|
BRANCH=${TRAVIS_BRANCH:-local}
|
||||||
@ -53,11 +55,11 @@ docker build \
|
|||||||
--build-arg BUILD_DATE=${BUILD_DATE} \
|
--build-arg BUILD_DATE=${BUILD_DATE} \
|
||||||
--build-arg VCS_REF=${VCS_REF} \
|
--build-arg VCS_REF=${VCS_REF} \
|
||||||
--build-arg VERSION=${VERSION} \
|
--build-arg VERSION=${VERSION} \
|
||||||
-t ${BUILD_TAG} .
|
-t ${BUILD_TAG} -f ${DOCKERFILE} ${BUILD_WORKINGDIR}
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "### Test"
|
echo "### Test"
|
||||||
docker rm -f ${PROJECT} || true
|
docker rm -f ${PROJECT} > /dev/null 2>&1 || true
|
||||||
docker run -d -p 8000:80 \
|
docker run -d -p 8000:80 \
|
||||||
-e "JLS_VIRTUAL_HOSTS=docker.test" \
|
-e "JLS_VIRTUAL_HOSTS=docker.test" \
|
||||||
--name ${PROJECT} ${BUILD_TAG}
|
--name ${PROJECT} ${BUILD_TAG}
|
||||||
|
Loading…
Reference in New Issue
Block a user