mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
144 lines
6.8 KiB
YAML
144 lines
6.8 KiB
YAML
dist: xenial
|
|
os: linux
|
|
language: java
|
|
jdk:
|
|
- openjdk11
|
|
|
|
services:
|
|
- docker
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.m2
|
|
# the cache can grow constantly
|
|
before_cache:
|
|
- rm -rf $HOME/.m2/repository/org/alfresco/acs-community-packaging
|
|
env:
|
|
global:
|
|
- VERSION_EDITION=Community
|
|
# Must be in the format <alfresco-version>-<additional_versioning> ie. 6.3.0-repo-xxxx-x or 6.3.0-Ax
|
|
- RELEASE_VERSION=6.2.2-RC1
|
|
- DEVELOPMENT_VERSION=6.2.2-SNAPSHOT
|
|
branches:
|
|
only:
|
|
- master
|
|
- develop
|
|
|
|
stages:
|
|
- name: test
|
|
if: commit_message !~ /\[skip tests\]/
|
|
- release
|
|
- publish
|
|
|
|
before_install: "cp .travis.settings.xml $HOME/.m2/settings.xml"
|
|
|
|
jobs:
|
|
include:
|
|
- stage: test
|
|
name: "WhiteSource scan"
|
|
# only on master or develop and if it is not a PR
|
|
if: fork = false AND branch =~ ^(master|develop)$ AND type != pull_request
|
|
install:
|
|
- travis_retry travis_wait 30 mvn -q install "-Dversion.edition=${VERSION_EDITION}" -f war/pom.xml
|
|
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 -d ./war
|
|
- name: "REST API TAS tests part1"
|
|
jdk: openjdk11
|
|
install:
|
|
- travis_retry travis_wait 40 mvn install -q "-Dversion.edition=${VERSION_EDITION}" -Dmaven.javadoc.skip=true -PcommunityDocker
|
|
- ./tests/scripts/start-compose.sh ./tests/environment/docker-compose-minimal+transforms.yml
|
|
- ./tests/scripts/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 60 mvn install -f tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part1 -Denvironment=default -DrunBugs=false
|
|
- name: "REST API TAS tests part2"
|
|
jdk: openjdk11
|
|
install:
|
|
- travis_retry travis_wait 40 mvn install -q "-Dversion.edition=${VERSION_EDITION}" -Dmaven.javadoc.skip=true -PcommunityDocker
|
|
- ./tests/scripts/start-compose.sh ./tests/environment/docker-compose-minimal+transforms.yml
|
|
- ./tests/scripts/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 60 mvn install -f tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part2 -Denvironment=default -DrunBugs=false
|
|
- name: "REST API TAS tests part3"
|
|
jdk: openjdk11
|
|
install:
|
|
- travis_retry travis_wait 40 mvn install -q "-Dversion.edition=${VERSION_EDITION}" -Dmaven.javadoc.skip=true -PcommunityDocker
|
|
- ./tests/scripts/start-compose.sh ./tests/environment/docker-compose-minimal+transforms.yml
|
|
- ./tests/scripts/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 60 mvn install -f tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part3 -Denvironment=default -DrunBugs=false
|
|
- name: "CMIS TAS tests"
|
|
jdk: openjdk11
|
|
install:
|
|
- travis_retry travis_wait 40 mvn install -q "-Dversion.edition=${VERSION_EDITION}" -Dmaven.javadoc.skip=true -PcommunityDocker
|
|
- ./tests/scripts/start-compose.sh ./tests/environment/docker-compose-minimal+transforms.yml
|
|
- ./tests/scripts/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 40 mvn install -q -f tests/tas-cmis/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
|
|
- name: "Email TAS tests"
|
|
jdk: openjdk11
|
|
install:
|
|
- travis_retry travis_wait 40 mvn install -q "-Dversion.edition=${VERSION_EDITION}" -Dmaven.javadoc.skip=true -PcommunityDocker
|
|
- ./tests/scripts/start-compose.sh ./tests/environment/docker-compose-minimal.yml
|
|
- ./tests/scripts/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 30 mvn install -q -f tests/tas-email/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
|
|
- name: "WebDAV TAS tests"
|
|
jdk: openjdk11
|
|
install:
|
|
- travis_retry travis_wait 40 mvn install -q "-Dversion.edition=${VERSION_EDITION}" -Dmaven.javadoc.skip=true -PcommunityDocker
|
|
- ./tests/scripts/start-compose.sh ./tests/environment/docker-compose-minimal.yml
|
|
- ./tests/scripts/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 30 mvn install -q -f tests/tas-webdav/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
|
|
- name: "Integration TAS tests"
|
|
jdk: openjdk11
|
|
install:
|
|
- travis_retry travis_wait 40 mvn install -q "-Dversion.edition=${VERSION_EDITION}" -Dmaven.javadoc.skip=true -PcommunityDocker
|
|
- ./tests/scripts/start-compose.sh ./tests/environment/docker-compose-minimal.yml
|
|
- ./tests/scripts/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 30 mvn install -q -f tests/tas-integration/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
|
|
- stage: Release
|
|
name: "Maven release"
|
|
if: commit_message ~= /\[release\]/ AND fork = false AND branch =~ ^(master|develop)$ AND type != pull_request
|
|
install: travis_retry travis_wait 40 mvn clean install -DskipTests=true "-Dversion.edition=${VERSION_EDITION}" -Dmaven.javadoc.skip=true -B -V
|
|
# Fail the job if there is a docker image tag that matches the RELEASE_VERSION (or project version in the POM if not set)
|
|
before_script: ./scripts/travis/verify_release_tag.sh
|
|
script: travis_wait 40 ./scripts/travis/maven_release.sh ${RELEASE_VERSION} ${DEVELOPMENT_VERSION}
|
|
# Copy alfresco.war and the distribution zip to deploy_dir
|
|
before_deploy:
|
|
# Move the final artifacts to a single folder (deploy_dir) to be copied to S3
|
|
- mkdir -p deploy_dir
|
|
- cp war/target/alfresco.war deploy_dir
|
|
- cp distribution/target/*-distribution*.zip deploy_dir
|
|
deploy:
|
|
- provider: s3
|
|
access_key_id: ${AWS_STAGING_ACCESS_KEY}
|
|
secret_access_key: ${AWS_STAGING_SECRET_KEY}
|
|
bucket: "alfresco-artefacts-staging"
|
|
region: "eu-west-1"
|
|
skip_cleanup: true
|
|
acl: private
|
|
local_dir: deploy_dir
|
|
upload_dir: "alfresco-content-services-community/release/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}"
|
|
on:
|
|
all_branches: true
|
|
condition: $TRAVIS_BRANCH =~ ^(master|develop)$
|
|
- stage: "Publish"
|
|
name: "Copy to S3 Release"
|
|
if: commit_message ~= /\[publish\]/ AND fork = false AND branch = master AND type != pull_request
|
|
# Nothing to build/install as we are just copying from S3 buckets
|
|
install: skip
|
|
script: skip
|
|
before_deploy: pip install awscli
|
|
deploy:
|
|
- provider: script
|
|
script: ./scripts/travis/copy_to_release_bucket.sh ${TRAVIS_BUILD_NUMBER} ${TRAVIS_BRANCH}
|
|
on:
|
|
branch: master
|
|
|
|
|