From 95f98e9aaa5257b671c53f2dafa881ef8bd0c789 Mon Sep 17 00:00:00 2001 From: Jeroen Laverman Date: Mon, 30 Jul 2018 13:35:50 +0200 Subject: [PATCH] Add CircleCi 2.0 config file #663 (#714) * Add CircleCi 2.0 config file Signed-off-by: Jeroen Laverman * Fix JVM options and use Maven batch-mode to reduce output Signed-off-by: Jeroen Laverman * Add RabbitMQ Signed-off-by: Jeroen Laverman * Store test-dependencies also in cache Signed-off-by: Jeroen Laverman * remove old cricleCi config Signed-off-by: Jeroen Laverman * remove redundant comments Signed-off-by: Jeroen Laverman * Add line break Signed-off-by: Jeroen Laverman --- .circleci/config.yml | 60 ++++++++++++++++++++++++++++++++++++++++++++ circle.yml | 37 --------------------------- 2 files changed, 60 insertions(+), 37 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 circle.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..8593b31b7 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,60 @@ +# +# Copyright (c) 2018 Bosch Software Innovations GmbH and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# + +version: 2 +jobs: + build: + + working_directory: ~/hawkBit + + docker: + - image: circleci/openjdk:8-jdk-browsers + environment: + _JAVA_OPTIONS: "-Xms512m -Xmx1024m" + + - image: rabbitmq:3-management + environment: + RABBITMQ_DEFAULT_VHOST: "/" + + steps: + + - checkout + + - restore_cache: + key: circleci-hawkbit-{{ checksum "pom.xml" }} + + # Install dependencies + - run: + name: Install without testing + command: mvn install --batch-mode -DskipTests + + # Run tests + - run: + name: Test incl. license verification + command: mvn verify license:check --batch-mode + + # Record test results + - run: mkdir -p testresults/junit/ + - run: find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} testresults/junit/ \; + + - store_test_results: + path: testresults/junit/ + + - store_artifacts: + path: pom.xml + + - save_cache: + paths: + - ~/.m2 + key: circleci-hawkbit-{{ checksum "pom.xml" }} + +notify: + webhooks: + # gitter hook + - url: https://webhooks.gitter.im/e/a20a6bc2bda5a8a77d39 diff --git a/circle.yml b/circle.yml deleted file mode 100644 index fba76a37d..000000000 --- a/circle.yml +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright (c) 2015 Bosch Software Innovations GmbH and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# - -machine: - java: - version: oraclejdk8 - services: - - rabbitmq-server - environment: - _JAVA_OPTIONS: "-Xms512m -Xmx1024m" - pre: - - sudo rabbitmq-plugins enable rabbitmq_management - -dependencies: - override: - - mvn install -DskipTests - -test: - override: - - mvn verify license:check - post: - - mkdir -p $CIRCLE_TEST_REPORTS/junit/ - - find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \; -general: - artifacts: - - "*.jar" - - "pom.xml" -notify: - webhooks: - # gitter hook - - url: https://webhooks.gitter.im/e/a20a6bc2bda5a8a77d39