Added repo upload to Jenkins file

Jenkinsfile can now  upload packages to repo on Gitea

Fixed missing archive key in Chroot setup example (since it resulted in buiild failure)
This commit is contained in:
brammp committed 2023-10-05 23:29:19 +02:00
1 parent eb040d6a12
commit 8c7755f4b6
2 files changed
+15 -1

No files matched your search

Vendored
+14 -1
View File
@@ -106,7 +106,20 @@ pipeline {
stage("Collecting packages form ${NativeArchNormalized}") {
archiveArtifacts allowEmptyArchive: true, artifacts: 'out/**/*.apk', onlyIfSuccessful: true
}
stage('Uploading packages to repo form ${NativeArchNormalized}') {
steps {
withCredentials([usernamePassword(credentialsId: 'GiteaPKGPUploadAuth', usernameVariable: 'UploadUsername', passwordVariable: 'UploadPassword')]) {
sh '''
for apkFile in $(find -L ~/packages -name '*.apk');
do
echo "Uploading $apkFile"
curl --user $UploadUsername:$UploadPassword --upload-file $apkFile https://git.bprieshof.nl/api/packages/brammp/alpine/v3.18/pkgs
done;
'''
}
}
}
}
}
}