From c5ddb6064830eaab48534bed4d9b295ebe189056 Mon Sep 17 00:00:00 2001 From: schaeff Date: Thu, 22 Nov 2018 23:31:07 +0100 Subject: [PATCH] make circle stricter, remove jenkins --- .circleci/config.yml | 6 +-- Jenkinsfile | 118 ------------------------------------------- 2 files changed, 3 insertions(+), 121 deletions(-) delete mode 100644 Jenkinsfile diff --git a/.circleci/config.yml b/.circleci/config.yml index 862096b8..c201e284 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,13 +23,13 @@ jobs: command: LIBSNARK_SOURCE_PATH=$HOME/libsnark ./build_libsnark.sh - run: name: Build - command: WITH_LIBSNARK=1 LIBSNARK_SOURCE_PATH=$HOME/libsnark ./build.sh + command: LIBSNARK_SOURCE_PATH=$HOME/libsnark RUSTFLAGS="-D warnings" ./build.sh - run: name: Run tests - command: LIBSNARK_SOURCE_PATH=$HOME/libsnark cargo test --release + command: LIBSNARK_SOURCE_PATH=$HOME/libsnark RUSTFLAGS="-D warnings" cargo test --release - run: name: Run integration tests - command: LIBSNARK_SOURCE_PATH=$HOME/libsnark cargo test --release -- --ignored + command: LIBSNARK_SOURCE_PATH=$HOME/libsnark RUSTFLAGS="-D warnings" cargo test --release -- --ignored - save_cache: paths: - /usr/local/cargo/registry diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 0ea422f4..00000000 --- a/Jenkinsfile +++ /dev/null @@ -1,118 +0,0 @@ -#!/usr/bin/env groovy - -def majorVersion -def minorVersion -def patchVersion -def testImage -def prodImage - -pipeline { - agent any - options { - skipStagesAfterUnstable() - timeout(time: 2, unit: 'HOURS') - timestamps() - buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10')) - } - stages { - stage('Init') { - steps { - script { - def gitCommitHash = sh(returnStdout: true, script: 'git rev-parse HEAD').trim().take(7) - currentBuild.displayName = "#${BUILD_ID}-${gitCommitHash}" - - patchVersion = sh(returnStdout: true, script: 'cat zokrates_cli/Cargo.toml | grep version | awk \'{print $3}\' | sed -e \'s/"//g\'').trim() - echo "ZoKrates patch version: ${patchVersion}" - def (major, minor, patch) = patchVersion.tokenize( '.' ) - minorVersion = "${major}.${minor}" - majorVersion = major - echo "ZoKrates minor version: ${minorVersion}" - echo "ZoKrates major version: ${majorVersion}" - } - } - } - stage('Format') { - agent { - docker { - image 'rustlang/rust:nightly' - } - } - steps { - script { - sh "rustup component add rustfmt-preview" - sh "cargo fmt --all -- --check" - } - } - } - stage('Build') { - steps { - script { - ansiColor('xterm') { - def testDockerfile = 'dev.Dockerfile' - testImage = docker.build("zokrates/dev", "-f ${testDockerfile} .") - testImage.inside { - sh 'RUSTFLAGS="-D warnings" ./build.sh' - } - } - } - } - } - - stage('Test') { - steps { - script { - ansiColor('xterm') { - testImage.inside { - sh 'RUSTFLAGS="-D warnings" ./test.sh' - } - } - } - } - } - - stage('Integration Test') { - when { - expression { env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'develop' } - } - steps { - script { - ansiColor('xterm') { - testImage.inside { - sh 'RUSTFLAGS="-D warnings" ./full_test.sh' - } - } - } - } - } - - stage('Docker Build & Push') { - when { - expression { env.BRANCH_NAME == 'master' } - } - steps { - script { - ansiColor('xterm') { - // prodImage = docker.build("zokrates/zokrates") - // docker.withRegistry('https://registry.hub.docker.com', 'dockerhub-kyroy') { - // prodImage.push(patchVersion) - // prodImage.push(minorVersion) - // if (majorVersion > '0') { - // prodImage.push(majorVersion) - // } - // prodImage.push("latest") - // } - } - } - } - } - } - post { - always { - // junit allowEmptyResults: true, testResults: '*test.xml' - deleteDir() - } - changed { - notifyStatusChange notificationRecipients: 'mail@kyroy.com', componentName: 'ZoKrates' - } - } -}