Commit 1c7e04a9 authored by Ben Cooksley's avatar Ben Cooksley

Refactor to include the Product name in job titles, and the packages stored on...

Refactor to include the Product name in job titles, and the packages stored on the master package repositories.
This is being done now to avoid a big rebuild later on and is a requirement to allow for various products to do things in a different manner.
It also ensures products don't interact with each other - a key requirement for the new system's design, to avoid breakages in ECM killing the entire CI
parent 2ae30ad5
......@@ -5,18 +5,20 @@ def knownJobs = new groovy.json.JsonSlurper().parseText( jobsToParse )
// Iterate over all of the known jobs and create the necessary platform files
knownJobs.each {
// Create our job name
def jobName = "${it.name} ${it.branchGroup} ${it.platform}"
def jobName = "${it.product} ${it.name} ${it.branchGroup} ${it.platform}"
// Read in the necessary Pipeline template
def pipelineTemplate = readFileFromWorkspace("pipeline-templates/${it.platform}.template")
// Now we can construct our Pipeline script
def pipelineScript = """
|def repositoryUrl = "${it.url}"
|def repositoryUrl = "${it.repositoryUrl}"
|def browserUrl = "${it.browserUrl}"
|def branchToBuild = "${it.branch}"
|def productName = "${it.product}"
|def projectName = "${it.name}"
|def branchGroup = "${it.branchGroup}"
|def currentPlatform = "${it.platform}"
|def ciEnvironment = "${it.environment}"
|${pipelineTemplate}""".stripMargin()
......
......@@ -8,6 +8,7 @@ from helperslib import BuildSpecs, BuildSystem, CommonUtils, EnvironmentHandler,
# Parse the command line arguments we've been given
parser = argparse.ArgumentParser(description='Utility to install a project, diverting the installation for later capture if requested.')
parser.add_argument('--product', type=str, required=True)
parser.add_argument('--project', type=str, required=True)
parser.add_argument('--branchGroup', type=str, required=True)
parser.add_argument('--platform', type=str, required=True)
......@@ -50,7 +51,7 @@ if os.getenv('GIT_COMMIT') != '':
scmRevision = os.getenv('GIT_COMMIT')
# Determine the package name...
package = Packages.nameForProject( arguments.project, arguments.branchGroup )
package = Packages.nameForProject( arguments.product, arguments.project, arguments.branchGroup )
# Add the package to the archive
ourArchive.storePackage( package, archiveFile.name, scmRevision )
......
......@@ -5,6 +5,7 @@ from helperslib import BuildSpecs, BuildSystem, CommonUtils, EnvironmentHandler
# Parse the command line arguments we've been given
parser = argparse.ArgumentParser(description='Utility to determine whether an application is appstream compliant.')
parser.add_argument('--product', type=str, required=True)
parser.add_argument('--project', type=str, required=True)
parser.add_argument('--branchGroup', type=str, required=True)
parser.add_argument('--platform', type=str, required=True)
......@@ -12,7 +13,7 @@ parser.add_argument('--usingInstall', type=str, required=True)
arguments = parser.parse_args()
# Load our build specification, which governs how we handle this build
buildSpecification = BuildSpecs.Loader( project=arguments.project, branchGroup=arguments.branchGroup )
buildSpecification = BuildSpecs.Loader( product=arguments.product, project=arguments.project, branchGroup=arguments.branchGroup )
# Determine the environment we need to provide for the compilation process
buildEnvironment = EnvironmentHandler.generateFor( installPrefix=arguments.usingInstall )
......@@ -34,4 +35,4 @@ except Exception:
sys.exit(1)
# The project passed appstream validation successfully
sys.exit(0)
\ No newline at end of file
sys.exit(0)
......@@ -7,6 +7,7 @@ from helperslib import BuildSpecs, BuildSystem, CommonUtils, EnvironmentHandler
# Parse the command line arguments we've been given
parser = argparse.ArgumentParser(description='Utility to compile a project.')
parser.add_argument('--product', type=str, required=True)
parser.add_argument('--project', type=str, required=True)
parser.add_argument('--branchGroup', type=str, required=True)
parser.add_argument('--platform', type=str, required=True)
......@@ -14,7 +15,7 @@ parser.add_argument('--usingInstall', type=str, required=True)
arguments = parser.parse_args()
# Load our build specification, which governs how we handle this build
buildSpecification = BuildSpecs.Loader( project=arguments.project, branchGroup=arguments.branchGroup )
buildSpecification = BuildSpecs.Loader( product=arguments.product, project=arguments.project, branchGroup=arguments.branchGroup )
# Determine the environment we need to provide for the compilation process
buildEnvironment = EnvironmentHandler.generateFor( installPrefix=arguments.usingInstall )
......
......@@ -2,10 +2,12 @@
import os
import sys
import argparse
import subprocess
from helperslib import BuildSpecs, BuildSystem, CommonUtils, EnvironmentHandler
# Parse the command line arguments we've been given
parser = argparse.ArgumentParser(description='Utility to configure a project to be built.')
parser.add_argument('--product', type=str, required=True)
parser.add_argument('--project', type=str, required=True)
parser.add_argument('--branchGroup', type=str, required=True)
parser.add_argument('--platform', type=str, required=True)
......@@ -13,7 +15,7 @@ parser.add_argument('--installTo', type=str, required=True)
arguments = parser.parse_args()
# Load our build specification, which governs how we handle this build
buildSpecification = BuildSpecs.Loader( project=arguments.project, branchGroup=arguments.branchGroup )
buildSpecification = BuildSpecs.Loader( product=arguments.product, project=arguments.project, branchGroup=arguments.branchGroup )
# Determine the environment we need to provide to any configure system (like CMake or Autotools)
buildEnvironment = EnvironmentHandler.generateFor( installPrefix=arguments.installTo )
......
......@@ -5,13 +5,14 @@ from helperslib import BuildSpecs, BuildSystem, CommonUtils, EnvironmentHandler,
# Parse the command line arguments we've been given
parser = argparse.ArgumentParser(description='Utility to extract CMake Dependency Metadata from a build system. Provided to assist packagers with their packages.')
parser.add_argument('--product', type=str, required=True)
parser.add_argument('--project', type=str, required=True)
parser.add_argument('--branchGroup', type=str, required=True)
parser.add_argument('--usingInstall', type=str, required=True)
arguments = parser.parse_args()
# Load our build specification, which governs how we handle this build
buildSpecification = new BuildSpecs.Loader( project=arguments.project, branchGroup=arguments.branchGroup )
buildSpecification = new BuildSpecs.Loader( product=arguments.product, project=arguments.project, branchGroup=arguments.branchGroup )
# Determine the environment we need to provide for the compilation process
buildEnvironment = EnvironmentHandler.generateFor( installPrefix=arguments.usingInstall )
......@@ -24,7 +25,7 @@ buildLocation = CommonUtils.buildDirectoryForSources( sources=sourcesLocation, i
# Determine the name we'll use to store the results, as well as the local and remote paths it will be stored at
# We use the package name as it's pretty much guaranteed to be unique among all the builds we will be running
# As the CMake dependency metadata is only used by Linux packagers, we don't need to take platform into account here
dependencyFilename = Packages.nameForProject(arguments.project, arguments.branchGroup) + '.json'
dependencyFilename = Packages.nameForProject(arguments,product, arguments.project, arguments.branchGroup) + '.json'
localDependencyFilename = os.path.join( sourcesLocation, dependencyFilename )
remoteDependencyFilename = os.path.join( '/srv/dependency-metadata/', dependencyFilename )
......
......@@ -7,6 +7,7 @@ from helperslib import BuildSpecs, CommonUtils, Buildable, Packages
# Parse the command line arguments we've been given
parser = argparse.ArgumentParser(description='Utility to determine which jobs need to be registered in Jenkins.')
parser.add_argument('--environment', type=str, required=True)
arguments = parser.parse_args()
# Initialise the dependnecy resolver
......@@ -64,12 +65,14 @@ for product in productHandler.knownProducts():
for platform in platformsToBuild:
jobEntry = {
'name': project.name,
'url': 'git://anongit.kde.org/' + project.name,
'product': product,
'repositoryUrl': 'git://anongit.kde.org/' + project.name,
'browserUrl': 'https://cgit.kde.org/' + project.name + '.git',
'branch': branchToBuild,
'branchGroup': branchGroup,
'platform': platform,
'description': project.description
'description': project.description,
'environment': arguments.environment
}
# Store it
......
......@@ -7,6 +7,7 @@ from helperslib import BuildSpecs, BuildSystem, CommonUtils, EnvironmentHandler,
# Parse the command line arguments we've been given
parser = argparse.ArgumentParser(description='Utility to generate dependency diagram information for use by api.kde.org.')
parser.add_argument('--product', type=str, required=True)
parser.add_argument('--project', type=str, required=True)
parser.add_argument('--branchGroup', type=str, required=True)
parser.add_argument('--usingInstall', type=str, required=True)
......@@ -22,7 +23,7 @@ sourcesLocation = os.getcwd()
# First determine where we the data will be stored, both temporarily and on the server
# As the API documentation can only be generated once, and we have the greatest capacity available for Linux we will use Linux dependency diagrams on api.kde.org.
outputDirectory = os.path.join( sourcesLocation, 'dotdata' )
remoteStoragePath = os.path.join('/home/api/depdiagram-output/', Packages.nameForProject(arguments.project, arguments.branchGroup))
remoteStoragePath = os.path.join('/home/api/depdiagram-output/', Packages.nameForProject(arguments.product, arguments.project, arguments.branchGroup))
# Build up the command to run
commandToRun = "python {0}/kapidox/src/depdiagram-prepare -s {1} {2}"
......
......@@ -6,7 +6,7 @@ from helperslib import CommonUtils
class Loader(object):
# Loads the Project's configuration, should it have one and merges it with the default configuration
def __init__(self, project, branchGroup):
def __init__(self, product, project, branchGroup):
# Start by copying the default settings
self.mergedConfig = self.defaultOptions()
......@@ -14,7 +14,7 @@ class Loader(object):
# Where should our configuration file be?
# It should be at /build-specs/<project>.yaml
# As the configuration location already contains /build-specs/ we just have to add on <project>.yaml
configFileLocation = os.path.join( CommonUtils.scriptsBaseDirectory(), 'build-specs', project + '.yaml' )
configFileLocation = os.path.join( CommonUtils.scriptsBaseDirectory(), 'build-specs', product, project + '.yaml' )
# Does the file exist?
# If it does not, then we don't need to do anything else
......
......@@ -8,8 +8,8 @@ import paramiko
import urllib, urllib.request
from helperslib import CommonUtils
def nameForProject( project, branchGroup ):
return "{0}-{1}".format( project, branchGroup )
def nameForProject( product, project, branchGroup ):
return "{0}-{1}".format( product, project, branchGroup )
class Archive(object):
# Sets up an archive for use, to allow for retrieving and uploading new resources to the archive
......
......@@ -7,6 +7,7 @@ from helperslib import BuildSpecs, BuildSystem, CommonUtils, EnvironmentHandler
# Parse the command line arguments we've been given
parser = argparse.ArgumentParser(description='Utility to install a project, diverting the installation for later capture if requested.')
parser.add_argument('--product', type=str, required=True)
parser.add_argument('--project', type=str, required=True)
parser.add_argument('--branchGroup', type=str, required=True)
parser.add_argument('--platform', type=str, required=True)
......@@ -15,7 +16,7 @@ parser.add_argument('--divertTo', type=str)
arguments = parser.parse_args()
# Load our build specification, which governs how we handle this build
buildSpecification = BuildSpecs.Loader( project=arguments.project, branchGroup=arguments.branchGroup )
buildSpecification = BuildSpecs.Loader( product=arguments.product, project=arguments.project, branchGroup=arguments.branchGroup )
# Determine the environment we need to provide for the installation process
buildEnvironment = EnvironmentHandler.generateFor( installPrefix=arguments.installTo )
......
......@@ -7,6 +7,7 @@ from helperslib import BuildSpecs, CommonUtils, Buildable, Packages
# Parse the command line arguments we've been given
parser = argparse.ArgumentParser(description='Utility to execute tests for a build.')
parser.add_argument('--product', type=str, required=True)
parser.add_argument('--project', type=str, required=True)
parser.add_argument('--branchGroup', type=str, required=True)
parser.add_argument('--platform', type=str, required=True)
......@@ -15,7 +16,7 @@ parser.add_argument('--installTo', type=str, required=True)
arguments = parser.parse_args()
# Load our build specification, which governs how we handle this build
buildSpecification = BuildSpecs.Loader( project=arguments.project, branchGroup=arguments.branchGroup )
buildSpecification = BuildSpecs.Loader( product=arguments.product, project=arguments.project, branchGroup=arguments.branchGroup )
# Initialise the dependnecy resolver
resolver = Buildable.DependencyResolver()
......
......@@ -7,6 +7,7 @@ from helperslib import BuildSpecs, CommonUtils, Buildable, Packages
# Parse the command line arguments we've been given
parser = argparse.ArgumentParser(description='Utility to execute tests for a build.')
parser.add_argument('--product', type=str, required=True)
parser.add_argument('--project', type=str, required=True)
parser.add_argument('--branchGroup', type=str, required=True)
parser.add_argument('--platform', type=str, required=True)
......@@ -15,7 +16,7 @@ parser.add_argument('--installTo', type=str, required=True)
arguments = parser.parse_args()
# Load our build specification, which governs how we handle this build
buildSpecification = BuildSpecs.Loader( project=arguments.project, branchGroup=arguments.branchGroup )
buildSpecification = BuildSpecs.Loader( product=arguments.product, project=arguments.project, branchGroup=arguments.branchGroup )
# Initialise the dependnecy resolver
resolver = Buildable.DependencyResolver()
......@@ -56,7 +57,7 @@ packageArchive = Packages.Archive( arguments.environment, arguments.platform )
# Go over all of our dependencies, and extract each one in turn into the install directory
for dependency in projectDependencies:
# Get the package name of this dependency
package = Packages.nameForProject( dependency.name, arguments.branchGroup )
package = Packages.nameForProject( arguments.product, dependency.name, arguments.branchGroup )
# For informative purposes
print("Retrieving: " + package)
......
......@@ -9,6 +9,7 @@ from helperslib import BuildSpecs, BuildSystem, CommonUtils, EnvironmentHandler
# Parse the command line arguments we've been given
parser = argparse.ArgumentParser(description='Utility to execute tests for a build.')
parser.add_argument('--product', type=str, required=True)
parser.add_argument('--project', type=str, required=True)
parser.add_argument('--branchGroup', type=str, required=True)
parser.add_argument('--platform', type=str, required=True)
......@@ -16,7 +17,7 @@ parser.add_argument('--usingInstall', type=str, required=True)
arguments = parser.parse_args()
# Load our build specification, which governs how we handle this build
buildSpecification = BuildSpecs.Loader( project=arguments.project, branchGroup=arguments.branchGroup )
buildSpecification = BuildSpecs.Loader( product=arguments.product, project=arguments.project, branchGroup=arguments.branchGroup )
# Determine the environment we need to provide for the installation process
buildEnvironment = EnvironmentHandler.generateFor( installPrefix=arguments.usingInstall )
......
......@@ -38,22 +38,6 @@ node( currentPlatform ) {
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
......@@ -61,26 +45,26 @@ node( currentPlatform ) {
// 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 ci-tooling/helpers/prepare-dependencies.py --project ${projectName} --branchGroup ${branchGroup} --environment production --platform FreeBSDQt5.7 --installTo '$WORKSPACE/install-prefix/'"
sh "python3 -u ci-tooling/helpers/prepare-dependencies.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --environment ${ciEnvironment} --platform ${currentPlatform} --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 "python3 ci-tooling/helpers/configure-build.py --project ${projectName} --branchGroup ${branchGroup} --platform FreeBSDQt5.7 --installTo '$WORKSPACE/install-prefix/'"
sh "python3 -u ci-tooling/helpers/configure-build.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --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 "python3 ci-tooling/helpers/compile-build.py --project ${projectName} --branchGroup ${branchGroup} --platform FreeBSDQt5.7 --usingInstall '$WORKSPACE/install-prefix/'"
sh "python3 -u ci-tooling/helpers/compile-build.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --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 "python3 ci-tooling/helpers/install-build.py --project ${projectName} --branchGroup ${branchGroup} --platform FreeBSDQt5.7 --installTo '$WORKSPACE/install-prefix/' --divertTo '$WORKSPACE/install-divert/'"
sh "python3 -u ci-tooling/helpers/install-build.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --installTo '$WORKSPACE/install-prefix/' --divertTo '$WORKSPACE/install-divert/'"
}
// Looks like it built okay - let's capture this for later use
......@@ -89,18 +73,14 @@ node( currentPlatform ) {
// 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 ci-tooling/helpers/capture-install.py --project ${projectName} --branchGroup ${branchGroup} --environment production --platform FreeBSDQt5.7 --divertedTo '$WORKSPACE/install-divert/' --installedTo '$WORKSPACE/install-prefix/'"
// Now we extract the CMake metadata and upload that to the appropriate hosts
//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/'"
sh "python3 -u ci-tooling/helpers/capture-install.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --environment ${ciEnvironment} --platform ${currentPlatform} --divertedTo '$WORKSPACE/install-divert/' --installedTo '$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 "python3 ci-tooling/helpers/run-tests.py --project ${projectName} --branchGroup ${branchGroup} --platform FreeBSDQt5.7 --usingInstall '$WORKSPACE/install-prefix/'"
sh "python3 -u ci-tooling/helpers/run-tests.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --usingInstall '$WORKSPACE/install-prefix/'"
// Collect our results
junit allowEmptyResults: true, testResults: 'JUnitTestResults.xml'
......
......@@ -38,22 +38,6 @@ node( currentPlatform ) {
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
......@@ -62,7 +46,7 @@ node( currentPlatform ) {
// 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
bat """
python ci-tooling/helpers/prepare-dependencies.py --project ${projectName} --branchGroup ${branchGroup} --environment production --platform WindowsQt5.7 --installTo "%WORKSPACE%/install-prefix/"
python -u ci-tooling/helpers/prepare-dependencies.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --environment ${ciEnvironment} --platform ${currentPlatform} --installTo "%WORKSPACE%/install-prefix/"
"""
}
......@@ -72,7 +56,7 @@ node( currentPlatform ) {
bat """
call "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
set PATH=C:/Qt/5.7/msvc2015_64/bin;%PATH%
python ci-tooling/helpers/configure-build.py --project ${projectName} --branchGroup ${branchGroup} --platform WindowsQt5.7 --installTo "%WORKSPACE%/install-prefix/"
python -u ci-tooling/helpers/configure-build.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --installTo "%WORKSPACE%/install-prefix/"
"""
}
......@@ -82,7 +66,7 @@ node( currentPlatform ) {
bat """
call "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
set PATH=C:/Qt/5.7/msvc2015_64/bin;%PATH%
python ci-tooling/helpers/compile-build.py --project ${projectName} --branchGroup ${branchGroup} --platform WindowsQt5.7 --usingInstall "%WORKSPACE%/install-prefix/"
python -u ci-tooling/helpers/compile-build.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --usingInstall "%WORKSPACE%/install-prefix/"
"""
}
......@@ -93,7 +77,7 @@ node( currentPlatform ) {
bat """
call "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
set PATH=C:/Qt/5.7/msvc2015_64/bin;%PATH%
python ci-tooling/helpers/install-build.py --project ${projectName} --branchGroup ${branchGroup} --platform WindowsQt5.7 --installTo "%WORKSPACE%/install-prefix/" --divertTo "%WORKSPACE%/install-divert/"
python -u ci-tooling/helpers/install-build.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --installTo "%WORKSPACE%/install-prefix/" --divertTo "%WORKSPACE%/install-divert/"
"""
}
......@@ -104,7 +88,7 @@ node( currentPlatform ) {
// 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
bat """
python ci-tooling/helpers/capture-install.py --project ${projectName} --branchGroup ${branchGroup} --environment production --platform WindowsQt5.7 --divertedTo "%WORKSPACE%/install-divert/\" --installedTo \"%WORKSPACE%/install-prefix/"
python -u ci-tooling/helpers/capture-install.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --environment ${ciEnvironment} --platform ${currentPlatform} --divertedTo "%WORKSPACE%/install-divert/" --installedTo "%WORKSPACE%/install-prefix/"
"""
}
......@@ -115,7 +99,7 @@ node( currentPlatform ) {
bat """
call "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
set PATH=C:/Qt/5.7/msvc2015_64/bin;%PATH%
python ci-tooling/helpers/run-tests.py --project ${projectName} --branchGroup ${branchGroup} --platform WindowsQt5.7 --usingInstall "%WORKSPACE%/install-prefix/"
python -u ci-tooling/helpers/run-tests.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} "%WORKSPACE%/install-prefix/"
"""
// Collect our results
......
......@@ -61,26 +61,26 @@ node( currentPlatform ) {
// 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 --project ${projectName} --branchGroup ${branchGroup} --environment production --platform XenialQt5.7 --installTo '$HOME/install-prefix/'"
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 --project ${projectName} --branchGroup ${branchGroup} --platform XenialQt5.7 --installTo '$HOME/install-prefix/'"
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 --project ${projectName} --branchGroup ${branchGroup} --platform XenialQt5.7 --usingInstall '$HOME/install-prefix/'"
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 --project ${projectName} --branchGroup ${branchGroup} --platform XenialQt5.7 --installTo '$HOME/install-prefix/' --divertTo '$WORKSPACE/install-divert/'"
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
......@@ -89,7 +89,7 @@ node( currentPlatform ) {
// 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 --project ${projectName} --branchGroup ${branchGroup} --environment production --platform XenialQt5.7 --divertedTo '$WORKSPACE/install-divert/' --installedTo '$HOME/install-prefix/'"
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 --project ${projectName} --branchGroup ${branchGroup} --usingInstall '$HOME/install-prefix/'"
......@@ -100,7 +100,7 @@ node( currentPlatform ) {
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 --project ${projectName} --branchGroup ${branchGroup} --platform XenialQt5.7 --usingInstall '$HOME/install-prefix/'"
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'
......
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