forked from tho-wa/SmartApplianceEnabler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (39 loc) · 1.8 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
dist: bionic
sudo: required
language: java
jdk:
- openjdk11
services:
- docker
before_install:
- sudo apt-get -y install ccrypt &&
wget https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip &&
unzip -qq apache-maven-3.3.9-bin.zip &&
export M2_HOME=$PWD/apache-maven-3.3.9 &&
export PATH=$M2_HOME/bin:$PATH &&
mvn install:install-file -Dfile=lib/parent-1.0.0.pom -DpomFile=lib/parent-1.0.0.pom -Dpackaging=pom &&
mvn install:install-file -Dfile=lib/seamless-http-1.0.0.jar -DpomFile=lib/seamless-http-1.0.0.pom &&
mvn install:install-file -Dfile=lib/seamless-xml-1.0.0.jar -DpomFile=lib/seamless-xml-1.0.0.pom &&
mvn install:install-file -Dfile=lib/seamless-util-1.0.0.jar -DpomFile=lib/seamless-util-1.0.0.pom &&
mvn install:install-file -Dfile=lib/cling-2.0.0.pom -DpomFile=lib/cling-2.0.0.pom -Dpackaging=pom &&
mvn install:install-file -Dfile=lib/cling-core-2.0.0.jar -DpomFile=lib/cling-core-2.0.0.pom &&
wget https://nodejs.org/dist/v10.17.0/node-v10.17.0-linux-x64.tar.gz &&
tar xfz node-v10.17.0-linux-x64.tar.gz &&
export PATH=$PWD/node-v10.17.0-linux-x64/bin:$PATH
script:
- mvn package -B -Ptravis,web &&
pushd docker &&
cp ../target/SmartApplianceEnabler*.war sae-ci/SmartApplianceEnabler.war &&
echo $DOCKERHUB_ACCESS_TOKEN | docker login --username avanux --password-stdin &&
docker build --tag=avanux/smartapplianceenabler-amd64:ci ./sae-ci &&
docker push avanux/smartapplianceenabler-amd64:ci &&
popd &&
pushd ci &&
ccrypt -d -K $AWS_CRYPT_KEY aws.pem.cpt >/dev/null 2>&1 &&
chmod 400 aws.pem &&
ssh -i aws.pem -o StrictHostKeyChecking=no ec2-user@$DEPLOY_HOST 'bash -s' < deploy.sh &&
popd &&
pushd docker &&
./amd64_check.sh
after_success:
- bash <(curl -s https://codecov.io/bash)