Merge remote-tracking branch 'origin/main'
This commit is contained in:
4
jenkinsfiles/APIFootballUpdater/Jenkinsfile
vendored
4
jenkinsfiles/APIFootballUpdater/Jenkinsfile
vendored
@@ -34,8 +34,8 @@ pipeline {
|
||||
}
|
||||
stage('Trigger Tool') {
|
||||
steps {
|
||||
build wait: false, job: 'TippligaUpdater${season}'
|
||||
build wait: false, job: 'WTLPokalUpdater${season}'
|
||||
build wait: false, job: 'TippligaUpdater'
|
||||
build wait: false, job: 'WTLPokalUpdater'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
44
jenkinsfiles/SupercupUpdater/Jenkinsfile
vendored
44
jenkinsfiles/SupercupUpdater/Jenkinsfile
vendored
@@ -13,35 +13,15 @@ pipeline {
|
||||
String jdkPath = tool name: 'OpenJDK', 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}"]) {
|
||||
String outputBuild = ""
|
||||
String output = ""
|
||||
String errorOutput = ""
|
||||
String outputTemp = ""
|
||||
try {
|
||||
outputTemp = sh returnStdout: true, script: "java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 45 --configFile Supercup 2>&1"
|
||||
output += outputTemp
|
||||
sh "java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 45 --configFile Supercup 2>&1 >> log.txt"
|
||||
sh "java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 45 --configFile Supercup 2>&1 >> log.txt"
|
||||
sh "java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 45 --configFile Supercup 2>&1 >> log.txt"
|
||||
} catch (Exception e) {
|
||||
errorOutput += outputTemp
|
||||
telegramSendManual("TLW-Database-Tool crashed!")
|
||||
}
|
||||
try {
|
||||
outputTemp = sh returnStdout: true, script: "java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 45 --configFile Supercup 2>&1"
|
||||
output += outputTemp
|
||||
} catch (Exception e) {
|
||||
errorOutput += outputTemp
|
||||
}
|
||||
try {
|
||||
outputTemp = sh returnStdout: true, script: "java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 45 --configFile Supercup 2>&1"
|
||||
output += outputTemp
|
||||
} catch (Exception e) {
|
||||
errorOutput += outputTemp
|
||||
}
|
||||
if(output != "") {
|
||||
output = clean(output)
|
||||
output.split('\n').toList().unique().each {
|
||||
telegramSendManual(it)
|
||||
}
|
||||
}
|
||||
if(errorOutput != "") {
|
||||
String outputString = readFile 'log.txt'
|
||||
if(outputString != "") {
|
||||
ArrayList<String> outputList = outputString.replace("\n\n", "\n").split('\n').toList()
|
||||
outputList = clean(outputList)
|
||||
outputList.each {
|
||||
@@ -53,14 +33,12 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('CleanUp') {
|
||||
steps {
|
||||
deleteDir()
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
post {
|
||||
always {
|
||||
deleteDir()
|
||||
}
|
||||
failure {
|
||||
telegramSendManual("Build failed!\n${env.BUILD_URL}console")
|
||||
}
|
||||
}
|
||||
|
||||
44
jenkinsfiles/WTLPokalUpdater/Jenkinsfile
vendored
44
jenkinsfiles/WTLPokalUpdater/Jenkinsfile
vendored
@@ -13,35 +13,15 @@ pipeline {
|
||||
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}"]) {
|
||||
String outputBuild = ""
|
||||
String output = ""
|
||||
String errorOutput = ""
|
||||
String outputTemp = ""
|
||||
try {
|
||||
outputTemp = sh returnStdout: true, script: "java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 48 --configFile WTL-Pokal 2>&1"
|
||||
output += outputTemp
|
||||
sh "java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesUpdaterFootball --season ${season} --league 48 --configFile WTL-Pokal 2>&1 >> log.txt"
|
||||
sh "java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 48 --configFile WTL-Pokal 2>&1 >> log.txt"
|
||||
sh "java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 48 --configFile WTL-Pokal 2>&1 >> log.txt"
|
||||
} catch (Exception e) {
|
||||
errorOutput += outputTemp
|
||||
telegramSendManual("TLW-Database-Tool crashed!")
|
||||
}
|
||||
try {
|
||||
outputTemp = sh returnStdout: true, script: "java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 48 --configFile WTL-Pokal 2>&1"
|
||||
output += outputTemp
|
||||
} catch (Exception e) {
|
||||
errorOutput += outputTemp
|
||||
}
|
||||
try {
|
||||
outputTemp = sh returnStdout: true, script: "java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 48 --configFile WTL-Pokal 2>&1"
|
||||
output += outputTemp
|
||||
} catch (Exception e) {
|
||||
errorOutput += outputTemp
|
||||
}
|
||||
if(output != "") {
|
||||
output = clean(output)
|
||||
output.split('\n').toList().unique().each {
|
||||
telegramSendManual(it)
|
||||
}
|
||||
}
|
||||
if(errorOutput != "") {
|
||||
String outputString = readFile 'log.txt'
|
||||
if(outputString != "") {
|
||||
ArrayList<String> outputList = outputString.replace("\n\n", "\n").split('\n').toList()
|
||||
outputList = clean(outputList)
|
||||
outputList.each {
|
||||
@@ -53,14 +33,12 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('CleanUp') {
|
||||
steps {
|
||||
deleteDir()
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
post {
|
||||
always {
|
||||
deleteDir()
|
||||
}
|
||||
failure {
|
||||
telegramSendManual("Build failed!\n${env.BUILD_URL}console")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1068,5 +1068,10 @@
|
||||
"teamname": "Feyenoord",
|
||||
"tippligaID": 482,
|
||||
"apiFootballID": 209
|
||||
},
|
||||
{
|
||||
"teamname": "VfB Oldenburg",
|
||||
"tippligaID": 112,
|
||||
"apiFootballID": 9347
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user