mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Add release stage in Travis (#282)
This commit is contained in:
10
.travis.settings.xml
Normal file
10
.travis.settings.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<settings>
|
||||
<!-- required to push artifacts to repositories -->
|
||||
<servers>
|
||||
<server>
|
||||
<id>alfresco-public</id>
|
||||
<username>${env.MAVEN_USERNAME}</username>
|
||||
<password>${env.MAVEN_PASSWORD}</password>
|
||||
</server>
|
||||
</servers>
|
||||
</settings>
|
27
.travis.yml
27
.travis.yml
@@ -3,8 +3,6 @@ sudo: required
|
||||
language: java
|
||||
jdk:
|
||||
- openjdk11
|
||||
# Backwards compatibility with Java 8
|
||||
# - oraclejdk8
|
||||
services:
|
||||
- docker
|
||||
|
||||
@@ -17,13 +15,20 @@ branches:
|
||||
- master
|
||||
- /support\/.*/
|
||||
|
||||
stages:
|
||||
- test
|
||||
- release
|
||||
|
||||
before_install:
|
||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:10.1 postgres -c 'max_connections=300'
|
||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
|
||||
|
||||
matrix:
|
||||
install: travis_retry mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- name: "WhiteSource scan"
|
||||
- stage: test
|
||||
name: "WhiteSource scan"
|
||||
# only on support 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:
|
||||
@@ -41,5 +46,15 @@ matrix:
|
||||
script: travis_wait 20 mvn test -B -Dtest=AppContext04TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
- name: "AppContextExtraTestSuite"
|
||||
script: travis_wait 20 mvn test -B -Dtest=AppContextExtraTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
|
||||
install: travis_retry mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
||||
- 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
|
||||
|
Reference in New Issue
Block a user