Update Jenkinsfile
This commit is contained in:
21
Jenkinsfile
vendored
21
Jenkinsfile
vendored
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user