-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
95 lines (85 loc) · 4.48 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
dist: jammy
language: java
jdk:
- openjdk17
git:
depth: false
addons:
sonarcloud:
organization: ant-media-plugins
token: "$SONAR_TOKEN"
before_install:
- openssl aes-256-cbc -K $encrypted_171b1c559d7b_key -iv $encrypted_171b1c559d7b_iv
-in signingkey.asc.enc -out signingkey.asc -d
- export GPG_TTY=$(tty) #-> https://github.com/keybase/keybase-issues/issues/2798
- gpg --batch --fast-import signingkey.asc
- sudo apt-get update -qq
- sudo apt-get install ffmpeg -qq -y
- (if [ $(git ls-remote https://github.com/ant-media/ant-media-server-parent.git $TRAVIS_BRANCH |
wc -l) == "1" ]; then echo " $TRAVIS_BRANCH branch found"; git clone --depth=1 -b
$TRAVIS_BRANCH https://github.com/ant-media/ant-media-server-parent.git; else echo
"$TRAVIS_BRANCH branch not found. Checking out master"; git clone --depth=1 https://github.com/ant-media/ant-media-server-parent.git;
fi)
- cd ant-media-server-parent
- mvn clean install -DskipTests -Dmaven.javadoc.skip=true -Dgpg.skip=true --quiet
- cd ..
- (if [ $(git ls-remote https://github.com/ant-media/Ant-Media-Server.git $TRAVIS_BRANCH |
wc -l) == "1" ]; then echo "$TRAVIS_BRANCH branch found in Ant-Media-Server"; git
clone --depth=1 -b $TRAVIS_BRANCH https://github.com/ant-media/Ant-Media-Server.git;
else echo "$TRAVIS_BRANCH branch not found. Checking out master"; git clone --depth=1
https://github.com/ant-media/Ant-Media-Server.git; fi)
- cd Ant-Media-Server
- mvn clean install -DskipTests -Dmaven.javadoc.skip=true -Dgpg.skip=true --quiet
- cd ..
script:
# get latest snapshot
- wget -O maven-metadata.xml https://oss.sonatype.org/service/local/repositories/snapshots/content/io/antmedia/ant-media-server/maven-metadata.xml
- export LATEST_SNAPSHOT=$(grep -o '<version>[^<]*</version>' maven-metadata.xml | tail -n 1 | sed 's/<\/\?version>//g')
- wget -O ant-media-server-community.zip "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.antmedia&a=ant-media-server&v=${LATEST_SNAPSHOT}&c=community&e=zip";
#install script
- wget https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh -O install_ant-media-server.sh && chmod 755 install_ant-media-server.sh
- sudo ./install_ant-media-server.sh -i ant-media-server-community.zip
- sudo sed -i "/server.cpu_limit=/c\server.cpu_limit=100" /usr/local/antmedia/conf/red5.properties
- sudo sed -i "/server.memory_limit_percentage=/c\server.memory_limit_percentage=100" /usr/local/antmedia/conf/red5.properties
- cd SamplePlugin
- mvn clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -Dgpg.skip=true
- sudo cp target/PluginApp.jar /usr/local/antmedia/plugins
- ls /usr/local/antmedia/plugins
- sudo service antmedia restart
- sleep 20
- wget -O install_media-push-plugin.sh https://raw.githubusercontent.com/ant-media/Plugins/master/MediaPushPlugin/src/main/script/install_media-push-plugin.sh && chmod 755 install_media-push-plugin.sh
- sudo ./install_media-push-plugin.sh
# remove the current plugin and check that install script downloads the file
- sudo rm /usr/local/antmedia/plugins/media-push.jar
# if it exits with 0, it means that it's installed
- cd ../MediaPushPlugin
- rm src/main/resources/*.js
- cd src/main/js
- npm install
- npm run build
- cd ../../..
- mvn clean install -DskipTests -Dgpg.skip=true --quiet
- sudo cp target/media-push-plugin.jar /usr/local/antmedia/plugins/
- ls /usr/local/antmedia/plugins/
- sudo service antmedia restart
- sleep 20
#sonar project key and organization is defined in pom.xml
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent deploy org.jacoco:jacoco-maven-plugin:report sonar:sonar -DskipTests=false --settings ../mvn-settings.xml --quiet
- cd ../FilterPlugin
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent deploy org.jacoco:jacoco-maven-plugin:report
sonar:sonar -Dsonar.projectKey=ant-media_plugins --settings ../mvn-settings.xml --quiet
- cd ../TensorflowPlugin
- mvn clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -Dgpg.skip=true
- cd ../ID3Converter
- mvn clean install -Dgpg.skip=true
after_script:
- ls
- export FILE=hs_err_pid*.log
- (if test -f $FILE ; then echo "$FILE exists."; cat $FILE; else echo "$FILE not
exists."; fi)
after_failure:
- sudo cat /usr/local/antmedia/log/ant-media-server.log
- echo "----------------------------------------------"
- sudo cat /usr/local/antmedia/log/antmedia-error.log
- sudo cat /usr/local/antmedia/hs_err_pid*.log # cat hs_err_pid file if it exists
- sudo cat hs_err_pid*.log # cat hs_err_pid file if it exists