Add auto update of results

This commit is contained in:
2023-06-06 15:45:25 +02:00
parent 7b721a5592
commit 4dcd994ac9
13 changed files with 275 additions and 74 deletions

View File

@@ -11,16 +11,24 @@ pipeline {
steps {
script {
String jdkPath = tool name: 'OpenJDK19', type: 'jdk'
withCredentials([usernamePassword(credentialsId: 'aws', passwordVariable: 'AWS_SECRET_KEY', usernameVariable: 'AWS_ACCESS_KEY_ID')]) {
withEnv(["JAVA_HOME=${jdkPath}/jdk-19.0.2", "AWS_SECRET_KEY=${AWS_SECRET_KEY}", "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}"]) {
withCredentials([
usernamePassword(credentialsId: 'aws', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_KEY'),
usernamePassword(credentialsId: 'forum_database', usernameVariable: 'TLW_DATABASE_USERNAME', passwordVariable: 'TLW_DATABASE_PASSWORD'),
usernamePassword(credentialsId: 'forum_user', usernameVariable: 'FORUM_USERNAME', passwordVariable: 'FORUM_PASSWORD')
]) {
withEnv([
"JAVA_HOME=${jdkPath}/jdk-19.0.2"
]) {
try {
sh "ls build/libs"
sh "java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 1 --configFile Tippliga 2>&1 >> log.txt"
sh "java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 1 --configFile Tippliga 2>&1 >> log.txt"
sh "java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 1 --configFile Tippliga 2>&1 >> log.txt"
sh "java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesResultsUpdater --season ${season} --league 1 --configFile Tippliga 2>&1 >> log.txt"
sh "java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 2 --configFile Tippliga 2>&1 >> log.txt"
sh "java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 2 --configFile Tippliga 2>&1 >> log.txt"
sh "java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 2 --configFile Tippliga 2>&1 >> log.txt"
sh "java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesResultsUpdater --season ${season} --league 2 --configFile Tippliga 2>&1 >> log.txt"
} catch (Exception e) {
telegramSendManual("TLW-Database-Tool crashed!")
}