From 54997d39e928e9c05e14f0b4a27acfebc939c40b Mon Sep 17 00:00:00 2001 From: LOOHP Date: Sat, 8 Aug 2020 19:19:33 +0800 Subject: [PATCH] Create config.yml --- .circleci/config.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..9e0d6ea --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,30 @@ +version: 2 # use CircleCI 2.0 +jobs: # a collection of steps + build: # runs not using Workflows must have a `build` job as entry point + + working_directory: ~/circleci-demo-java-spring # directory where steps will run + + docker: # run the steps with Docker + - image: circleci/openjdk:8-jdk-stretch # ...with this image as the primary container; this is where all `steps` will run + + steps: # a collection of executable commands + + - checkout # check out source code to working directory + + - restore_cache: # restore the saved cache after the first run or if `pom.xml` has changed + # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ + key: circleci-demo-java-spring-{{ checksum "pom.xml" }} + + - run: mvn dependency:go-offline # gets the project dependencies + + - save_cache: # saves the project dependencies + paths: + - ~/.m2 + key: circleci-demo-java-spring-{{ checksum "pom.xml" }} + + - run: mvn install + + - store_artifacts: # store the uberjar as an artifact + # Upload test summary for display in Artifacts: https://circleci.com/docs/2.0/artifacts/ + path: target/Limbo.jar + # See https://circleci.com/docs/2.0/deployment-integrations/ for deploy examples \ No newline at end of file