Commit b6a78991 authored by Ben Cooksley's avatar Ben Cooksley

Completely eliminate Xenial based builds.

Replace the Frameworks ones with new SUSEQt5.7 builds.
Complete the purge of Fedora and the Qt 4 based CI system
parent 05d55ce2
......@@ -9,10 +9,9 @@ server:
archiveDirectory: "/srv/production/"
cacheLocation:
XenialQt4: "/srv/archives/production/XenialQt4/"
WindowsMSVCQt5.9: "C:\\Archives\\Production\\WindowsMSVCQt5.9\\"
XenialQt5.7: "/srv/archives/production/XenialQt5.7/"
SUSEQt5.7: "/srv/archives/production/SUSEQt5.7/"
SUSEQt5.9: "/srv/archives/production/SUSEQt5.9/"
FedoraQt5.8: "/srv/archives/production/FedoraQt5.8/"
SUSEQt5.10: "/srv/archives/production/SUSEQt5.10/"
FreeBSDQt5.7: "/usr/home/jenkins/archives/production/"
AndroidQt5.9: "/srv/archives/production/AndroidQt5.9/"
......@@ -9,10 +9,9 @@ server:
archiveDirectory: "/srv/sandbox/"
cacheLocation:
XenialQt4: "/srv/archives/sandbox/XenialQt4/"
WindowsMSVCQt5.9: "C:\\Archives\\Production\\WindowsMSVCQt5.9\\"
XenialQt5.7: "/srv/archives/sandbox/XenialQt5.7/"
SUSEQt5.7: "/srv/archives/sandbox/SUSEQt5.7/"
SUSEQt5.9: "/srv/archives/sandbox/SUSEQt5.9/"
FedoraQt5.8: "/srv/archives/sandbox/FedoraQt5.8/"
SUSEQt5.10: "/srv/archives/sandbox/SUSEQt5.10/"
FreeBSDQt5.7: "/usr/home/jenkins/archives/sandbox/"
AndroidQt5.9: "/srv/archives/sandbox/AndroidQt5.9/"
......@@ -3,7 +3,8 @@
- repositories:
- "frameworks/*"
platforms:
- "XenialQt5.7"
- "SUSEQt5.7"
- "SUSEQt5.10"
- "WindowsMSVCQt5.9"
- "FreeBSDQt5.7"
- repositories:
......@@ -118,6 +119,7 @@
- "extragear/graphics/kdiagram"
- "extragear/graphics/kgraphviewer"
- "extragear/graphics/kphotoalbum"
- "extragear/graphics/krita"
- "extragear/libs/kuserfeedback"
- "extragear/network/libktorrent"
- "extragear/network/ktorrent"
......@@ -146,12 +148,6 @@
- "SUSEQt5.9"
- "WindowsMSVCQt5.9"
- "FreeBSDQt5.7"
- repositories:
- "extragear/graphics/krita"
platforms:
- "SUSEQt5.9"
- "XenialQt5.7"
- "FreeBSDQt5.7"
branchGroups:
- "kf5-qt5"
- "stable-kf5-qt5"
......
......@@ -24,21 +24,6 @@
- 'kde/kdeedu/marble'
- 'kde/kdegraphics/libs/libkgeomap'
- 'kde/kdegraphics/okular'
'XenialQt4':
- 'kdesupport/automoc'
- 'kdesupport/strigi/libstreamanalyzer'
- 'kdesupport/strigi/libstreams'
- 'kdesupport/strigi/strigi'
- 'kdesupport/strigi/strigiclient'
- 'kdesupport/strigi/strigidaemon'
- 'kdesupport/strigi/strigiutils'
- 'frameworks/attica'
- 'frameworks/prison'
- 'kdesupport/polkit-qt-1'
- 'kde/kdenetwork/libktorrent'
- 'kde/applications/kate'
- 'kde/kde-workspace'
- 'kde/kdegraphics/kdegraphics-mobipocket'
'AndroidQt5.9':
#requires dbus
- 'frameworks/kwallet'
......
// Provisionally mark the build as successful
currentBuild.result = 'SUCCESS'
// Request a node to be allocated to us
node( currentPlatform ) {
// We want Timestamps on everything
timestamps {
// We want to catch any errors that occur to allow us to send out notifications (ie. emails) if needed
catchError {
// First Thing: Checkout Sources
stage('Checkout Sources') {
// Actual Application Sources
checkout changelog: true, poll: true, scm: [
$class: 'GitSCM',
branches: [[name: branchToBuild]],
browser: [$class: 'CGit', repoUrl: browserUrl],
extensions: [[$class: 'CloneOption', timeout: 120]],
userRemoteConfigs: [[url: repositoryUrl]]
]
// 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-tooling']]
]
// Projects metadata and next generation dependency metadata
checkout changelog: false, poll: false, scm: [
$class: 'GitSCM',
branches: [[name: 'master']],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/repo-metadata/']],
userRemoteConfigs: [[url: 'https://anongit.kde.org/sysadmin/repo-metadata']]
]
// Dependency Metadata
checkout changelog: false, poll: false, scm: [
$class: 'GitSCM',
branches: [[name: 'master']],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/kde-build-metadata/']],
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 "python3 -u ci-tooling/helpers/prepare-dependencies.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --environment ${ciEnvironment} --platform ${currentPlatform} --installTo '$HOME/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 "python3 -u ci-tooling/helpers/configure-build.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --installTo '$HOME/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 "python3 -u ci-tooling/helpers/compile-build.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --usingInstall '$HOME/install-prefix/'"
}
// 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 "python3 -u ci-tooling/helpers/install-build.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --installTo '$HOME/install-prefix/' --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 "python3 -u ci-tooling/helpers/capture-install.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --environment ${ciEnvironment} --platform ${currentPlatform} --divertedTo '$WORKSPACE/install-divert/' --installedTo '$HOME/install-prefix/'"
// Now we extract the CMake metadata and upload that to the appropriate hosts
sh "python3 -u ci-tooling/helpers/extract-cmake-dependency-metadata.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --usingInstall '$HOME/install-prefix/'"
sh "python3 -u ci-tooling/helpers/generate-dependency-diagram-data.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --usingInstall '$HOME/install-prefix/'"
}
// 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 "python3 -u ci-tooling/helpers/run-tests.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --usingInstall '$HOME/install-prefix/'"
// Collect our results
junit allowEmptyResults: true, testResults: 'JUnitTestResults.xml'
}
// Final thing to do: some code quality checks
stage('Checking Code Quality') {
// Perform Appstream Compliance Checks
sh "python3 -u ci-tooling/helpers/check-appstream-compliance.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --usingInstall '$HOME/install-prefix/' --withDiverted '$WORKSPACE/install-divert/'"
// 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
// Perform Cobertura Processing
// First, run the LCov extraction
sh "python3 -u ci-tooling/helpers/extract-lcov-results.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform}"
// Collect the results from the LCov extraction
step([
$class: 'CoberturaPublisher',
autoUpdateHealth: false, autoUpdateStability: false,
coberturaReportFile: 'CoberturaLcovResults.xml',
failNoReports: false, failUnhealthy: false, failUnstable: false,
maxNumberOfBuilds: 0,
onlyStable: false,
zoomCoverageChart: false
])
// Scan the logs and publish a warnings report
warnings consoleParsers: [[parserName: 'GNU Make + GNU C Compiler (gcc)'], [parserName: 'Appstreamercli']], excludePattern: "/tmp/**"
}
}
// The build has been completed now - it either succeeded, is unstable, or failed
// These parts aren't run within a stage as they're purely administrative and their output will be minimal if any exists
// First, do we need to capture a copy of the Workspace? We do this if it was unstable or failed
// This is to allow developers to examine what happened more easily
if( currentBuild.result == 'FAILURE' || currentBuild.result == 'UNSTABLE' ) {
// Capture the workspace
sh "python3 -u ci-tooling/helpers/capture-workspace.py --environment ${ciEnvironment}"
}
// Let's determine if we need to send out notifications
// What happened in our previous build?
def previousResult = currentBuild.previousBuild?.result
// If our condition has changed, is FAILURE or UNSTABLE then we want to send an email
if( previousResult != currentBuild.result || currentBuild.result == 'FAILURE' || currentBuild.result == 'UNSTABLE' ) {
// Construct the list of our recipients - starting with the ones requested as part of our job
def mailTo = [ emailRecipients ]
// If someone kicked this job off, they're presumably interested as well
mailTo << emailextrecipients( [[$class: 'RequesterRecipientProvider']] )
// Finalise the list of recipients
mailTo = mailTo.join(',')
// Send the email now
emailext(
to: mailTo,
body: '${JELLY_SCRIPT,template="html_gmail"}',
mimeType: 'text/html',
subject: 'KDE CI: ${PROJECT_NAME} - Build # ${BUILD_NUMBER} - ${BUILD_STATUS}!',
attachLog: false
)
}
// 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
}
}
SUSEQt5.7.template
\ No newline at end of file
FedoraQt5.8.template
\ No newline at end of file
// Provisionally mark the build as successful
currentBuild.result = 'SUCCESS'
// Request a node to be allocated to us
node( currentPlatform ) {
// We want Timestamps on everything
timestamps {
// We want to catch any errors that occur to allow us to send out notifications (ie. emails) if needed
catchError {
// First Thing: Checkout Sources
stage('Checkout Sources') {
// Actual Application Sources
checkout changelog: true, poll: true, scm: [
$class: 'GitSCM',
branches: [[name: branchToBuild]],
browser: [$class: 'CGit', repoUrl: browserUrl],
extensions: [[$class: 'CloneOption', timeout: 120]],
userRemoteConfigs: [[url: repositoryUrl]]
]
// 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-tooling']]
]
// Projects metadata and next generation dependency metadata
checkout changelog: false, poll: false, scm: [
$class: 'GitSCM',
branches: [[name: 'master']],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/repo-metadata/']],
userRemoteConfigs: [[url: 'https://anongit.kde.org/sysadmin/repo-metadata']]
]
// Dependency Metadata
checkout changelog: false, poll: false, scm: [
$class: 'GitSCM',
branches: [[name: 'master']],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/kde-build-metadata/']],
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 "python3 -u ci-tooling/helpers/prepare-dependencies.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --environment ${ciEnvironment} --platform ${currentPlatform} --installTo '$HOME/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 "python3 -u ci-tooling/helpers/configure-build.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --installTo '$HOME/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 "python3 -u ci-tooling/helpers/compile-build.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --usingInstall '$HOME/install-prefix/'"
}
// 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 "python3 -u ci-tooling/helpers/install-build.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --installTo '$HOME/install-prefix/' --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 "python3 -u ci-tooling/helpers/capture-install.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --environment ${ciEnvironment} --platform ${currentPlatform} --divertedTo '$WORKSPACE/install-divert/' --installedTo '$HOME/install-prefix/'"
// Now we extract the CMake metadata and upload that to the appropriate hosts
sh "python3 -u ci-tooling/helpers/extract-cmake-dependency-metadata.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --usingInstall '$HOME/install-prefix/'"
sh "python3 -u ci-tooling/helpers/generate-dependency-diagram-data.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --usingInstall '$HOME/install-prefix/'"
}
// 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 "python3 -u ci-tooling/helpers/run-tests.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --usingInstall '$HOME/install-prefix/'"
// Collect our results
junit allowEmptyResults: true, testResults: 'JUnitTestResults.xml'
}
// Final thing to do: some code quality checks
stage('Checking Code Quality') {
// Perform Appstream Compliance Checks
sh "python3 -u ci-tooling/helpers/check-appstream-compliance.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --usingInstall '$HOME/install-prefix/' --withDiverted '$WORKSPACE/install-divert/'"
// 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
// Perform Cobertura Processing
// First, run the LCov extraction
sh "python3 -u ci-tooling/helpers/extract-lcov-results.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform}"
// Collect the results from the LCov extraction
step([
$class: 'CoberturaPublisher',
autoUpdateHealth: false, autoUpdateStability: false,
coberturaReportFile: 'CoberturaLcovResults.xml',
failNoReports: false, failUnhealthy: false, failUnstable: false,
maxNumberOfBuilds: 0,
onlyStable: false,
zoomCoverageChart: false
])
// Scan the logs and publish a warnings report
warnings consoleParsers: [[parserName: 'GNU Make + GNU C Compiler (gcc)'], [parserName: 'Appstreamercli']], excludePattern: "/tmp/**"
}
}
// The build has been completed now - it either succeeded, is unstable, or failed
// These parts aren't run within a stage as they're purely administrative and their output will be minimal if any exists
// First, do we need to capture a copy of the Workspace? We do this if it was unstable or failed
// This is to allow developers to examine what happened more easily
if( currentBuild.result == 'FAILURE' || currentBuild.result == 'UNSTABLE' ) {
// Capture the workspace
sh "python3 -u ci-tooling/helpers/capture-workspace.py --environment ${ciEnvironment}"
}
// Let's determine if we need to send out notifications
// What happened in our previous build?
def previousResult = currentBuild.previousBuild?.result
// If our condition has changed, is FAILURE or UNSTABLE then we want to send an email
if( previousResult != currentBuild.result || currentBuild.result == 'FAILURE' || currentBuild.result == 'UNSTABLE' ) {
// Construct the list of our recipients - starting with the ones requested as part of our job
def mailTo = [ emailRecipients ]
// If someone kicked this job off, they're presumably interested as well
mailTo << emailextrecipients( [[$class: 'RequesterRecipientProvider']] )
// Finalise the list of recipients
mailTo = mailTo.join(',')
// Send the email now
emailext(
to: mailTo,
body: '${JELLY_SCRIPT,template="html_gmail"}',
mimeType: 'text/html',
subject: 'KDE CI: ${PROJECT_NAME} - Build # ${BUILD_NUMBER} - ${BUILD_STATUS}!',
attachLog: false
)
}
// 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
}
}
FedoraQt5.8.template
\ No newline at end of file
XenialQt5.7.template
\ No newline at end of file
SUSEQt5.9.template
\ No newline at end of file
XenialQt5.7.template
\ No newline at end of file
SUSEQt5.9.template
\ No newline at end of file
SUSEQt5.9.template
\ No newline at end of file
XenialQt5.7.template
\ No newline at end of file
// Request a node to be allocated to us
node( currentPlatform ) {
// We want Timestamps on everything
timestamps {
// We want to catch any errors that occur to allow us to send out notifications (ie. emails) if needed
catchError {
// First Thing: Checkout Sources
stage('Checkout Sources') {
// 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-tooling']]
]
// Projects metadata and next generation dependency metadata
checkout changelog: false, poll: false, scm: [
$class: 'GitSCM',
branches: [[name: 'master']],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/repo-metadata/']],
userRemoteConfigs: [[url: 'https://anongit.kde.org/sysadmin/repo-metadata']]
]
// Dependency Metadata
checkout changelog: false, poll: false, scm: [
$class: 'GitSCM',
branches: [[name: 'master']],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/kde-build-metadata/']],
userRemoteConfigs: [[url: 'https://anongit.kde.org/kde-build-metadata']]
]
}
// Now we run the Product Dependency Build Process
stage('Build Product Dependencies') {
// This script will do the following:
// 1) Determine what is in this Product
// 2) Determine what those repositories depend on
// 3) Determine what dependencies are outside of this Product
// 4) Sort those dependencies into an appropriate order to build them
// 5) Checkout, Configure, Compile, Install and Capture the Installation each of those dependencies in turn
// We can't do this as Pipeline steps unfortunately (at least not easily)
// Tests and Other Quality Tests won't be run during this process
// The results of this process are only intended to be used as part of the base of this Product, so don't need testing
sh "python3 -u ci-tooling/helpers/build-product-dependencies.py --product ${productName} --branchGroup ${branchGroup} --environment ${ciEnvironment} --platform ${currentPlatform} --installTo '$HOME/install-prefix/'"
}
}
// Let's determine if we need to send out notifications
// What happened in our previous build?
def previousResult = currentBuild.previousBuild?.result
// If our condition has changed, is FAILURE or UNSTABLE then we want to send an email
if( previousResult != currentBuild.result || currentBuild.result == 'FAILURE' || currentBuild.result == 'UNSTABLE' ) {
// Construct the list of our recipients - these people always want to be notified about Dependency Build jobs
def mailTo = []
// If someone kicked this job off, they're presumably interested as well
mailTo << emailextrecipients( [[$class: 'RequesterRecipientProvider']] )
// Finalise the list of recipients
mailTo = mailTo.join(',')
// Send the email now
emailext(
to: mailTo,
body: '${JELLY_SCRIPT,template="html_gmail"}',
mimeType: 'text/html',
subject: 'KDE CI: ${PROJECT_NAME} - Build # ${BUILD_NUMBER} - ${BUILD_STATUS}!',
attachLog: false
)
}
}
}
XenialQt5.7.template
\ No newline at end of file
// Request a node to be allocated to us
node( currentPlatform ) {
// We want Timestamps on everything
timestamps {
// We want to catch any errors that occur to allow us to send out notifications (ie. emails) if needed
catchError {
// First Thing: Checkout Sources
stage('Checkout Sources') {
// 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-tooling']]
]
// Projects metadata and next generation dependency metadata
checkout changelog: false, poll: false, scm: [
$class: 'GitSCM',
branches: [[name: 'master']],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/repo-metadata/']],
userRemoteConfigs: [[url: 'https://anongit.kde.org/sysadmin/repo-metadata']]
]
// Dependency Metadata
checkout changelog: false, poll: false, scm: [
$class: 'GitSCM',
branches: [[name: 'master']],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/kde-build-metadata/']],
userRemoteConfigs: [[url: 'https://anongit.kde.org/kde-build-metadata']]
]
}
// Now we run the Product Dependency Build Process
stage('Build Product Dependencies') {
// This script will do the following:
// 1) Determine what is in this Product
// 2) Determine what those repositories depend on
// 3) Determine what dependencies are outside of this Product
// 4) Sort those dependencies into an appropriate order to build them
// 5) Checkout, Configure, Compile, Install and Capture the Installation each of those dependencies in turn
// We can't do this as Pipeline steps unfortunately (at least not easily)
// Tests and Other Quality Tests won't be run during this process
// The results of this process are only intended to be used as part of the base of this Product, so don't need testing
sh "python3 -u ci-tooling/helpers/build-product-dependencies.py --product ${productName} --branchGroup ${branchGroup} --environment ${ciEnvironment} --platform ${currentPlatform} --installTo '$HOME/install-prefix/'"
}
}
// Let's determine if we need to send out notifications
// What happened in our previous build?
def previousResult = currentBuild.previousBuild?.result
// If our condition has changed, is FAILURE or UNSTABLE then we want to send an email
if( previousResult != currentBuild.result || currentBuild.result == 'FAILURE' || currentBuild.result == 'UNSTABLE' ) {
// Construct the list of our recipients - these people always want to be notified about Dependency Build jobs
def mailTo = []
// If someone kicked this job off, they're presumably interested as well
mailTo << emailextrecipients( [[$class: 'RequesterRecipientProvider']] )
// Finalise the list of recipients
mailTo = mailTo.join(',')
// Send the email now
emailext(
to: mailTo,
body: '${JELLY_SCRIPT,template="html_gmail"}',
mimeType: 'text/html',
subject: 'KDE CI: ${PROJECT_NAME} - Build # ${BUILD_NUMBER} - ${BUILD_STATUS}!',
attachLog: false
)
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment