mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
51 lines
1.9 KiB
YAML
51 lines
1.9 KiB
YAML
branches:
|
|
only:
|
|
- master
|
|
- /^it\/.*$/
|
|
language: groovy
|
|
sudo: required
|
|
services:
|
|
- docker
|
|
env:
|
|
global:
|
|
MAVEN_OPTS=-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
|
cache:
|
|
directories:
|
|
- $HOME/.m2
|
|
|
|
# Travis Lifecycle: https://docs.travis-ci.com/user/job-lifecycle#the-job-lifecycle
|
|
# Travis Stages: https://docs.travis-ci.com/user/build-stages/
|
|
# Travis Conditions: https://docs.travis-ci.com/user/conditional-builds-stages-jobs
|
|
# Travis GHPages deploy provider: https://docs.travis-ci.com/user/deployment/pages/
|
|
jobs:
|
|
include:
|
|
- stage: Tests
|
|
name: Unit Tests
|
|
before_script:
|
|
- curl -L --output cc-test-reporter https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
|
|
- chmod +x ./cc-test-reporter
|
|
- ./cc-test-reporter before-build
|
|
script: mvn package --batch-mode
|
|
after_script:
|
|
- JACOCO_SOURCE_PATH="src vars test" ./cc-test-reporter format-coverage target/site/jacoco/jacoco.xml --input-type jacoco
|
|
- ./cc-test-reporter upload-coverage
|
|
- name: Consumer Tests
|
|
if: repo = "SAP/jenkins-library" && ( (type != pull_request && branch =~ /^master$|^it\/.*$/) || (type == pull_request && head_repo = "SAP/jenkins-library" && head_branch =~ /^it\/.*$/) )
|
|
script: cd consumer-test && chmod +x integrationTestController.sh && ./integrationTestController.sh
|
|
|
|
- stage: Docs
|
|
name: Build & Deploy
|
|
install: docker pull squidfunk/mkdocs-material:3.0.4
|
|
before_script: documentation/bin/createDocu.sh
|
|
script: docker run --rm -it -v ${TRAVIS_BUILD_DIR}/documentation:/docs squidfunk/mkdocs-material:3.0.4 build --clean --strict
|
|
deploy:
|
|
on:
|
|
branch: master
|
|
provider: pages
|
|
skip_cleanup: true
|
|
github_token: ${GITHUB_TOKEN}
|
|
name: 'Travis CI Publisher'
|
|
local_dir: 'documentation/docs-gen'
|
|
keep_history: true
|
|
#verbose: true
|