From 4a0b73becdec2368e9bbb80287bfdbe5999fe946 Mon Sep 17 00:00:00 2001 From: tillias Date: Wed, 28 Oct 2020 20:54:48 +0100 Subject: [PATCH 01/19] Add .circleci/config.yml --- .circleci/config.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..d7ef4b0 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,10 @@ +version: 2.1 + +orbs: + maven: circleci/maven@0.0.12 + +workflows: + maven_test: + jobs: + - maven/test # checkout, build, test, and upload test results + From 60a5f3a52a9912328a3dcf2669ee20d003477085 Mon Sep 17 00:00:00 2001 From: tillias Date: Wed, 28 Oct 2020 21:10:22 +0100 Subject: [PATCH 02/19] Playing with circle-ci --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d7ef4b0..5520bd9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,6 +3,10 @@ version: 2.1 orbs: maven: circleci/maven@0.0.12 +executors: + docker: + - image: cimg/openjdk:13.0 + workflows: maven_test: jobs: From 0628909646536ff9a0164d522a4a9d928be1d6e1 Mon Sep 17 00:00:00 2001 From: tillias Date: Wed, 28 Oct 2020 21:12:14 +0100 Subject: [PATCH 03/19] Playing with circle-ci --- .circleci/config.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5520bd9..27491f0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,9 +3,10 @@ version: 2.1 orbs: maven: circleci/maven@0.0.12 -executors: - docker: - - image: cimg/openjdk:13.0 +jobs: + build: + docker: + - image: cimg/openjdk:13.0 workflows: maven_test: From bf7430beeac042c2efc41c9a45af86ec85745401 Mon Sep 17 00:00:00 2001 From: tillias Date: Wed, 28 Oct 2020 21:29:52 +0100 Subject: [PATCH 04/19] Playing with circle-ci --- .circleci/config.yml | 77 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 66 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 27491f0..66d8207 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,15 +1,70 @@ version: 2.1 - -orbs: - maven: circleci/maven@0.0.12 - jobs: - build: - docker: - - image: cimg/openjdk:13.0 + build: + machine: + image: circleci/classic:201808-01 + steps: + - checkout + + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "pom.xml" }}-{{ checksum "package-lock.json" }} + # Perform a Partial Cache Restore (https://circleci.com/docs/2.0/caching/#restoring-cache) + - v1-dependencies- + - run: + name: Install OpenJDK 11 + command: | + sudo rm /var/lib/apt/lists/lock + sudo rm /var/cache/apt/archives/lock + sudo rm /var/lib/dpkg/lock + sudo apt install openjdk-11-jdk + echo 'export PATH="/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH"' >> $BASH_ENV + - run: + name: Setup NVM + command: | + echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV + echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV + - run: + name: Install Node 12.16.1 + command: | + nvm install 12.16.1 + nvm alias default 12.16.1 + - run: + name: Print Java Version + command: 'java -version' + - run: + name: Print Node Version + command: 'node -v' + - run: + name: Print NPM Version + command: 'npm -v' + - run: + name: Install Node Modules + command: 'npm install' -workflows: - maven_test: - jobs: - - maven/test # checkout, build, test, and upload test results + - save_cache: + paths: + - node + - node_modules + - ~/.m2 + key: v1-dependencies-{{ checksum "pom.xml" }}-{{ checksum "package-lock.json" }} + - run: + name: Give Executable Power + command: 'chmod +x mvnw' + - run: + name: Run Style Checks + command: './mvnw -ntp checkstyle:check' + - run: + name: Clean and Verify + command: './mvnw -ntp clean verify' + - run: + name: Run Front End Tests + command: npm run test + - run: + name: Verify with Prod Profile + command: './mvnw -ntp verify -Pprod -DskipTests' + # - run: + # name: Deploy to Heroku + # command: './mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy -DskipTests -Pprod -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog' From 0ec3f6b3c8735ca527b44427a65fc5504087815a Mon Sep 17 00:00:00 2001 From: tillias Date: Thu, 29 Oct 2020 05:22:48 +0100 Subject: [PATCH 05/19] Playing with circle-ci --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 66d8207..29226f9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 jobs: build: machine: - image: circleci/classic:201808-01 + image: cimg/openjdk:15.0 steps: - checkout From 4afbcbc12d0db0f9f4f2ad97878013fe003af6d9 Mon Sep 17 00:00:00 2001 From: tillias Date: Thu, 29 Oct 2020 05:25:51 +0100 Subject: [PATCH 06/19] Playing with circle-ci --- .circleci/config.yml | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 29226f9..c715b8e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 jobs: build: machine: - image: cimg/openjdk:15.0 + image: cimg/openjdk:11.0.8-node steps: - checkout @@ -12,24 +12,10 @@ jobs: - v1-dependencies-{{ checksum "pom.xml" }}-{{ checksum "package-lock.json" }} # Perform a Partial Cache Restore (https://circleci.com/docs/2.0/caching/#restoring-cache) - v1-dependencies- - - run: - name: Install OpenJDK 11 - command: | - sudo rm /var/lib/apt/lists/lock - sudo rm /var/cache/apt/archives/lock - sudo rm /var/lib/dpkg/lock - sudo apt install openjdk-11-jdk - echo 'export PATH="/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH"' >> $BASH_ENV - run: name: Setup NVM command: | echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV - echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV - - run: - name: Install Node 12.16.1 - command: | - nvm install 12.16.1 - nvm alias default 12.16.1 - run: name: Print Java Version command: 'java -version' From 1367db6aaf18740b4ba6c57238b6f62e6202fa46 Mon Sep 17 00:00:00 2001 From: tillias Date: Thu, 29 Oct 2020 05:28:02 +0100 Subject: [PATCH 07/19] Playing with circle-ci --- .circleci/config.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c715b8e..f77adf9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 jobs: build: machine: - image: cimg/openjdk:11.0.8-node + image: cimg/openjdk:15.0 steps: - checkout @@ -16,6 +16,12 @@ jobs: name: Setup NVM command: | echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV + echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV + - run: + name: Install Node 12.16.1 + command: | + nvm install 12.16.1 + nvm alias default 12.16.1 - run: name: Print Java Version command: 'java -version' From 9123053e47b4d0be582336e9d81812fbe374a4bc Mon Sep 17 00:00:00 2001 From: tillias Date: Thu, 29 Oct 2020 05:30:53 +0100 Subject: [PATCH 08/19] Playing with circle-ci --- .circleci/config.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f77adf9..8ee2dbe 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,8 +1,8 @@ version: 2.1 jobs: build: - machine: - image: cimg/openjdk:15.0 + docker: + image: cimg/openjdk:11.0.8-node steps: - checkout @@ -17,11 +17,6 @@ jobs: command: | echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV - - run: - name: Install Node 12.16.1 - command: | - nvm install 12.16.1 - nvm alias default 12.16.1 - run: name: Print Java Version command: 'java -version' @@ -57,6 +52,6 @@ jobs: - run: name: Verify with Prod Profile command: './mvnw -ntp verify -Pprod -DskipTests' - # - run: - # name: Deploy to Heroku - # command: './mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy -DskipTests -Pprod -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog' + - run: + name: Deploy to Heroku + command: './mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy -DskipTests -Pprod -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog' From c1a8a0a2e504c690e2e1b92ad679f597d47a4fb9 Mon Sep 17 00:00:00 2001 From: tillias Date: Thu, 29 Oct 2020 05:32:24 +0100 Subject: [PATCH 09/19] Playing with circle-ci --- .circleci/config.yml | 104 +++++++++++++++++++++---------------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8ee2dbe..c827f82 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,57 +1,57 @@ version: 2.1 jobs: - build: - docker: - image: cimg/openjdk:11.0.8-node - steps: - - checkout + build: + docker: + - image: cimg/openjdk:11.0.8-node + steps: + - checkout - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "pom.xml" }}-{{ checksum "package-lock.json" }} - # Perform a Partial Cache Restore (https://circleci.com/docs/2.0/caching/#restoring-cache) - - v1-dependencies- - - run: - name: Setup NVM - command: | - echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV - echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV - - run: - name: Print Java Version - command: 'java -version' - - run: - name: Print Node Version - command: 'node -v' - - run: - name: Print NPM Version - command: 'npm -v' - - run: - name: Install Node Modules - command: 'npm install' + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "pom.xml" }}-{{ checksum "package-lock.json" }} + # Perform a Partial Cache Restore (https://circleci.com/docs/2.0/caching/#restoring-cache) + - v1-dependencies- + - run: + name: Setup NVM + command: | + echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV + echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV + - run: + name: Print Java Version + command: 'java -version' + - run: + name: Print Node Version + command: 'node -v' + - run: + name: Print NPM Version + command: 'npm -v' + - run: + name: Install Node Modules + command: 'npm install' - - save_cache: - paths: - - node - - node_modules - - ~/.m2 - key: v1-dependencies-{{ checksum "pom.xml" }}-{{ checksum "package-lock.json" }} + - save_cache: + paths: + - node + - node_modules + - ~/.m2 + key: v1-dependencies-{{ checksum "pom.xml" }}-{{ checksum "package-lock.json" }} - - run: - name: Give Executable Power - command: 'chmod +x mvnw' - - run: - name: Run Style Checks - command: './mvnw -ntp checkstyle:check' - - run: - name: Clean and Verify - command: './mvnw -ntp clean verify' - - run: - name: Run Front End Tests - command: npm run test - - run: - name: Verify with Prod Profile - command: './mvnw -ntp verify -Pprod -DskipTests' - - run: - name: Deploy to Heroku - command: './mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy -DskipTests -Pprod -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog' + - run: + name: Give Executable Power + command: 'chmod +x mvnw' + - run: + name: Run Style Checks + command: './mvnw -ntp checkstyle:check' + - run: + name: Clean and Verify + command: './mvnw -ntp clean verify' + - run: + name: Run Front End Tests + command: npm run test + - run: + name: Verify with Prod Profile + command: './mvnw -ntp verify -Pprod -DskipTests' + - run: + name: Deploy to Heroku + command: './mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy -DskipTests -Pprod -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog' From 48dce0ec3a96b3057727612e3516a3a82a4cd6c9 Mon Sep 17 00:00:00 2001 From: tillias Date: Thu, 29 Oct 2020 06:11:00 +0100 Subject: [PATCH 10/19] Playing with circle-ci --- .circleci/config.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c827f82..96b3ab4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,6 +52,10 @@ jobs: - run: name: Verify with Prod Profile command: './mvnw -ntp verify -Pprod -DskipTests' - - run: - name: Deploy to Heroku - command: './mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy -DskipTests -Pprod -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog' +# - run: +# name: Deploy to Heroku +# command: './mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy -DskipTests -Pprod -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog' +workflows: + build: + jobs: + - build From 274eb371bdf88e8752a1495904fedd04c73fa9d2 Mon Sep 17 00:00:00 2001 From: tillias Date: Thu, 29 Oct 2020 06:28:09 +0100 Subject: [PATCH 11/19] Playing with circle-ci --- .circleci/config.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 96b3ab4..834fc52 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,6 +52,17 @@ jobs: - run: name: Verify with Prod Profile command: './mvnw -ntp verify -Pprod -DskipTests' + - when: + condition: + - equal: [ master, << pipeline.git.branch >> ] + steps: + - run: echo "This is condition in master" + - when: + condition: + - equal: [ circleci-project-setup, << pipeline.git.branch >> ] + steps: + - run: echo "This is condition in circleci-project-setup branch" + # - run: # name: Deploy to Heroku # command: './mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy -DskipTests -Pprod -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog' From df2d09c0eb1a867231fe461feb1251c2ea25df08 Mon Sep 17 00:00:00 2001 From: tillias Date: Thu, 29 Oct 2020 06:35:09 +0100 Subject: [PATCH 12/19] Playing with circle-ci --- .circleci/config.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 834fc52..5202fff 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -57,11 +57,10 @@ jobs: - equal: [ master, << pipeline.git.branch >> ] steps: - run: echo "This is condition in master" - - when: - condition: - - equal: [ circleci-project-setup, << pipeline.git.branch >> ] - steps: - - run: echo "This is condition in circleci-project-setup branch" + + test-branch: + steps: + - run: echo "This is condition in circleci-project-setup" # - run: # name: Deploy to Heroku @@ -70,3 +69,7 @@ workflows: build: jobs: - build + - test-branch: + - when: + condition: + - equal: [ circleci-project-setup, << pipeline.git.branch >> ] From 73223b161e1d26f341b8446250820d883c7f8214 Mon Sep 17 00:00:00 2001 From: tillias Date: Thu, 29 Oct 2020 06:41:17 +0100 Subject: [PATCH 13/19] Playing with circle-ci --- .circleci/config.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5202fff..4df77b4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,14 +54,10 @@ jobs: command: './mvnw -ntp verify -Pprod -DskipTests' - when: condition: - - equal: [ master, << pipeline.git.branch >> ] + - equal: [ circleci-project-setup, << pipeline.git.branch >> ] steps: - run: echo "This is condition in master" - test-branch: - steps: - - run: echo "This is condition in circleci-project-setup" - # - run: # name: Deploy to Heroku # command: './mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy -DskipTests -Pprod -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog' @@ -69,7 +65,3 @@ workflows: build: jobs: - build - - test-branch: - - when: - condition: - - equal: [ circleci-project-setup, << pipeline.git.branch >> ] From faebf9104b8530048066d7328f378cca310283ad Mon Sep 17 00:00:00 2001 From: tillias Date: Thu, 29 Oct 2020 06:42:40 +0100 Subject: [PATCH 14/19] Playing with circle-ci --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4df77b4..6e7535f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,9 +54,9 @@ jobs: command: './mvnw -ntp verify -Pprod -DskipTests' - when: condition: - - equal: [ circleci-project-setup, << pipeline.git.branch >> ] + equal: [ circleci-project-setup, << pipeline.git.branch >> ] steps: - - run: echo "This is condition in master" + - run: echo "This is condition in branch" # - run: # name: Deploy to Heroku From 571ecc96fd5a57f3cff16157589938a433e8acca Mon Sep 17 00:00:00 2001 From: tillias Date: Thu, 29 Oct 2020 06:50:14 +0100 Subject: [PATCH 15/19] Playing with circle-ci --- .circleci/config.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6e7535f..207af94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,6 +4,16 @@ jobs: docker: - image: cimg/openjdk:11.0.8-node steps: + - when: + condition: + equal: [ circleci-project-setup, << pipeline.git.branch >> ] + steps: + - run: echo "This is condition in branch" + - when: + condition: + equal: [ master, << pipeline.git.branch >> ] + steps: + - run: echo "This is condition in master" - checkout # Download and cache dependencies @@ -52,11 +62,6 @@ jobs: - run: name: Verify with Prod Profile command: './mvnw -ntp verify -Pprod -DskipTests' - - when: - condition: - equal: [ circleci-project-setup, << pipeline.git.branch >> ] - steps: - - run: echo "This is condition in branch" # - run: # name: Deploy to Heroku From 0ef91472d587e1f0f61d97671721e933e93a94c1 Mon Sep 17 00:00:00 2001 From: tillias Date: Thu, 29 Oct 2020 07:08:57 +0100 Subject: [PATCH 16/19] Playing with circle-ci --- .circleci/config.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 207af94..34a7585 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,16 +4,6 @@ jobs: docker: - image: cimg/openjdk:11.0.8-node steps: - - when: - condition: - equal: [ circleci-project-setup, << pipeline.git.branch >> ] - steps: - - run: echo "This is condition in branch" - - when: - condition: - equal: [ master, << pipeline.git.branch >> ] - steps: - - run: echo "This is condition in master" - checkout # Download and cache dependencies @@ -62,10 +52,18 @@ jobs: - run: name: Verify with Prod Profile command: './mvnw -ntp verify -Pprod -DskipTests' - -# - run: -# name: Deploy to Heroku -# command: './mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy -DskipTests -Pprod -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog' + - when: + condition: + equal: [ circleci-project-setup, << pipeline.git.branch >> ] + steps: + - run: + name: Deploy to Heroku + command: './mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy -DskipTests -Pprod -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog' + - when: + condition: + equal: [ master, << pipeline.git.branch >> ] + steps: + - run: echo "This is condition in master" workflows: build: jobs: From cf20bd9621722d8af6bf146fe59de60089c848f7 Mon Sep 17 00:00:00 2001 From: tillias Date: Thu, 29 Oct 2020 07:10:00 +0100 Subject: [PATCH 17/19] Playing with circle-ci --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 34a7585..b6620de 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,7 +58,7 @@ jobs: steps: - run: name: Deploy to Heroku - command: './mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy -DskipTests -Pprod -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog' + command: './mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy -DskipTests -Pprod -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog' - when: condition: equal: [ master, << pipeline.git.branch >> ] From 45ced6c4474a1a65b0a1d18e330cc529a2fac2f0 Mon Sep 17 00:00:00 2001 From: tillias Date: Thu, 29 Oct 2020 18:20:17 +0100 Subject: [PATCH 18/19] Checking Sonar Cloud integration --- .circleci/config.yml | 11 +++++------ sonar-project.properties | 3 ++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b6620de..487cb7a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,21 +49,20 @@ jobs: - run: name: Run Front End Tests command: npm run test + - run: + name: Sonar + command: './mvnw -ntp verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar' - run: name: Verify with Prod Profile command: './mvnw -ntp verify -Pprod -DskipTests' + - when: condition: - equal: [ circleci-project-setup, << pipeline.git.branch >> ] + equal: [ master, << pipeline.git.branch >> ] steps: - run: name: Deploy to Heroku command: './mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy -DskipTests -Pprod -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog' - - when: - condition: - equal: [ master, << pipeline.git.branch >> ] - steps: - - run: echo "This is condition in master" workflows: build: jobs: diff --git a/sonar-project.properties b/sonar-project.properties index a2cabc4..9bc306b 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,9 +1,10 @@ sonar.projectKey=microcatalog sonar.projectName=microcatalog +sonar.organization=tillias-github sonar.projectVersion=1.0 sonar.sources=src/main/ -sonar.host.url=http://localhost:9001 +sonar.host.url=https://sonarcloud.io sonar.tests=src/test/ sonar.coverage.jacoco.xmlReportPaths=target/jacoco/test/jacoco.xml,target/jacoco/integrationTest/jacoco.xml From 012d6c178f6e3affd853a1d1082ee9879a301d6f Mon Sep 17 00:00:00 2001 From: tillias Date: Thu, 29 Oct 2020 18:35:53 +0100 Subject: [PATCH 19/19] Migrate to circle-ci #74 --- .circleci/config.yml | 2 +- README.md | 2 +- src/main/resources/config/application-postgres.yml | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 487cb7a..4446e9a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -51,7 +51,7 @@ jobs: command: npm run test - run: name: Sonar - command: './mvnw -ntp verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar' + command: './mvnw -ntp org.sonarsource.scanner.maven:sonar-maven-plugin:sonar' - run: name: Verify with Prod Profile command: './mvnw -ntp verify -Pprod -DskipTests' diff --git a/README.md b/README.md index 9932992..19dd5bb 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![Join the chat at https://gitter.im/microservice-catalog/community](https://badges.gitter.im/microservice-catalog/community.svg)](https://gitter.im/microservice-catalog/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Build Status](https://travis-ci.org/tillias/microservice-catalog.svg?branch=master)](https://travis-ci.org/tillias/microservice-catalog) +[![CircleCI](https://circleci.com/gh/tillias/microservice-catalog.svg?style=shield)](https://circleci.com/gh/circleci/circleci-docs) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=microcatalog&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=microcatalog) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=microcatalog&metric=coverage)](https://sonarcloud.io/dashboard?id=microcatalog) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=microcatalog&metric=alert_status)](https://sonarcloud.io/dashboard?id=microcatalog) diff --git a/src/main/resources/config/application-postgres.yml b/src/main/resources/config/application-postgres.yml index ff431a6..f7a4a87 100644 --- a/src/main/resources/config/application-postgres.yml +++ b/src/main/resources/config/application-postgres.yml @@ -1,5 +1,5 @@ # =================================================================== -# Spring Boot configuration for the "heroku" profile. +# Spring Boot configuration for the "postgres" profile. # # This configuration overrides the application.yml file. # =================================================================== @@ -11,6 +11,10 @@ # =================================================================== spring: + profiles: + active: dev + include: + - swagger liquibase: enabled: true datasource: