Skip to content

Commit

Permalink
Merge pull request #74 from sdtabilit/feature/SLTS-65-building-the-ne…
Browse files Browse the repository at this point in the history
…w-ui-on-travis

SLTS-65 Add building the new UI on travis.
  • Loading branch information
grzesiekb authored Nov 25, 2016
2 parents fba111d + 3de5b82 commit d563644
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,9 @@ seroUtils.jar
*client*.png
*client*.css
*.vpp
###########################
# ScadaLTS-UI
###########################
/ScadaLTS-UI/node_modules/
/ScadaLTS-UI/.editorconfig
/ScadaLTS-UI/.editorconfig
/ScadaLTS-UI/dist
31 changes: 30 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,40 @@ before_install:
- sudo apt-get install tomcat7
- sudo apt-get install traceroute
- sudo apt-get install sshpass
#- wget https://nodejs.org/dist/v6.9.1/node-v6.9.1-linux-x64.tar.xz
#- mkdir node
#- mkdir node/etc
#- echo 'prefix=/usr/local' > node/etc/npmrc
#- tar xvf node-v*.tar.?z --strip-components=1 -C ./node
#- sudo mv node /opt/
#- export PATH=/opt/node/bin:$PATH
#- sudo apt-get install -y build-essential
#- curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
#- sudo apt-get install -y nodejs
#- wget -qO- https://deb.nodesource.com/setup_6.x | sudo bash -
#- sudo apt-get install nodejs
#- sudo apt-get install npm
before_script:
#- export PATH=/opt/node:/opt/node/bin:$PATH
- nvm ls
- nvm install node
- nvm use node
- npm -v
- node -v
- env
- npm install -g bower
- npm install -g angular-cli
- chmod +x ./get_seroUtils.sh
- "./get_seroUtils.sh"
- ls -l ./WebContent/WEB-INF/lib/seroUtils.jar
- cd ./WebContent/resources/app; bower update;
- cd ../../..
- cd ./ScadaLTS-UI
- npm install
- ng build
- cd ./war
- ant war
- cd ../..
language: java
jdk:
- openjdk7
Expand All @@ -35,9 +62,11 @@ env:
matrix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yl+Ds9BaImKtqNLJlrJoZlT4DitEPG4RR+WcCvsAJ8Tj7hiV6xwE2LwjiSC56U85k768PCsDLDA7q8VoR1QoMIeZg1rW+rGgMUFOwgyMx0BuXBmyniU5T2trMJvcLZpHX/QPE4UnQ5jvnaEpTXxvJmLBeO1/5ajesCYNyIH9fE00b/vgz5yBVw3S9y0D3Ps7WhIXlhiz57pI6pBi8lUmO0YdtbW9Hc0oDpI7Asg04ftdIJ7Y1+3Ww/rwszQV6QnRiH9iuWq7HJJCmgKeNHS3fo/Zy8N9Xmx3hfFuedpToIN0B+tlzwnDCtvS4Zhx8rSv+9+v/XHYinan8z25Z3CM8A=
- TRAVIS_NODE_VERSION="6"
after_script:
- echo $TRAVIS_BUILD_DIR
- eval "$(ssh-agent -s)"
- traceroute -p 22 149.56.44.225
- sshpass -e scp ./ScadaBR.war [email protected]:/root/ScadaBR.war
- sshpass -e scp ./ScadaLTS-UI/war/ScadaLTS.war [email protected]:/root/ScadaLTS.war
3 changes: 3 additions & 0 deletions ScadaLTS-UI/war/WebContent/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

3 changes: 3 additions & 0 deletions ScadaLTS-UI/war/WebContent/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
19 changes: 19 additions & 0 deletions ScadaLTS-UI/war/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." name="ScadaLTS">

<target name="war" description="Bundles the application as a WAR file" >
<mkdir dir="WebContent/WEB-INF/classes"/>
<copy includeemptydirs="false" todir="WebContent">
<fileset dir="../dist">
<include name="**/*.html"/>
<include name="**/*.js"/>
</fileset>
</copy>

<war destfile="ScadaLTS.war"
basedir="WebContent"
needxmlfile="false">
</war>
</target>

</project>

0 comments on commit d563644

Please sign in to comment.