forked from Alfresco/Aikau
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
59 lines (52 loc) · 2.04 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
dist: xenial
sudo: required
language: java
jdk:
- openjdk11
cache:
directories:
- $HOME/.m2
branches:
only:
- develop
- APPS*
- /support\/.*/
- /release\/.*/
before_install:
- "cp _ci/.travis.settings.xml $HOME/.m2/settings.xml"
install: travis_retry mvn install -DskipTests=true -B -V
stages:
- build
- test
- release
jobs:
include:
- name: "WhiteSource scan"
stage: build
# only on SP branches or master and if it is not a PR
if: fork = false AND (branch = develop OR branch =~ /support\/SP\/.*/ OR branch =~ /release\/.*/ OR branch =~ APPS*) AND type != pull_request
script:
# Download the latest version of WhiteSource Unified Agent
- curl -LJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
# Run WhiteSource Unified Agent
- java -jar wss-unified-agent.jar -apiKey ${WHITESOURCE_API_KEY} -c _ci/.wss-unified-agent.config
- name: "Source Clear Scan (SCA)"
stage: build
# only on SP branches or master and if it is not a PR
if: fork = false AND (branch = develop OR branch =~ /support\/SP\/.*/ OR branch =~ /release\/.*/ OR branch =~ APPS*) AND type != pull_request
# Run Veracode
install: skip
script: travis_wait 30 bash _ci/source_clear.sh
- stage: test
name: "Build and test"
script: travis_retry mvn test
- stage: release
name: "Push to Nexus"
if: fork = false AND (branch =~ /support\/.*/ OR branch =~ /release\/.*/) AND type != pull_request AND commit_message !~ /\[no-release\]/
script:
# Use full history for release
- git checkout -B "${TRAVIS_BRANCH}"
# Add email to link commits to user
- git config user.email "${GIT_EMAIL}"
# Skip building of release commits
- mvn --batch-mode -q -DscmCommentPrefix="[maven-release-plugin][skip ci] " -Dusername="${GIT_USERNAME}" -Dpassword="${GIT_PASSWORD}" -DskipTests -Darguments=-DskipTests release:clean release:prepare release:perform