Commit e7170725 authored by Ben Cooksley's avatar Ben Cooksley

Disable the email sending which will need some more thought.

Rework Pipeline to be more workable hopefully
parent f050bafb
......@@ -11,11 +11,12 @@ knownJobs.each {
def pipelineTemplate = readFileFromWorkspace("pipeline-templates/${it.platform}.template")
// Now we can construct our Pipeline script
def pipelineScript = """
|def repositoryUrl = ${it.url}
|def branchToBuild = ${it.branch}
|def projectName = ${it.name}
|def branchGroup = ${it.branchGroup}
|def currentPlatform = ${it.platform}
|def repositoryUrl = "${it.url}"
|def browserUrl = "${it.browserUrl}"
|def branchToBuild = "${it.branch}"
|def projectName = "${it.name}"
|def branchGroup = "${it.branchGroup}"
|def currentPlatform = "${it.platform}"
|${pipelineTemplate}""".stripMargin()
......
......@@ -59,6 +59,7 @@ for platform in platformMapper.knownPlatforms():
jobEntry = {
'name': project.name,
'url': 'git://anongit.kde.org/' + project.name,
'browserUrl': 'https://cgit.kde.org/' + project.name + '.git',
'branch': branchToBuild,
'branchGroup': branchGroup,
'platform': platform,
......
node('LABEL HERE') {
node( currentPlatform ) {
// We want Timestamps on everything
timestamps {
......@@ -8,10 +8,10 @@ node('LABEL HERE') {
// Actual Application Sources
checkout changelog: true, poll: true, scm: [
$class: 'GitSCM',
branches: [[name: 'master']],
browser: [$class: 'CGit', repoUrl: 'https://cgit.kde.org/repositoryName.git'],
branches: [[name: branchToBuild]],
browser: [$class: 'CGit', repoUrl: browserUrl],
extensions: [[$class: 'CloneOption', timeout: 120]],
userRemoteConfigs: [[url: 'https://anongit.kde.org/repositoryName.git']]
userRemoteConfigs: [[url: repositoryUrl]]
]
// Our CI scripts
......@@ -19,7 +19,7 @@ node('LABEL HERE') {
$class: 'GitSCM',
branches: [[name: 'master']],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/']],
userRemoteConfigs: [[url: 'https://anongit.kde.org/sysadmin/ci-tooling.git']]
userRemoteConfigs: [[url: 'https://anongit.kde.org/sysadmin/ci-tooling']]
]
// Projects metadata and next generation dependency metadata
......@@ -61,26 +61,26 @@ node('LABEL HERE') {
// 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 ci-tooling/helpers/prepare-dependencies.py --project projectName --branchGroup branchGroup --environment production --platform XenialQt5.7 --installTo $WORKSPACE/install-prefix/'
sh "python3 ci-tooling/helpers/prepare-dependencies.py --project ${projectName} --branchGroup ${branchGroup} --environment production --platform XenialQt5.7 --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 ci-tooling/helpers/configure-build.py --project projectName --branchGroup branchGroup --platform XenialQ5.7 --installTo $WORKSPACE/install-prefix/'
sh "python3 ci-tooling/helpers/configure-build.py --project ${projectName} --branchGroup ${branchGroup} --platform XenialQ5.7 --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 ci-tooling/helpers/compile-build.py --project projectName --branchGroup branchGroup --platform XenialQt5.7 --usingInstall $WORKSPACE/install-prefix/'
sh "python3 ci-tooling/helpers/compile-build.py --project ${projectName} --branchGroup ${branchGroup} --platform XenialQt5.7 --usingInstall $WORKSPACE/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 'python ci-tooling/helpers/install-build.py --project projectName --branchGroup branchGroup --platform XenialQt5.7 --installTo $WORKSPACE/install-prefix/ --divertTo $WORKSPACE/install-divert/'
sh "python3 ci-tooling/helpers/install-build.py --project ${projectName} --branchGroup ${branchGroup} --platform XenialQt5.7 --installTo $WORKSPACE/install-prefix/ --divertTo $WORKSPACE/install-divert/"
}
// Looks like it built okay - let's capture this for later use
......@@ -89,18 +89,18 @@ node('LABEL HERE') {
// 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 ci-tooling/helpers/capture-install.py --project projectName --branchGroup branchGroup --environment production --platform XenialQt5.7 --divertedTo $WORKSPACE/install-divert/ --installedTo $WORKSPACE/install-prefix/'
sh "python3 ci-tooling/helpers/capture-install.py --project ${projectName} --branchGroup ${branchGroup} --environment production --platform XenialQt5.7 --divertedTo $WORKSPACE/install-divert/ --installedTo $WORKSPACE/install-prefix/"
// Now we extract the CMake metadata and upload that to the appropriate hosts
sh 'python ci-tooling/helpers/extract-cmake-dependency-metadata.py --project projectName --branchGroup branchGroup --usingInstall $WORKSPACE/install-prefix/'
sh 'python ci-tooling/helpers/generate-dependency-diagram-data.py --project projectName --branchGroup branchGroup --usingInstall $WORKSPACE/install-prefix/'
sh "python3 ci-tooling/helpers/extract-cmake-dependency-metadata.py --project ${projectName} --branchGroup ${branchGroup} --usingInstall $WORKSPACE/install-prefix/"
sh "python3 ci-tooling/helpers/generate-dependency-diagram-data.py --project ${projectName} --branchGroup ${branchGroup} --usingInstall $WORKSPACE/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 'python ci-tooling/helpers/run-tests.py --project projectName --branchGroup branchGroup --platform XenialQt5.7 --usingInstall $WORKSPACE/install-prefix/'
sh "python3 ci-tooling/helpers/run-tests.py --project ${projectName} --branchGroup ${branchGroup} --platform XenialQt5.7 --usingInstall $WORKSPACE/install-prefix/"
// Collect our results
junit allowEmptyResults: true, testResults: 'build/JUnitTestResults.xml'
......@@ -121,16 +121,16 @@ node('LABEL HERE') {
}
// Send an email notification of this
emailext(
/*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
}
}
\ No newline at end of file
}
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