mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-02 05:21:36 +01:00
Travis configuration changes
Created bash scripts for different steps and added them as jobs for travis to execute. Begun preparing system testing: Goal is enabling actual servers with the plugin to see if it enables
This commit is contained in:
parent
a281d67fc2
commit
ab3833df91
3
.gitignore
vendored
3
.gitignore
vendored
@ -5,9 +5,6 @@ PlanPluginBridge.iml
|
||||
|
||||
*.db
|
||||
|
||||
# Shell files
|
||||
*.sh
|
||||
|
||||
# Created by https://www.gitignore.io/api/maven,eclipse,intellij,netbeans,osx,windows,notepadpp,windows,java
|
||||
|
||||
### Maven ###
|
||||
|
24
.travis.yml
24
.travis.yml
@ -1,12 +1,7 @@
|
||||
language: java
|
||||
sudo: false
|
||||
install: true
|
||||
before_install:
|
||||
- cd PlanPluginBridge
|
||||
- mvn install:install-file -Dfile=./PlanPluginBridge-4.5.0.jar -DpomFile=./pom.xml
|
||||
- cd ../Plan
|
||||
install:
|
||||
- mvn clean
|
||||
install: false
|
||||
|
||||
addons:
|
||||
sonarcloud:
|
||||
organization: "player-analytics-plan"
|
||||
@ -14,10 +9,19 @@ addons:
|
||||
secure: "bTqGEUlfpVGgXgwC9UiIwYN+LsUtXFHTbWkAjnNJcCKTLDvHzUfDzY8/M7YIpIlcS7EWggNgJhskkg/WBglESx/0KcVl4NukMgbylqvp7y1F7eOkYLuriWBpuwMaSCHTWjmyq1iWNJ26i569PETbKiS+sNYnx9lPIpXI4ph0M9EKK3nQpTLr1aeVHi+XilJu6UNY7whipoW1fEwn02s2SvIXUMJN1fS0tmUjMavlOnlxt0lCU/oayMVG7vFKE2wWDJ5Ucd6lLGLPA1at4ypy6nJVcl8Bn547qoXBoIyMbtAhpcLUzkkFLK8BxuSsQ5neK71GLlmbiU+bIU5dpfRgsS3XLOXSSgide0ly/Za4zQVUBfu36F5xJOFGGdALGfMBhWdCzW1j0oDcINauUhjK/VB9v8M8qpxBCV6Q570FH2CQdNotfUWvHHGVZf1+yqXnC5iUcIh4cuxNCrOgp3uql8cpLGtMfqScV4l7GkcYGXLZlLUhGPK5K8UhwPym31CJU8If6ExMiKttxvpCtcGsXx2bRl7gRl3+xdjlY0PzIfbBbgYY6uu5v6cK8RHxp/+sLsBDfPtVvRZnnOVACLUFzTRSr6nP0Cm8rr+91S3rTmf4Qug+IN32xMDVcs6Sm68v/KTn2QoA2XyXOMLbIR39/0ani00xCd3FPF9Ae115YHg="
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
script:
|
||||
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then mvn test; fi'
|
||||
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then mvn org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar; fi'
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: "Tests"
|
||||
name: "Prepare build"
|
||||
script: ./scripts/prepareBuild.sh
|
||||
- name: "Unit tests"
|
||||
script: ./scripts/runTests.sh
|
||||
- stage: "System Tests"
|
||||
name: "Test environment setup"
|
||||
script: ./scripts/prepareServerJars.sh
|
||||
cache:
|
||||
directories:
|
||||
- '$HOME/.m2/repository'
|
||||
- '$HOME/.sonar/cache'
|
||||
- '$HOME/servers/'
|
||||
|
3
scripts/eula.txt
Normal file
3
scripts/eula.txt
Normal file
@ -0,0 +1,3 @@
|
||||
#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).
|
||||
#Sun Nov 27 12:07:48 EET 2016
|
||||
eula=true
|
4
scripts/prepareBuild.sh
Normal file
4
scripts/prepareBuild.sh
Normal file
@ -0,0 +1,4 @@
|
||||
mvn clean
|
||||
cd PlanPluginBridge
|
||||
mvn install:install-file -Dfile=./PlanPluginBridge-4.5.0.jar -DpomFile=./pom.xml
|
||||
cd ..
|
43
scripts/prepareServerJars.sh
Normal file
43
scripts/prepareServerJars.sh
Normal file
@ -0,0 +1,43 @@
|
||||
mkdir $HOME/servers
|
||||
mkdir $HOME/servers/build
|
||||
|
||||
cd $HOME/servers
|
||||
|
||||
SPIGOT_FOUND=[[ -e spigot.jar ]]
|
||||
CRAFTBUKKIT_FOUND=[[ -e craftbukkit.jar ]]
|
||||
SPONGE_FOUND=[[ -e sponge.jar ]]
|
||||
|
||||
|
||||
cd $HOME/servers/build
|
||||
|
||||
wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
|
||||
git config --global --unset core.autocrlf
|
||||
|
||||
if [ ! $SPIGOT_FOUND ]; then
|
||||
echo "Building spigot 1.12.2"
|
||||
java -jar BuildTools.jar --rev 1.12.2
|
||||
cp spigot-1.12.2.jar ../spigot.jar
|
||||
else
|
||||
echo "Found spigot 1.12.2 jar"
|
||||
fi
|
||||
|
||||
if [ ! $CRAFTBUKKIT_FOUND ]; then
|
||||
echo "Building craftbukkit 1.8"
|
||||
java -jar BuildTools.jar --rev 1.8
|
||||
cp craftbukkit-1.8.jar ../craftbukkit.jar
|
||||
else
|
||||
echo "Found craftbukkit 1.8 jar"
|
||||
fi
|
||||
|
||||
if [ ! $SPONGE_FOUND ]; then
|
||||
echo "Downloading sponge"
|
||||
wget -O sponge.jar https://repo.spongepowered.org/maven/org/spongepowered/spongevanilla/1.12.2-7.1.4/spongevanilla-1.12.2-7.1.4.jar
|
||||
cp sponge.jar ../sponge.jar
|
||||
else
|
||||
echo "Found sponge jar"
|
||||
fi
|
||||
|
||||
|
||||
cd $HOME/servers
|
||||
rm -rf build
|
||||
cd $HOME
|
9
scripts/runTests.sh
Normal file
9
scripts/runTests.sh
Normal file
@ -0,0 +1,9 @@
|
||||
cd Plan
|
||||
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||
mvn test
|
||||
fi
|
||||
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
||||
mvn org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar
|
||||
fi
|
Loading…
Reference in New Issue
Block a user