Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix GUI testing in Jenkinsfile and docker
  • Loading branch information
mauriciojost committed May 15, 2018
1 parent 63b601c commit 9ad7a48
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Expand Up @@ -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') {
Expand Down
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -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`.

Expand Down
7 changes: 3 additions & 4 deletions 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
2 changes: 1 addition & 1 deletion extras/docker/ci/README.md
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion extras/docker/ci/build.sh → extras/docker/ci/build 100644 → 100755
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

docker login --username=mauriciojost

Expand Down
10 changes: 10 additions & 0 deletions 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

0 comments on commit 9ad7a48

Please sign in to comment.