diff --git a/.travis.yml b/.travis.yml index 9c97ae2..fe58ee0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ +language: generic + # Sudo required for doing docker build sudo: required services: @@ -5,11 +7,14 @@ services: # Build the docker image script: -- ./build/docker-build.sh +- docker build -t ${TRAVIS_COMMIT} . # If successful, see if we need to publish also after_success: -- ./build/travis-publish.sh +- test -z $TRAVIS_TAG && travis_terminate 0 +- docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-dse-config:${TRAVIS_TAG} +- docker login -u $DOCKER_USER -p $DOCKER_PASS +- docker push killrvideo/killrvideo-dse-config:${TRAVIS_TAG} # Environment variables needed when publishing env: diff --git a/Dockerfile b/Dockerfile index 374e34f..1f3eb94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM datastax/dse-server:6.0.2 +FROM datastax/dse-server:6.7.0 # Copy schema files into /opt/killrvideo-data COPY [ "lib/killrvideo-data/graph/killrvideo_video_recommendations_schema.groovy", "lib/killrvideo-data/schema.cql", "lib/killrvideo-data/search/*", "keyspace.cql", "/opt/killrvideo-data/" ] diff --git a/build/travis-publish.sh b/build/travis-publish.sh deleted file mode 100755 index f3f85f9..0000000 --- a/build/travis-publish.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -set -e # Exit with nonzero exit code if anything fails - -# If a pull request -if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - echo "Skipping publish for pull request" - exit 0 -fi - -# Invoke the publish script -MY_PATH="`dirname \"$0\"`" -( exec "$MY_PATH/docker-publish.sh" )