-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (43 loc) · 1.4 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
50
51
52
53
54
sudo: required
language: java
jdk:
- oraclejdk11
services:
- docker
cache:
directories:
- .autoconf
- $HOME/.m2
branches:
only:
- master
- development
before_install:
# Add docker keys
- 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"
install:
# Install last docker
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- mvn install -DskipTests=true -B -V
# Build docker image
- docker build -t pipodi/italiaguerratelegrambot --build-arg JAR_FILE=target/italiaguerratelegrambot-1.0-SNAPSHOT-jar-with-dependencies.jar --build-arg CONSUMER_KEY=$CONSUMER_KEY --build-arg CONSUMER_SECRET=$CONSUMER_SECRET --build-arg ACCESS_TOKEN=$ACCESS_TOKEN --build-arg ACCESS_TOKEN_SECRET=$ACCESS_TOKEN_SECRET --build-arg TELEGRAM_API=$TELEGRAM_API .
- docker run -d --name=italiaguerratelegrambot pipodi/italiaguerratelegrambot
- docker ps -a
- docker stats --no-stream
script:
- echo "Skipping tests"
after_success:
- echo SUCCESS
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login -u=pipodi --password-stdin;
deploy:
- provider: script
script: bash scripts/deploy.sh
on:
branch: development
- provider: script
script: bash scripts/deploy.sh
on:
branch: master