diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..063ece3cd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM rust:latest + +RUN apt-get update && apt-get install -y clang libclang-dev cmake build-essential git unzip autoconf libtool + +RUN git clone https://github.com/google/protobuf.git && \ + cd protobuf && \ + ./autogen.sh && \ + ./configure && \ + make && \ + make install && \ + ldconfig && \ + make clean && \ + cd .. && \ + rm -r protobuf + + +RUN mkdir /cargocache && chmod -R ugo+rwX /cargocache diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..42755d5f7 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,20 @@ +pipeline { + agent { + dockerfile { + filename 'Dockerfile' + args '-v cargo-cache:/cargocache:rw -e "CARGO_HOME=/cargocache"' + } + } + stages { + stage('Build') { + steps { + sh 'cargo build' + } + } + stage('Test') { + steps { + sh 'cargo test --all' + } + } + } +}