forked from SCADA-LTS/Scada-LTS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
78 lines (78 loc) · 3.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
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
dist: xenial
sudo: required
before_install:
- sudo apt-get update
- sudo apt-get install tomcat7
- sudo apt-get install ant-optional
before_script:
- mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('root');"
- nvm ls
- nvm install 8
- nvm use node
- npm -v
- node -v
- env
- npm install -g bower
- chmod +x ./get_seroUtils.sh
- "./get_seroUtils.sh"
- ls -l ./WebContent/WEB-INF/lib/seroUtils.jar
# correct version base on Milestones
- sed -i '94s/.*/ return "'$SCADA_LTS_MILESTONE'";/' ./src/com/serotonin/mango/Common.java
- cd ./WebContent/resources/app; bower update;
- cd ../../..
- cd ./scadalts-ui
- npm install
- cd ../
language: java
jdk:
- openjdk8
services:
- docker
- mysql
script: ant war && ant junit
branches:
only:
- "/^siv/develop.*$/"
- "/^siv/master.*$/"
notifications:
email: false
env:
matrix:
- CATALINA_HOME=/usr/share/tomcat7
global:
- secure: "ZXkg2Dm3k8riijlVIZl5za7H07cO0G2Z3ELQxUtpSSasdQy7oIl0uwgNhiy2mKvTCSXl639j8IH9s9cer8TMkBjXr4ML/5OcDzvJWltqvOMNOIPlX3+28echTAm/emIrVuziTn/nhtZ1YcnHdmshmmNYb+7TD1NX2ds8PGII9OuQsU96w46/YPeTsdTs2VYJz/6D8GPTGUWSu3YjABsYobLqUFfV5QgJKe48MVaRxh7S8bRrwODQk5WpSIFnnhBWR5cHGKlrHx3pdnyBuW4ATQTH4BKgx+GMDYFvM2VCwr/bk+yuYE9j/LZJvxcv1E13OvFyvKdkUGcF34W85YOrG4pKzJP2r6S9ouZT1y6a4THBtzwimk9aae7Vauc1BNh4bYnRI/2HLIxAeYcwncc9KolcuYv2WdSyRxNnT24eXidj+nq1qfb82zWWVyj3fuIw76DfguJX2GeTGGGhXwV3HnyJNlxyN8dd7xmosM4cqmlLfk3hVB8NbuD6/5aN++anKZb4NkIGCi/zGjyRfpnbe7rw6bsrk7TqlAf6/gm4/CC1FG09POkmnYWL0DKjAOV2Z/W/1cdiUC9oeBuK1SJWqU/6p/51UJJrtUT13RQWF4kl85DZ1IJzQXAF0p1ROdTlyhKL3wYSOWJWzaaK/DP63G20zDL/FdCNLTLq/uYbazE="
- secure: "Cjz0OxIlJzAs66SHv9wFCWW4XdOoUv8YnED8mQG1Ds+I7KwoK7UTglsyzMmaOYYtzlDkAmuwn55wV6aS9lEPh5baT97phlDlUqrv6A/g7KBSS2qRfxt4G6zhoIOg8FCto5D6FU3FVKATbjZ9niT+96LOx61mFi5cLL1DpyylRk7EX4TiZGj4324ymZwItC8aRbdTD24+4zpTNI1irMF8c3TAmF+4/rUcYb0RYGKnbxylWjL83rqszICCce/Bg8ObYIv5a7xTUJX8kF/50iEHyOWJzLxo0IURiwuHdU6CyvFcorZJnQF/wTbZsxpDPhJBwgWE9umz1NekIX3/1+6EJ+nzc1W56lX4Atp5wntj9Bft8gngSmbR51dVxL0kbIiYcvfZvTrjQ00qoZbLlk8FWsfEIdVOqq2Dh0psPVOuzMcUQqAf/4jArxVXKnuzu0V8Z0dVq2zgpzW8DwGIGTBwJ8ySBnJRYsL9vkF/exT43mc9omBVJ5Ec1+WzFDjwMW8+VSwERDxF3Zubj8SXL8gSY2J2YmKEBTPY63qrTc5cWDtVjksYGKmTPKzvhfBn8Ykv8qA1SZSpnKS/4/YF7POxhFeJwyNfn5PWqcpe80JtG701gaRqzKFeB6RMr3NIgi6EAuIBxhsKL0ECISXFf3UsdcxU0rZ4yBESsW9x6jcEarI="
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-3.1.8-bin.jar ./lib/
- cp ../../WebContent/WEB-INF/lib/mysql-connector-java-5.1.38-bin.jar ./lib/
- ls -l ./lib/mysql-connector-java-3.1.8-bin.jar
- ls -l ./lib/mysql-connector-java-5.1.38-bin.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][0-9][0-9][0-9]' | head -n1`
- echo $TAGISSUE
- export TAG_DEV_OR_ISSUE=`if [ "$TRAVIS_BRANCH" == "siv/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 IMAGE_NAME=scadalts/scadalts
- docker build -t $IMAGE_NAME:$TRAVIS_COMMIT .
- docker tag $IMAGE_NAME:$TRAVIS_COMMIT $IMAGE_NAME:$TAG
- docker push $IMAGE_NAME:$TAG