From 41fa073c748510fc69488255fd60d33b13321abd Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 16 Aug 2022 10:20:00 +0200 Subject: [PATCH] added test stage in jenkinsfile --- automation/Dockerfile | 4 ++++ automation/Jenkinsfile | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/automation/Dockerfile b/automation/Dockerfile index 3e84222..48fc510 100644 --- a/automation/Dockerfile +++ b/automation/Dockerfile @@ -7,4 +7,8 @@ RUN apt-get --yes upgrade # tzdata is a dependency, won't install otherwise ARG DEBIAN_FRONTEND=noninteractive +# set CROSS_CONTAINER_IN_CONTAINER to inform `cross` that it is executed from within a container +ENV CROSS_CONTAINER_IN_CONTAINER=true + RUN rustup component add rustfmt clippy +RUN cargo install cross diff --git a/automation/Jenkinsfile b/automation/Jenkinsfile index e3081b9..1d792b0 100644 --- a/automation/Jenkinsfile +++ b/automation/Jenkinsfile @@ -24,6 +24,17 @@ pipeline { sh 'cargo fmt' } } + stage('Test') { + agent { + dockerfile { + dir 'automation' + reuseNode true + } + } + steps { + sh 'cargo check' + } + } stage('Check') { agent { dockerfile {