Skip to content

Commit

Permalink
Merge pull request #22 from ing-bank/sbt-versioning
Browse files Browse the repository at this point in the history
Align docker version with sbt version
  • Loading branch information
Bongani authored Mar 26, 2019
2 parents 7985225 + 7983a6e commit ada5f53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ script:

after_success:
- bash <(curl -s https://codecov.io/bash)
- export DOCKER_TAG="${TRAVIS_BRANCH/\//_}"
- export AIRLOCK_STS_VERSION="${TRAVIS_BRANCH/\//_}"
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- if [ "${TRAVIS_BRANCH}" != "master" ]; then
echo "Build image for with name $DOCKER_REPO:$DOCKER_TAG";
echo "Build image for with name $DOCKER_REPO:$AIRLOCK_STS_VERSION";
sbt clean docker:publish;
fi
- if [ -n "$TRAVIS_TAG" ]; then
docker tag $DOCKER_REPO:$DOCKER_TAG $DOCKER_REPO:latest;
docker tag $DOCKER_REPO:$AIRLOCK_STS_VERSION $DOCKER_REPO:latest;
docker push $DOCKER_REPO:latest;
fi
11 changes: 4 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import com.typesafe.sbt.packager.docker
import com.typesafe.sbt.packager.docker.ExecCmd
import scalariform.formatter.preferences._

name := "airlock-sts"

version := "0.1.9"
val airlockStsVersion = scala.sys.env.getOrElse("AIRLOCK_STS_VERSION", "SNAPSHOT")

name := "airlock-sts"
version := airlockStsVersion
scalaVersion := "2.12.8"

scalacOptions := Seq(
Expand Down Expand Up @@ -65,10 +65,7 @@ fork := true
dockerExposedPorts := Seq(12345)
dockerCommands += ExecCmd("ENV", "PROXY_HOST", "0.0.0.0")
dockerBaseImage := "openjdk:8u171-jre-slim-stretch"
dockerAlias := docker.DockerAlias(Some("docker.io"),
Some("wbaa"),
"airlock-sts",
Option(System.getenv("DOCKER_TAG")))
dockerAlias := docker.DockerAlias(Some("docker.io"), Some("wbaa"), "airlock-sts", Some(airlockStsVersion))

scalariformPreferences := scalariformPreferences.value
.setPreference(AlignSingleLineCaseStatements, true)
Expand Down

0 comments on commit ada5f53

Please sign in to comment.