1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
sap-jenkins-library/.travis.yml

49 lines
1.9 KiB
YAML
Raw Normal View History

branches:
only:
- master
2019-03-01 15:28:07 +02:00
- /^it\/.*$/
2017-12-01 18:30:52 +02:00
language: groovy
2019-10-15 14:06:02 +02:00
jdk:
- openjdk8
sudo: required
services:
2018-10-25 12:56:32 +02:00
- docker
2018-11-07 14:08:24 +02:00
env:
global:
MAVEN_OPTS=-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
cache:
directories:
- $HOME/.m2
2018-10-25 12:56:32 +02:00
# 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/
2018-10-25 12:56:32 +02:00
jobs:
include:
- stage: Tests
name: Consumer Tests
2019-03-01 15:28:07 +02:00
if: repo = "SAP/jenkins-library" && ( (type != pull_request && branch =~ /^master$|^it\/.*$/) || (type == pull_request && head_repo = "SAP/jenkins-library" && head_branch =~ /^it\/.*$/) )
2019-05-09 10:28:54 +02:00
script: cd consumer-test && groovy consumerTestController.groovy
- stage: Docs
name: Create Documentation
install: docker pull squidfunk/mkdocs-material:3.0.4
before_script:
- documentation/bin/createDocu.sh
2019-11-26 10:55:49 +02:00
- docker run -u `id -u`:`id -g` --rm -it -e GOCACHE=/tmp -v ${TRAVIS_BUILD_DIR}:/docu-gen golang sh -c "cd /docu-gen && go get github.com/SAP/jenkins-library/... && go run /docu-gen/pkg/generator/step-metadata.go --docuDir=/docu-gen/documentation/docs/steps/ --docuGen=true "
script:
- docker run -u `id -u`:`id -g` --rm -it -v ${TRAVIS_BUILD_DIR}/documentation:/docs squidfunk/mkdocs-material:3.0.4 build --clean --strict
after_script:
- mkdir -p documentation/docs-gen/misc
- cp target/docuMetaData.json documentation/docs-gen/misc
deploy:
on:
branch: master
provider: pages
skip_cleanup: true
github_token: ${GITHUB_TOKEN}
name: 'Travis CI Publisher'
2019-04-10 13:49:40 +02:00
local_dir: 'documentation/docs-gen'
keep_history: true
#verbose: true