Changeset View
Changeset View
Standalone View
Standalone View
flatpak/build-arm.pipeline
- This file was copied from flatpak/generic-build.pipeline.
1 | // Request a node to be allocated to us | 1 | // Request a node to be allocated to us | ||
---|---|---|---|---|---|
2 | node( "Flatpak" ) { | 2 | node( "Flatpak&&arm" ) { | ||
3 | // We want Timestamps on everything | 3 | // We want Timestamps on everything | ||
4 | timestamps { | 4 | timestamps { | ||
5 | // We want to catch any errors that occur to allow us to send out notifications (ie. emails) if needed | 5 | // We want to catch any errors that occur to allow us to send out notifications (ie. emails) if needed | ||
6 | catchError { | 6 | catchError { | ||
7 | // Make sure the local environment is cleaned up | 7 | // Make sure the local environment is cleaned up | ||
8 | stage('Cleaning up') { | 8 | stage('Cleaning up') { | ||
9 | // We don't want to use a previously used staging repository, to make sure it doesn't exist | 9 | // We don't want to use a previously used staging repository, to make sure it doesn't exist | ||
10 | sh """ | 10 | sh """ | ||
Show All 27 Lines | 37 | stage('Building Application') { | |||
38 | // Build it! | 38 | // Build it! | ||
39 | // We conduct all builds from ~/jenkins to allow for the compiler cache to be shared between builds | 39 | // We conduct all builds from ~/jenkins to allow for the compiler cache to be shared between builds | ||
40 | // It isn't necessary to create ~/staging-repo in advance as flatpak-builder will do that for us | 40 | // It isn't necessary to create ~/staging-repo in advance as flatpak-builder will do that for us | ||
41 | // We remove the app/ folder afterwards to be clean and tidy as we won't be inspecting it manually - we only want the artifacts in the repository! | 41 | // We remove the app/ folder afterwards to be clean and tidy as we won't be inspecting it manually - we only want the artifacts in the repository! | ||
42 | sh """ | 42 | sh """ | ||
43 | cd ~/jenkins/ | 43 | cd ~/jenkins/ | ||
44 | 44 | | |||
45 | BUILD_DATE=`date` | 45 | BUILD_DATE=`date` | ||
46 | flatpak-builder --force-clean --delete-build-dirs --arch=x86_64 --ccache --sandbox --user --install-deps-from=flathub --repo=\$HOME/staging-repo/ --subject="Built on \$BUILD_DATE" app "\$WORKSPACE/${manifest}" | 46 | flatpak-builder --force-clean --delete-build-dirs --arch=arm --ccache --sandbox --user --install-deps-from=flathub --repo=\$HOME/staging-repo/ --subject="Built on \$BUILD_DATE" app "\$WORKSPACE/${manifest}" | ||
47 | 47 | | |||
48 | rm -rf app/ | 48 | rm -rf app/ | ||
49 | """ | 49 | """ | ||
50 | } | 50 | } | ||
51 | 51 | | |||
52 | 52 | | |||
53 | // Run the repository export preparation process | 53 | // Run the repository export preparation process | ||
54 | stage('Exporting Repository') { | 54 | stage('Exporting Repository') { | ||
55 | // Do the build! | 55 | // Do the build! | ||
56 | sh """ | 56 | sh """ | ||
57 | flatpak build-update-repo --prune --prune-depth=20 --generate-static-deltas \$HOME/staging-repo/ | 57 | flatpak build-update-repo --prune --prune-depth=20 --generate-static-deltas \$HOME/staging-repo/ | ||
58 | """ | 58 | """ | ||
59 | } | 59 | } | ||
60 | 60 | | |||
61 | // Finally we can sign the repository | 61 | // Finally we can sign the repository | ||
bcooksley: In the exporting step you'll need to rsync the staging-repo/ to Joy for integration and… | |||||
62 | stage('Publishing Repository') { | 62 | stage('Preparing Repository') { | ||
You'll need to request that you're allocated to the main Flatpak builder node before entering this stage. bcooksley: You'll need to request that you're allocated to the main Flatpak builder node before entering… | |||||
apol: That will be requested by the publish-arm.pipeline | |||||
63 | // Sign and then upload the repository to the final server | 63 | // Sign and then upload the repository to the final server | ||
64 | sh """ | 64 | sh """ | ||
65 | flatpak build-commit-from --src-repo=\$HOME/staging-repo --gpg-sign=61C45BED \$HOME/public-repo --update-appstream | 65 | flatpak build-commit-from --src-repo=\$HOME/staging-repo --gpg-sign=4D669FB6 \$HOME/repo-arm --update-appstream | ||
66 | flatpak build-update-repo --prune --prune-depth=20 --generate-static-deltas --gpg-sign=61C45BED \$HOME/public-repo | 66 | flatpak build-update-repo --prune --prune-depth=20 --generate-static-deltas --gpg-sign=4D669FB6 \$HOME/repo-arm | ||
67 | rsync -Ha --delete \$HOME/public-repo/ flatpak@racnoss.kde.org:/srv/www/distribute.kde.org/flatpak-apps-testing/ | 67 | #repository will be put into the public repository by publish-arm.pipeline | ||
68 | rsync -Ha --delete \$HOME/repo-arm/ flatpakdev@joy.kde.org:/home/flatpakdev/repo-arm | ||||
bcooksley: Shouldn't this follow the same steps as publish-arm.pipeline? | |||||
68 | """ | 69 | """ | ||
69 | } | 70 | } | ||
70 | } | 71 | } | ||
71 | } | 72 | } | ||
72 | } | 73 | } |
In the exporting step you'll need to rsync the staging-repo/ to Joy for integration and publishing.