From 325df0bd3b2553bc4398b0531c3d5783b3dd16d4 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 15 Sep 2018 14:00:07 +0200 Subject: [PATCH] Update circle ci --- .circleci/circle.yml | 18 ------------- .circleci/config.yml | 60 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 18 deletions(-) delete mode 100644 .circleci/circle.yml create mode 100644 .circleci/config.yml diff --git a/.circleci/circle.yml b/.circleci/circle.yml deleted file mode 100644 index 7839f96..0000000 --- a/.circleci/circle.yml +++ /dev/null @@ -1,18 +0,0 @@ -machine: - java: - version: oraclejdk8 - -compile: - override: - - mvn package -Dci-build=true - -general: - artifacts: - - "ci" - -deployment: - nightlies: - branch: master - commands: - - go get github.com/tcnksm/ghr - - ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME -prerelease -b 'Nightly release - Use caution! We recommend downloading a stable release from the README.' `echo "v0.1-nightly-$(git rev-parse --short=7 HEAD)"` ci/ diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..54ce05d --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,60 @@ +# Java Maven CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-java/ for more details +# +version: 2 +jobs: + build: + docker: + # specify the version you desire here + - image: circleci/openjdk:8-jdk + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + # - image: circleci/postgres:9.4 + + working_directory: ~/repo + + environment: + # Customize the JVM maximum heap limit + MAVEN_OPTS: -Xmx3200m + + steps: + - checkout + + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "pom.xml" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + + - run: + command: | + mvn dependency:go-offline + sudo apt-get update + sudo apt-get -y upgrade + wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz + sudo tar -xvf go1.10.linux-amd64.tar.gz + sudo mv go /usr/local + + - save_cache: + paths: + - ~/.m2 + key: v1-dependencies-{{ checksum "pom.xml" }} + + - run: mvn package -Dci-build=true + + - deploy: + name: Deploy + command: | + mkdir ~/go + export GOPATH=~/go + export GOROOT=/usr/local/go + export PATH=$GOPATH/bin:$GOROOT/bin:$PATH + go get github.com/tcnksm/ghr + ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME -prerelease -b 'Nightly release - Use caution!' `echo "v0.0.1-nightly-$(git rev-parse --short=7 HEAD)"` ci/ + + - store_artifacts: + path: ci/ \ No newline at end of file