From ef211c8de3bbcf65e83c0ad8cd99ce73d0b856ae Mon Sep 17 00:00:00 2001 From: akastijn Date: Sat, 28 Jun 2025 02:58:04 +0200 Subject: [PATCH] Use Jenkins credentials binding for Nexus snapshot authentication --- Jenkinsfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 41ce404..04080f0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,7 +3,13 @@ pipeline { stages { stage('Gradle') { steps { - sh './gradlew build -PalttdSnapshotUsername=$NEXUS_CREDS_USR -PalttdSnapshotPassword=$NEXUS_CREDS_PSW' + withCredentials([usernameColonPassword(credentialsId: 'alttd-snapshot-user', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { + sh ''' + set +x + chmod +x gradlew + ./gradlew build -PalttdSnapshotUsername=$USERNAME -PalttdSnapshotPass=$PASSWORD + ''' + } } } stage('Archive') {