This commit is contained in:
2023-06-06 16:01:02 +02:00
parent 9cf286db39
commit a06efd5355
4 changed files with 26 additions and 7 deletions

View File

@@ -11,8 +11,14 @@ 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"
]) {
String checksum_tippliga = sh returnStdout: true, script: "java -jar build/libs/tlw-database-tool-1.0.jar --mode PostChecksum --season ${season} --league 1 --configFile Tippliga 2>&1"
writeFile file: 'checksum_tippliga.txt', text: checksum_tippliga
archiveArtifacts artifacts: 'checksum_tippliga.txt', followSymlinks: false