代码拉取完成,页面将自动刷新
同步操作将从 openKylin/extra-cmake-modules 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!groovy
/*
The MIT License
Copyright (c) 2015-, CloudBees, Inc., and a number of other of contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
node(linux) {
// We want Timestamps on everything
timestamps {
// First Thing: Checkout Sources
stage('Checkout Sources') {
// Actual Application Sources
checkout changelog: true, poll: true, scm: [
$class: 'GitSCM',
branches: [[name: ${branch}]],
browser: [$class: 'CGit', repoUrl: 'https://cgit.kde.org/extra-cmake-modules.git'],
extensions: [[$class: 'CloneOption', timeout: 120]],
userRemoteConfigs: [[url: 'https://anongit.kde.org/extra-cmake-modules.git']]
]
// Our CI scripts
checkout changelog: false, poll: false, scm: [
$class: 'GitSCM',
branches: [[name: 'master']],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/']],
userRemoteConfigs: [[url: 'https://anongit.kde.org/sysadmin/ci-tools-experimental.git']]
]
// Dependency Metadata
checkout changelog: false, poll: false, scm: [
$class: 'GitSCM',
branches: [[name: 'master']],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/dependencies/']],
userRemoteConfigs: [[url: 'https://anongit.kde.org/kde-build-metadata']]
]
// KApiDox: For api.kde.org metadata extraction
checkout changelog: false, poll: false, scm: [
$class: 'GitSCM',
branches: [[name: 'master']],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/kapidox/']],
userRemoteConfigs: [[url: 'https://anongit.kde.org/kapidox']]
]
// kde-dev-scripts: For packager metadata extraction
checkout changelog: false, poll: false, scm: [
$class: 'GitSCM',
branches: [[name: 'master']],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/kde-dev-scripts/']],
userRemoteConfigs: [[url: 'https://anongit.kde.org/kde-dev-scripts']]
]
}
// Now Prepare to Build: Get the dependencies ready
stage('Setup Dependencies') {
// Now we can determine what our dependencies are
// Then update to the latest version of the dependencies available from the master server
// Finally extract all of those dependencies in turn into the given 'installTo' directory
sh 'python helpers/prepare-dependencies.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux --installTo + "$WORKSPACE/install-prefix/"
}
// Now we can configure our build
stage('Configuring Build') {
// This is delegated through a helper script to handle minor special cases like inSourceBuilds, non-CMake build systems, etc
sh 'python helpers/configure-build.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux '--installTo + "$WORKSPACE/install-prefix/"
}
// Finally we can build it! (Once again, through a helper)
stage('Compiling') {
// We use a helper here so we can determine the appropriate number of CPUs (-j) to build with
sh 'python helpers/compile-build.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux
}
// Now ensure that it installs....
stage('Installing') {
// The helper ensures that DESTDIR and INSTALL_ROOT are set to 'divertTo'
// This allows us to capture the install at the next stage for later reuse in the Setup Dependencies step
sh 'python helpers/install-build.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux --divertTo + "$WORKSPACE/install-divert/"
}
// Looks like it built okay - let's capture this for later use
// We'll also take the opportunity to extract metadata from CMake used by packagers and api.kde.org
stage('Capturing Installation') {
// First we create a tar archive of the installation which was diverted
// Then we upload a copy of that to the master server and have it publish the new archive
// Finally to save bandwidth our copy of the tar archive is moved to our local cache for reuse on later builds on this node
sh 'python helpers/capture-install.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux --divertedTo "$WORKSPACE/install-divert/" --installTo "$WORKSPACE/install-prefix/"
// Now we extract the CMake metadata and upload that to the appropriate hosts
sh 'python helpers/extract-cmake-metadata.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux
}
// Now we can run our tests
stage('Running Tests') {
// Run the unit tests for this project
// Tests are run in a basic environment (X, DBus)
sh 'python helpers/run-tests.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux
// Collect our results
junit allowEmptyResults: true, testResults: 'build/JUnitTestResults.xml'
}
// Final thing to do: some code quality checks
stage('Checking Code Quality') {
// cppcheck is not supported by Pipeline at the moment, so we don't run that for now
// See https://issues.jenkins-ci.org/browse/JENKINS-35096
// Cobertura doesn't support Pipeline either, so no code coverage publishing...
// See https://issues.jenkins-ci.org/browse/JENKINS-30700
// Scan the logs and publish a warnings report
step( [$class: 'WarningsPublisher', consoleParsers: [[parserName: 'GNU Make + GNU C Compiler (gcc)'], [parserName: 'Appstreamercli']], excludePattern: '/tmp/**'] )
}
// Send an email notification of this
emailext(
to: 'ci-builds@kde.org',
body: '${JELLY_SCRIPT,template="text"}',
subject: 'KDE CI: ${PROJECT_NAME} - Build # ${BUILD_NUMBER} - ${BUILD_STATUS}!',
attachLog: true
)
// IRC Notifications are currently not supported by Pipeline
// See https://issues.jenkins-ci.org/browse/JENKINS-33922
// We can probably workaround this using Pursuivant and the emails Jenkins sends out
// This would allow subscribing to build notifications for IRC channels in much the same way one subscribes for Commits and Bugzilla changes
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。