Commit befa223b authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Hace uso de plantillas CI

parent 39428a65
Loading
Loading
Loading
Loading
+9 −22
Original line number Diff line number Diff line
include:
  - project: 'redmic-project/gitlab-ci-templates'
    ref: master
    file: '/maven-building-library.yml'
  - project: 'redmic-project/gitlab-ci-templates'
    ref: master
    file: '/license-listing.yml'

stages:
  - build

maven-build:
  stage: build
  image: registry.gitlab.com/redmic-project/docker/maven
  variables:
    MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
  only:
    - branches
  cache:
    paths:
      - .m2/repository/
  script:
    - mvn deploy -B
    - "COVERAGE=$(xmllint --html --xpath '//table[@id=\"coveragetable\"]/tfoot//td[@class=\"ctr2\"][1]/text()' target/site/jacoco/index.html)"
    - 'echo "Coverage: $COVERAGE"'
  after_script:
    - rm -r .m2/repository/es
  artifacts:
    name: "$CI_PROJECT_NAME"
    expire_in: '6 months'
    paths:
      - target/*.jar
  - license-list