diff --git a/Jenkinsfile b/Jenkinsfile index 19bc455a2..e5cd1cc5b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ pipeline{ agent none stages { - stage ('Master build') { + stage ('Early checks') { agent { node { label 'master' } } stages { stage ('Check for RFC/WIP builds') { @@ -18,54 +18,64 @@ pipeline{ cancelPreviousBuilds() } } - stage ('Checkout') { - steps { - checkout scm - } - } - stage ('Run Cargo tests') { - steps { - sh "scripts/dev_cli.sh tests --cargo" - } - } - stage ('Run unit tests') { - steps { - sh "scripts/dev_cli.sh tests --unit" - } - } - stage ('Run OpenAPI tests') { - steps { - sh "scripts/run_openapi_tests.sh" - } - } } } - stage ('Worker build') { - agent { node { label 'bionic' } } - options { - timeout(time: 1, unit: 'HOURS') - } - stages { - stage ('Checkout') { - steps { - checkout scm + stage ('Build') { + failFast true + parallel { + stage ('Master build') { + agent { node { label 'master' } } + stages { + stage ('Checkout') { + steps { + checkout scm + } + } + stage ('Run Cargo tests') { + steps { + sh "scripts/dev_cli.sh tests --cargo" + } + } + stage ('Run unit tests') { + steps { + sh "scripts/dev_cli.sh tests --unit" + } + } + stage ('Run OpenAPI tests') { + steps { + sh "scripts/run_openapi_tests.sh" + } + } } - } - stage ('Install system packages') { - steps { - sh "sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq build-essential mtools libssl-dev pkg-config" - sh "sudo apt-get install -yq flex bison libelf-dev qemu-utils qemu-system libglib2.0-dev libpixman-1-dev libseccomp-dev libcap-ng-dev socat" + } + stage ('Worker build') { + agent { node { label 'bionic' } } + options { + timeout(time: 1, unit: 'HOURS') } - } - stage ('Install Rust') { - steps { - sh "nohup curl https://sh.rustup.rs -sSf | sh -s -- -y" - } - } - stage ('Run integration tests') { - steps { - sh "sudo mount -t tmpfs tmpfs /tmp" - sh "scripts/run_integration_tests.sh" + stages { + stage ('Checkout') { + steps { + checkout scm + } + } + stage ('Install system packages') { + steps { + sh "sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq build-essential mtools libssl-dev pkg-config" + sh "sudo apt-get install -yq flex bison libelf-dev qemu-utils qemu-system libglib2.0-dev libpixman-1-dev libseccomp-dev libcap-ng-dev socat" + } + } + stage ('Install Rust') { + steps { + sh "nohup curl https://sh.rustup.rs -sSf | sh -s -- -y" + } + } + stage ('Run integration tests') { + steps { + sh "sudo mount -t tmpfs tmpfs /tmp" + sh "scripts/run_integration_tests.sh" + } + } } } } @@ -86,4 +96,4 @@ def cancelPreviousBuilds() { build.doStop() } } -} +} \ No newline at end of file