Warning, /frameworks/extra-cmake-modules/Jenkinsfile_master_kf5-qt5_linux_gcc is written in an unsupported language. File is not indexed.
0001 #!groovy 0002 0003 /* 0004 The MIT License 0005 Copyright (c) 2015-, CloudBees, Inc., and a number of other of contributors 0006 Permission is hereby granted, free of charge, to any person obtaining a copy 0007 of this software and associated documentation files (the "Software"), to deal 0008 in the Software without restriction, including without limitation the rights 0009 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 0010 copies of the Software, and to permit persons to whom the Software is 0011 furnished to do so, subject to the following conditions: 0012 The above copyright notice and this permission notice shall be included in 0013 all copies or substantial portions of the Software. 0014 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 0015 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 0016 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 0017 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 0018 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 0019 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 0020 THE SOFTWARE. 0021 */ 0022 0023 node(linux) { 0024 // We want Timestamps on everything 0025 timestamps { 0026 // First Thing: Checkout Sources 0027 stage('Checkout Sources') { 0028 // Actual Application Sources 0029 checkout changelog: true, poll: true, scm: [ 0030 $class: 'GitSCM', 0031 branches: [[name: ${branch}]], 0032 browser: [$class: 'CGit', repoUrl: 'https://cgit.kde.org/extra-cmake-modules.git'], 0033 extensions: [[$class: 'CloneOption', timeout: 120]], 0034 userRemoteConfigs: [[url: 'https://anongit.kde.org/extra-cmake-modules.git']] 0035 ] 0036 0037 // Our CI scripts 0038 checkout changelog: false, poll: false, scm: [ 0039 $class: 'GitSCM', 0040 branches: [[name: 'master']], 0041 extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/']], 0042 userRemoteConfigs: [[url: 'https://anongit.kde.org/sysadmin/ci-tools-experimental.git']] 0043 ] 0044 0045 // Dependency Metadata 0046 checkout changelog: false, poll: false, scm: [ 0047 $class: 'GitSCM', 0048 branches: [[name: 'master']], 0049 extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/dependencies/']], 0050 userRemoteConfigs: [[url: 'https://anongit.kde.org/kde-build-metadata']] 0051 ] 0052 0053 // KApiDox: For api.kde.org metadata extraction 0054 checkout changelog: false, poll: false, scm: [ 0055 $class: 'GitSCM', 0056 branches: [[name: 'master']], 0057 extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/kapidox/']], 0058 userRemoteConfigs: [[url: 'https://anongit.kde.org/kapidox']] 0059 ] 0060 0061 // kde-dev-scripts: For packager metadata extraction 0062 checkout changelog: false, poll: false, scm: [ 0063 $class: 'GitSCM', 0064 branches: [[name: 'master']], 0065 extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/kde-dev-scripts/']], 0066 userRemoteConfigs: [[url: 'https://anongit.kde.org/kde-dev-scripts']] 0067 ] 0068 } 0069 // Now Prepare to Build: Get the dependencies ready 0070 stage('Setup Dependencies') { 0071 // Now we can determine what our dependencies are 0072 // Then update to the latest version of the dependencies available from the master server 0073 // Finally extract all of those dependencies in turn into the given 'installTo' directory 0074 sh 'python helpers/prepare-dependencies.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux --installTo + "$WORKSPACE/install-prefix/" 0075 } 0076 // Now we can configure our build 0077 stage('Configuring Build') { 0078 // This is delegated through a helper script to handle minor special cases like inSourceBuilds, non-CMake build systems, etc 0079 sh 'python helpers/configure-build.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux '--installTo + "$WORKSPACE/install-prefix/" 0080 } 0081 // Finally we can build it! (Once again, through a helper) 0082 stage('Compiling') { 0083 // We use a helper here so we can determine the appropriate number of CPUs (-j) to build with 0084 sh 'python helpers/compile-build.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux 0085 } 0086 // Now ensure that it installs.... 0087 stage('Installing') { 0088 // The helper ensures that DESTDIR and INSTALL_ROOT are set to 'divertTo' 0089 // This allows us to capture the install at the next stage for later reuse in the Setup Dependencies step 0090 sh 'python helpers/install-build.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux --divertTo + "$WORKSPACE/install-divert/" 0091 } 0092 // Looks like it built okay - let's capture this for later use 0093 // We'll also take the opportunity to extract metadata from CMake used by packagers and api.kde.org 0094 stage('Capturing Installation') { 0095 // First we create a tar archive of the installation which was diverted 0096 // Then we upload a copy of that to the master server and have it publish the new archive 0097 // Finally to save bandwidth our copy of the tar archive is moved to our local cache for reuse on later builds on this node 0098 sh 'python helpers/capture-install.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux --divertedTo "$WORKSPACE/install-divert/" --installTo "$WORKSPACE/install-prefix/" 0099 // Now we extract the CMake metadata and upload that to the appropriate hosts 0100 sh 'python helpers/extract-cmake-metadata.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux 0101 } 0102 // Now we can run our tests 0103 stage('Running Tests') { 0104 // Run the unit tests for this project 0105 // Tests are run in a basic environment (X, DBus) 0106 sh 'python helpers/run-tests.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux 0107 // Collect our results 0108 junit allowEmptyResults: true, testResults: 'build/JUnitTestResults.xml' 0109 } 0110 // Final thing to do: some code quality checks 0111 stage('Checking Code Quality') { 0112 0113 // cppcheck is not supported by Pipeline at the moment, so we don't run that for now 0114 // See https://issues.jenkins-ci.org/browse/JENKINS-35096 0115 0116 // Cobertura doesn't support Pipeline either, so no code coverage publishing... 0117 // See https://issues.jenkins-ci.org/browse/JENKINS-30700 0118 0119 // Scan the logs and publish a warnings report 0120 step( [$class: 'WarningsPublisher', consoleParsers: [[parserName: 'GNU Make + GNU C Compiler (gcc)'], [parserName: 'Appstreamercli']], excludePattern: '/tmp/**'] ) 0121 } 0122 // Send an email notification of this 0123 emailext( 0124 to: 'ci-builds@kde.org', 0125 body: '${JELLY_SCRIPT,template="text"}', 0126 subject: 'KDE CI: ${PROJECT_NAME} - Build # ${BUILD_NUMBER} - ${BUILD_STATUS}!', 0127 attachLog: true 0128 ) 0129 // IRC Notifications are currently not supported by Pipeline 0130 // See https://issues.jenkins-ci.org/browse/JENKINS-33922 0131 // We can probably workaround this using Pursuivant and the emails Jenkins sends out 0132 // This would allow subscribing to build notifications for IRC channels in much the same way one subscribes for Commits and Bugzilla changes 0133 } 0134 }