diff --git a/Jenkinsfile b/Jenkinsfile index 77880a7..4c93235 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ pipeline { stage('Test') { steps { echo "My branch is: ${env.BRANCH_NAME}" - sh 'sbt -Dsbt.log.noformat=true -Dsbt.global.base=.sbt -Dsbt.boot.directory=.sbt -Dsbt.ivy.home=.ivy2 test' + sh '/usr/bin/xvfb-run sbt -Dsbt.log.noformat=true -Dsbt.global.base=.sbt -Dsbt.boot.directory=.sbt -Dsbt.ivy.home=.ivy2 test' } } stage('Document') { diff --git a/README.md b/README.md index 8ad44c6..2306dd2 100644 --- a/README.md +++ b/README.md @@ -263,7 +263,9 @@ sbt run # To launch it ``` If building with `openjdk`, you will need to install the Linux -package `openjfx`. +package `openjfx`. Also `xvfb` tool needs to be started prior to tests +so that the GUI tests can launch even without display (if running from a display-less +CI server like Jenkins). You can also use the provided docker image to use `Jenkinsfile`. diff --git a/extras/docker/ci/Dockerfile b/extras/docker/ci/Dockerfile index 0ec3b69..fa8b27b 100644 --- a/extras/docker/ci/Dockerfile +++ b/extras/docker/ci/Dockerfile @@ -1,8 +1,7 @@ #Download base image ubuntu 16.04 FROM mauriciojost/scala:latest -RUN apt-get update +COPY sources.list /etc/apt/sources.list +RUN apt-get update; exit 0 +RUN apt-get install -y graphviz xvfb openjfx -RUN apt-get install -y graphviz - -RUN apt-get install -y openjfx diff --git a/extras/docker/ci/README.md b/extras/docker/ci/README.md index 2d6fa7c..e21430d 100644 --- a/extras/docker/ci/README.md +++ b/extras/docker/ci/README.md @@ -14,7 +14,7 @@ sudo apt-get install docker-ce Then launch: ``` -bash build.sh +./build ``` (you will need an account at `docker.com` to publish your image). diff --git a/extras/docker/ci/build.sh b/extras/docker/ci/build old mode 100644 new mode 100755 similarity index 87% rename from extras/docker/ci/build.sh rename to extras/docker/ci/build index e676a20..a122e1b --- a/extras/docker/ci/build.sh +++ b/extras/docker/ci/build @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash docker login --username=mauriciojost diff --git a/extras/docker/ci/sources.list b/extras/docker/ci/sources.list new file mode 100644 index 0000000..6c1d2a1 --- /dev/null +++ b/extras/docker/ci/sources.list @@ -0,0 +1,10 @@ +deb http://archive.debian.org/debian/ stretch main non-free contrib +deb-src http://archive.debian.org/debian/ stretch main non-free contrib + +deb http://archive.debian.org/debian-security/ stretch/updates main non-free contrib +deb-src http://archive.debian.org/debian-security/ stretch/updates main non-free contrib + +deb http://deb.debian.org/debian stretch main +deb http://deb.debian.org/debian stretch-updates main +deb http://security.debian.org stretch/updates main +