From 6e6eb5b55e96068a1db22e7f0108be010c861695 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Fri, 7 Feb 2020 16:19:21 +0000 Subject: [PATCH] build: Do cargo tests, unit tests and OpenAPI check on master Rather than on the CI nodes. Signed-off-by: Rob Bradford --- Jenkinsfile | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ae6822bb3..19bc455a2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,6 +18,26 @@ 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') { @@ -35,7 +55,6 @@ pipeline{ 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" - sh "sudo snap install docker" } } stage ('Install Rust') { @@ -43,25 +62,10 @@ pipeline{ sh "nohup curl https://sh.rustup.rs -sSf | sh -s -- -y" } } - stage ('Run Cargo tests') { - steps { - sh "scripts/run_cargo_tests.sh" - } - } - stage ('Run OpenAPI tests') { - steps { - sh "scripts/run_openapi_tests.sh" - } - } - stage ('Run unit tests') { - steps { - sh "scripts/run_unit_tests.sh" - } - } stage ('Run integration tests') { steps { sh "sudo mount -t tmpfs tmpfs /tmp" - sh "scripts/run_integration_tests.sh" + sh "scripts/run_integration_tests.sh" } } }