diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0ef78a9a079c44441bc8e5bc64f7576fc8d3b0f5..6f36ee91f2a6fb32b1dc0cddb48d08d610a617f7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,3 +8,4 @@ include: - local: "/string-calculator/.gitlab-ci.yml" - local: "/gilded-rose/.gitlab-ci.yml" - local: "/ugly-trivia/.gitlab-ci.yml" + - local: "/borestop/.gitlab-ci.yml" diff --git a/.gitlab-common-ci.yml b/.gitlab-common-ci.yml index 3715f7da6fc710ae92a350a7ab4949ab5c8aab18..a4eeeda4e689c8e202315efe3b3716c78880755e 100644 --- a/.gitlab-common-ci.yml +++ b/.gitlab-common-ci.yml @@ -18,7 +18,6 @@ cache: - cd $PROJECT_FOLDER script: - mvn $MAVEN_CLI_OPTS clean package - - cat target/site/jacoco/index.html - awk -F"," '{ branches += $6 + $7; covered += $7 } END { print covered, "/", branches, "branches covered"; print 100*covered/branches, "%covered" }' target/site/jacoco/jacoco.csv artifacts: reports: @@ -28,3 +27,22 @@ cache: name: "$PROJECT_FOLDER-report" expire_in: 1 day coverage: "/([^%]+) %covered/" + +.jhipster: + stage: build + services: + - docker:19.03.8-dind + tags: + - docker + before_script: + - cd $PROJECT_FOLDER + script: + - ./mvnw -B -Pprod,swagger verify + - awk -F"," '{ branches += $6 + $7; covered += $7 } END { print covered, "/", branches, "branches covered"; print 100*covered/branches, "%covered" }' target/jacoco-aggregate/index.csv + artifacts: + reports: + junit: $PROJECT_FOLDER/target/test-results/TEST-*.xml + paths: + - $PROJECT_FOLDER/target/jacoco-aggregate + expire_in: 1 day + coverage: "/([^%]+) %covered/" diff --git a/borestop/.gitlab-ci.yml b/borestop/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..9ccdfe506c295b38a16baf01973f7a55a07bdc0b --- /dev/null +++ b/borestop/.gitlab-ci.yml @@ -0,0 +1,11 @@ +package-word-wrap: + variables: + PROJECT_FOLDER: 'word-wrap' + extends: .jhipster + only: + refs: + - master + - merge_requests + changes: + - '.gitlab-common-ci.yml' + - 'borestop/**/*'