mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
47 lines
1.6 KiB
YAML
47 lines
1.6 KiB
YAML
dist: trusty
|
|
sudo: required
|
|
language: java
|
|
jdk:
|
|
- openjdk11
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.m2
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- /support\/.*/
|
|
|
|
install: travis_retry mvn install -DskipTests=true -B -V
|
|
|
|
stages:
|
|
- test
|
|
- release
|
|
|
|
jobs:
|
|
include:
|
|
- stage: test
|
|
name: "Build and test"
|
|
script: travis_retry mvn test
|
|
- name: "WhiteSource scan"
|
|
# only on SP branches or master and if it is not a PR
|
|
if: fork = false AND (branch = master OR branch =~ /support\/SP\/.*/) 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 .wss-unified-agent.config
|
|
- stage: release
|
|
name: "Push to Nexus"
|
|
if: fork = false AND (branch = master OR branch =~ /support\/.*/) AND type != pull_request AND commit_message !~ /\[no-release\]/
|
|
before_install:
|
|
- "cp .travis.settings.xml $HOME/.m2/settings.xml"
|
|
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
|