diff --git a/ExampleSetupJenkinsChroot.sh b/ExampleSetupJenkinsChroot.sh index a257ee1..2514af7 100644 --- a/ExampleSetupJenkinsChroot.sh +++ b/ExampleSetupJenkinsChroot.sh @@ -20,6 +20,7 @@ cp -L /etc/resolv.conf ${chrootDir}/etc/ #Setup Repo mkdir -p ${chrootDir}/etc/apk cp -L /etc/apk/repositories ${chrootDir}/etc/apk/repositories +cp -L /home/jenkins/.abuild/*.pub ${chrootDir}/etc/apk/keys/ #Install config files echo "PS1='(Chroot-$Name)Test:\w\$ '" >> ${chrootDir}/etc/profile diff --git a/Jenkinsfile b/Jenkinsfile index 9194c20..d7b2e4f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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; + ''' + } + } + } } } }