From 3f2ecebb083133553dbe2fe24db1ca8084ee26b6 Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 25 Nov 2025 13:32:23 -0600 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e6b76fc..47f3c25 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -87,55 +87,41 @@ docker run --rm \\ -v \"\$(pwd)/html:/app/html\" \\ -v \"\$(pwd)/tmp:/data/tmp\" \\ rocky-man:${BUILD_NUMBER} \\ - --versions ${params.VERSIONS} \\ + --versions \"${params.VERSIONS}\" \\ --verbose """ } } } - stage('Archive Artifacts') { - steps { - archiveArtifacts artifacts: 'html/**/*', fingerprint: true, allowEmptyArchive: true - } - } +// stage('Archive Artifacts') { +// steps { +// archiveArtifacts artifacts: 'html/**/*', fingerprint: true, allowEmptyArchive: true +// } +// } stage('Upload to B2') { when { expression { return params.B2_BUCKET_NAME != "" } } steps { - container('b2') { + container('docker-cli') { withCredentials([ - string(credentialsId: 'b2-app-id', variable: 'B2_APPLICATION_ID'), + string(credentialsId: 'b2-app-id', variable: 'B2_APPLICATION_KEY_ID'), string(credentialsId: 'b2-app-key', variable: 'B2_APPLICATION_KEY') ]) { sh ''' -# Modern B2 auth command -b2 account authorize-account-key \\ - --applicationKeyId ${B2_APPLICATION_ID} \\ - --key ${B2_APPLICATION_KEY} - -# Verify auth (should succeed) -b2 account get-account-info - -# Sync HTML contents -b2 sync \\ - --allowEmptySource \\ - --compareVersions size \\ - --skip-perms \\ - --threads 10 \\ - ./html/ \\ - b2://${B2_BUCKET_NAME}/builds/${BUILD_NUMBER}/ - -# Verify upload -b2 ls b2://${B2_BUCKET_NAME}/builds/${BUILD_NUMBER} + docker run --rm \ + -v "$(pwd)/html:/workspace/html" \ + -e B2_APPLICATION_KEY \ + -e B2_APPLICATION_KEY_ID \ + backblazeit/b2:latest \ + b2v4 sync /workspace/html/ "b2://${B2_BUCKET_NAME}/" ''' } } } } - } post { success {