Commit 2e918b33 authored by Ben Cooksley's avatar Ben Cooksley

Update the Pipeline to match the scripts

parent bf7c78b3
......@@ -9,7 +9,7 @@ parser = argparse.ArgumentParser(description='Utility to install a project, dive
parser.add_argument('--project', type=str, required=True)
parser.add_argument('--branchGroup', type=str, required=True)
parser.add_argument('--platform', type=str, required=True)
parser.add_argument('--usingInstall', type=str, required=True)
parser.add_argument('--installTo', type=str, required=True)
parser.add_argument('--divertTo', type=str)
arguments = parser.parse_args()
......@@ -17,7 +17,7 @@ arguments = parser.parse_args()
buildSpecification = BuildSpecs.Loader( project=arguments.project, branchGroup=arguments.branchGroup )
# Determine the environment we need to provide for the installation process
buildEnvironment = EnvironmentHandler.generateFor( installPrefix=arguments.usingInstall )
buildEnvironment = EnvironmentHandler.generateFor( installPrefix=arguments.installTo )
# Determine where our source code is checked out to and where we will be building it
# We'll assume that the directory we're running from is where the sources are located
......
......@@ -61,7 +61,7 @@ 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 --platform XenialQt5.7 --installTo $WORKSPACE/install-prefix/'
sh 'python 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
......@@ -73,14 +73,14 @@ node('LABEL HERE') {
// 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'
sh 'python ci-tooling/helpers/compile-build.py --project projectName --branchGroup branchGroup --platform XenialQt5.7 --installTo $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 --divertTo $WORKSPACE/install-divert/'
sh 'python 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,17 +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 --platform XenialQt5.7 --divertedTo $WORKSPACE/install-divert/ --installTo $WORKSPACE/install-prefix/'
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/'
// Now we extract the CMake metadata and upload that to the appropriate hosts
sh 'python ci-tooling/helpers/extract-cmake-metadata.py --project projectName --branchGroup branchGroup --platform XenialQt5.7'
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/'
}
// 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'
sh 'python 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'
......
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