# .travis.yml
# Travis-CI configuration file

sudo: required

addons:
  # SonarCloud integration
  sonarcloud:
    organization: "haf-tech-github"
    token:
      secure: ${SQ_TOKEN}

language: java
jdk:
  - oraclejdk8


before_install:
 - mkdir -p output

# Build and generate documentation, including code coverage
script:
 # general build
 - cd blueprint-parent && mvn -B -V clean install
 # generate documentation
 - mvn -B -V generate-resources -Pdocumentation
 # prepare the docs to output
 - cp -R target/generated-docs/*/html/* ../output
 # test coverage
 - mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar

# Push the generated HTML docu to GitHub pages
after_success:
 - cd ../output ; rm -R .asciidoctor
 - git init
 - git config user.name "${GH_USER_NAME}"
 - git config user.email "{GH_USER_EMAIL}"
 - git add . ; git commit -m "Deploy to GitHub Pages - ${TRAVIS_COMMIT_RANGE}"
 - git push --force "https://${GH_TOKEN}@${GH_REF}" master:gh-pages


# .travis.yml
# Travis-CI configuration file

sudo: required

addons:
  # SonarCloud integration
  sonarcloud:
    organization: "haf-tech-github"
    token:
      secure: ${SQ_TOKEN}

language: java
jdk:
  - oraclejdk8


before_install:
 - mkdir -p output

# Build and generate documentation, including code coverage
script:
 # general build
 - cd blueprint-parent && mvn -B -V clean install
 # generate documentation
 - mvn -B -V generate-resources -Pdocumentation
 # prepare the docs to output
 - cp -R target/generated-docs/*/html/* ../output
 # test coverage
 - mvn org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar

# Push the generated HTML docu to GitHub pages
after_success:
 - cd ../output ; rm -R .asciidoctor
 - git init
 - git config user.name "${GH_USER_NAME}"
 - git config user.email "{GH_USER_EMAIL}"
 - git add . ; git commit -m "Deploy to GitHub Pages - ${TRAVIS_COMMIT_RANGE}"
 - git push --force "https://${GH_TOKEN}@${GH_REF}" master:gh-pages


Update config for test coverage
Update config for test coverage
