forked from bmuschko/gradle-docker-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (45 loc) · 1.6 KB
/
.travis.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
44
45
46
47
48
49
language: java
jdk: openjdk8
install: true
sudo: required
env:
global:
- DOCKER_CONFIG="${TRAVIS_BUILD_DIR}/src/functTest/resources"
jobs:
include:
- stage: Compilation
script: ./gradlew classes
- stage: Unit Tests
script: ./gradlew test
- stage: Integration Tests
script: ./gradlew integrationTest
- stage: Functional Tests
script: ./gradlew functionalTest
before_script:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- docker run -d -p 5000:5000 --restart=always --name registry registry:2
- docker run -d -p 5001:5000 --restart=always --name secure_registry
-v "$(pwd)"/src/functTest/resources/auth:/auth:rw
-e "REGISTRY_AUTH=htpasswd"
-e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm"
-e "REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd"
registry:2
- stage: Documentation Tests
script: ./gradlew docTest
- stage: release
script: skip
deploy:
provider: script
script: ./gradlew -s assemble bintrayUpload gitPublishPush -Dorg.ajoberstar.grgit.auth.username=$GH_TOKEN
on:
tags: true
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/