Refacto ci/docker.sh
@@ -52,21 +52,17 @@ gcloud_auth() {
under_travis() {
# Special branching to be ran under travis
- if [ -n "$TRAVIS_TAG" ]; then
- # this function is only called when there is a tag
-
export REPO_NAME=${TRAVIS_REPO_SLUG}
-
export REPO_DIR=${TRAVIS_BUILD_DIR}
+ export PACKAGE_LOCATION=${TRAVIS_BUILD_DIR}/distribution/packages/deb/build/distributions/elassandra_*.deb
export ELASSANDRA_COMMIT=${TRAVIS_COMMIT}
+ export DOCKER_PUBLISH=true
export DOCKER_RUN_TESTS=true
# extract the elasticsearch version
ELASTICSEARCH_VERSION=$(echo "$TRAVIS_TAG" | sed 's/v\([0-9]*\.[0-9]*.\.[0-9]*\)\.[0-9]*.*/\1/')
- # publish to docker hub when a tag is set
- export DOCKER_PUBLISH=true
-
+ if [ -n "$TRAVIS_TAG" ]; then
# add extra tags when on master branches
if [[ ${TRAVIS_TAG} == v+([0-9]).+([0-9]).+([0-9]).+([0-9]) ]]; then
export DOCKER_MAJOR_LATEST=true
@@ -79,13 +75,8 @@ under_travis() {
# call the docker build+test+push script
build_with_retry
- # publish to gcloud registry. DISABLED, the image is build from https://github.com/strapdata/elassandra-google-k8s-marketplace
- # gcloud_install
- # gcloud_auth || return 1
- # DOCKER_REGISTRY=gcr.io/ REPO_NAME=${GCLOUD_REPO_NAME:-strapdata-factory/elassandra} BASE_IMAGE=launcher.gcr.io/google/debian9:latest build_with_retry
-
- # If tag = v6.2.3.x, construct the intermediate image for gke
- if [[ ${TRAVIS_TAG} == v6.2.3.+([0-9]) ]]; then
+ # If tag = v6.8.4.x, construct the intermediate image for gke marketplace
+ if [[ ${TRAVIS_TAG} == v6.8.4.+([0-9]) ]]; then
# build a docker image based on google debian 9, used later as a base image in the elassandra gke marketplace
REPO_NAME=${REPO_NAME}-debian-gcr BASE_IMAGE=launcher.gcr.io/google/debian9:latest build_with_retry
fi
