From 067965d983893c46301a5f8c13085f7e6ebfcfff Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 25 Nov 2025 11:50:10 -0600 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 42b4260..70e2ec5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -102,7 +102,7 @@ spec: // } //} - stage('Upload to B2') { + stage('Upload to B2') { steps { container('b2') { withCredentials([ @@ -110,18 +110,27 @@ spec: string(credentialsId: 'b2-app-key', variable: 'B2_APPLICATION_KEY') ]) { sh ''' - b2 authorize-account ${B2_APPLICATION_ID} ${B2_APPLICATION_KEY} - b2 sync \ - --allowEmptySource \ - --compareVersions size \ - ./html/ \ + # Modern B2 command (replaces deprecated authorize-account) + b2 account authorize-account-key \\ + --applicationKeyId ${B2_APPLICATION_ID} \\ + --key ${B2_APPLICATION_KEY} + + # Sync HTML contents (not the directory) + b2 sync \\ + --allowEmptySource \\ + --compareVersions size \\ + --skip-perms \\ + --threads 10 \\ + ./html/ \\ b2://${B2_BUCKET_NAME}/builds/${BUILD_NUMBER}/ + + # Optional: List the uploaded files to verify + b2 ls b2://${B2_BUCKET_NAME}/builds/${BUILD_NUMBER} ''' } } } } - } post { success {