forked from stevej/ensime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
43 lines (41 loc) · 1.91 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
pipeline:
build:
secrets: [ SONATYPE_USERNAME, SONATYPE_PASSWORD, DOCKER_TRIGGER_TOKEN ]
image: ensime/ensime:v2.x-cache
pull: true
privileged: true
environment:
- SBT_VOLATILE_TARGET=/root/ramdisk
- SBT_TASK_LIMIT=4
- AKKA_TEST_TIMEFACTOR=5
commands:
- host `curl -s http://httpbin.org/ip | jq -r '.origin'` || true ;
- git log | head -n 20 ; git fetch -q --tags
- if $(git grep -qE "TODO|FIXME" *) ; then
echo "Please remove TODO or FIXME. Create an issue at GitHub instead." ;
exit 1 ;
fi
- export BUILD_DIR=$PWD
- mkdir $SBT_VOLATILE_TARGET && mount -t tmpfs -o size=4g tmpfs $SBT_VOLATILE_TARGET ; df -h
- sbt ++$SCALA_VERSION fmt;
if $(! git diff --exit-code --quiet) ; then
echo "Code formatting does not meet the project's standards:" ;
git --no-pager diff ;
exit 1 ;
fi
- echo "ensimeServerJars := Nil" > ensime.sbt ;
echo "ensimeServerProjectJars := Nil" >> ensime.sbt ;
- sbt ++$SCALA_VERSION ensimeConfig ";compile ;test:compile ;it:compile ;doc ;ensime/assembly";
- if [ -n "$DRONE_PULL_REQUEST" ] ; then cd testing/cache && sbt ++$SCALA_VERSION ensimeConfig ensimeServerIndex && cd ../.. ; fi
- if [ -n "$DRONE_PULL_REQUEST" ] ; then sbt ++$SCALA_VERSION "testOnly -- -l tags.IgnoreOnDrone" ; fi
- if [ -n "$DRONE_PULL_REQUEST" ] ; then sbt ++$SCALA_VERSION "it:testOnly -- -l tags.IgnoreOnDrone" ; fi
- if [ -z "$DRONE_PULL_REQUEST" ] ; then sbt ++$SCALA_VERSION publish ; fi
- if [ -z "$DRONE_PULL_REQUEST" ] && [ "$SCALA_VERSION" = "2.12.3" ] ; then
curl -H 'Content-Type:application/json' --data '{"docker_tag":"v2.x-cache"}' -X POST "https://registry.hub.docker.com/u/ensime/ensime/trigger/${DOCKER_TRIGGER_TOKEN}/" ;
fi
matrix:
SCALA_VERSION:
- 2.12.3
- 2.11.11
- 2.10.6
branches: [ 1.0, 2.0 ]