From fbc8f11d01a24fd3f3ef301f06f5eaca0fbdc11d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 5 Aug 2022 00:44:41 +0200 Subject: [PATCH] add automation files --- automation/Dockerfile | 10 ++++++++++ automation/Jenkinsfile | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 automation/Dockerfile create mode 100644 automation/Jenkinsfile diff --git a/automation/Dockerfile b/automation/Dockerfile new file mode 100644 index 0000000..3e84222 --- /dev/null +++ b/automation/Dockerfile @@ -0,0 +1,10 @@ +# Run the following commands from root directory to build and run locally +# docker build -f automation/Dockerfile -t . +# docker run -it +FROM rust:latest +RUN apt-get update +RUN apt-get --yes upgrade +# tzdata is a dependency, won't install otherwise +ARG DEBIAN_FRONTEND=noninteractive + +RUN rustup component add rustfmt clippy diff --git a/automation/Jenkinsfile b/automation/Jenkinsfile new file mode 100644 index 0000000..e3081b9 --- /dev/null +++ b/automation/Jenkinsfile @@ -0,0 +1,39 @@ +pipeline { + agent any + + stages { + stage('Clippy') { + agent { + dockerfile { + dir 'automation' + reuseNode true + } + } + steps { + sh 'cargo clippy' + } + } + stage('Rustfmt') { + agent { + dockerfile { + dir 'automation' + reuseNode true + } + } + steps { + sh 'cargo fmt' + } + } + stage('Check') { + agent { + dockerfile { + dir 'automation' + reuseNode true + } + } + steps { + sh 'cargo check' + } + } + } +}