Update Jenkinsfile

This commit is contained in:
2025-11-25 11:50:10 -06:00
parent b9f6697100
commit 067965d983

21
Jenkinsfile vendored
View File

@@ -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 {