forked from SCADA-LTS/Scada-LTS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (79 loc) · 3.69 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
dist: xenial
sudo: required
before_install:
- sudo apt-get update
- sudo apt-get install tomcat7
- sudo apt-get install ant-optional
- mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('root');"
- nvm ls
- nvm install 12
- nvm use node
- npm -v
- npx -v
- node -v
- env
- ls -l ./WebContent/WEB-INF/lib/seroUtils.jar
- sed -i '96s/.*/ return "'$SCADA_LTS_MILESTONE'";/' ./src/com/serotonin/mango/Common.java
- cd ./scadalts-ui
- npm run-script build-config -- $SCADA_LTS_MILESTONE $TRAVIS_BUILD_NUMBER $TRAVIS_BRANCH $TRAVIS_COMMIT $TRAVIS_PULL_REQUEST $TRAVIS_PULL_REQUEST_BRANCH
- cd ../
language: java
jdk:
- openjdk11
services:
- docker
- mysql
install:
# Skipping tests because it is better to start that as another task on Travis.
- ant build-skip-test
- ant test-junit
script:
- ant create-war
branches:
only:
- "/^develop.*$/"
- "/^master.*$/"
- "/^release.*$/"
- "/^feature/#1610.*$/"
notifications:
email: false
env:
matrix:
- CATALINA_HOME=/usr/share/tomcat7
global:
- secure: AbO3W1BC2fYChnu4FoTzRRwQIsheniFkk+POQZTcii9opX+EuiA2c/0B9Ny6g8NQ1tSzYpk9Wss/hQUXU1SKsnKlnLf4/0GiUuSrqNEbKvibi+HIr9qDL2CXonF2EI7ouQwIM2Gsu3GaOGvidC3d6bYXKeRUyV6a/IehaKjEWIIiOUV6WldQQCF71DMdQnMGS2sOr4lt29EyDz7j4c+Kj35T0BnzPnKf/80gXULK4MrE1kY8JJNJS6dJmJ4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XcMK6mfve+sJGPKSEA9GRsynM=
after_script:
- wget https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.85/bin/apache-tomcat-7.0.85.tar.gz
- mkdir ./docker/app
- mv apache-tomcat-7.0.85.tar.gz ./docker/app
- ls -l ./docker/app/apache-tomcat-7.0.85.tar.gz
- cd ./docker/app
- echo `pwd`
- echo `ls -l`
- tar -zxvf apache-tomcat-7.0.85.tar.gz
- ls -l
- mv ./apache-tomcat-7.0.85/* ./
- rm -rf ./apache-tomcat-7.0.85
- cp ../../ScadaBR.war ./webapps
- ls -l ./webapps/ScadaBR.war
- cp ../../WebContent/WEB-INF/lib/mysql-connector-java-5.1.49.jar ./lib/
- ls -l ./lib/mysql-connector-java-5.1.49.jar
- cp -f ../config/context.xml ./conf/
- cat ./conf/context.xml
- cd ../
- pwd
- ls
- docker version
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- export TAGISSUE=`echo $TRAVIS_BRANCH | egrep -o '#[0-9]+' | head -n1 | sed -n 's/^#//p'`
- echo $TAGISSUE
- export TAG_DEV_OR_ISSUE=`if [ "$TRAVIS_BRANCH" == "develop" ]; then echo "siv_dev";
else echo $TAGISSUE ; fi`
- echo $TAG_DEV_OR_ISSUE
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TAG_DEV_OR_ISSUE; fi`
- export TAG=`if [ "$TAG" == "" ]; then echo "release"; else echo $TAG; fi`
- echo $MY_IMG_NAME; echo $TAG; echo $TRAVIS_COMMIT
- docker build -t $MY_IMG_NAME:$TRAVIS_COMMIT .
- docker tag $MY_IMG_NAME:$TRAVIS_COMMIT $MY_IMG_NAME:$TAG
- docker push $MY_IMG_NAME:$TAG