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:
@@ -20,6 +20,7 @@ cp -L /etc/resolv.conf ${chrootDir}/etc/
|
|||||||
#Setup Repo
|
#Setup Repo
|
||||||
mkdir -p ${chrootDir}/etc/apk
|
mkdir -p ${chrootDir}/etc/apk
|
||||||
cp -L /etc/apk/repositories ${chrootDir}/etc/apk/repositories
|
cp -L /etc/apk/repositories ${chrootDir}/etc/apk/repositories
|
||||||
|
cp -L /home/jenkins/.abuild/*.pub ${chrootDir}/etc/apk/keys/
|
||||||
|
|
||||||
#Install config files
|
#Install config files
|
||||||
echo "PS1='(Chroot-$Name)Test:\w\$ '" >> ${chrootDir}/etc/profile
|
echo "PS1='(Chroot-$Name)Test:\w\$ '" >> ${chrootDir}/etc/profile
|
||||||
|
|||||||
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
@@ -107,6 +107,19 @@ pipeline {
|
|||||||
archiveArtifacts allowEmptyArchive: true, artifacts: 'out/**/*.apk', onlyIfSuccessful: true
|
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;
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user