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

Hace uso de plantillas CI

parent f5fd06cf
Loading
Loading
Loading
Loading
+9 −24
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:latest
  variables:
    MAVEN_OPTS: -Dmaven.repo.local=.m2/repository
  only:
    - branches
  except:
    - master
  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