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:
2023-10-05 23:29:19 +02:00
parent eb040d6a12
commit 8c7755f4b6
2 changed files with 15 additions and 1 deletions

15
Jenkinsfile vendored
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;
'''
}
}
}
}
}
}