mirror of
https://github.com/Alfresco/acs-community-packaging.git
synced 2025-09-10 14:12:09 +00:00
180 lines
7.4 KiB
YAML
180 lines
7.4 KiB
YAML
---
|
|
dist: xenial
|
|
language: java
|
|
jdk: openjdk11
|
|
|
|
services:
|
|
- docker
|
|
|
|
git:
|
|
depth: false
|
|
quiet: true
|
|
|
|
cache:
|
|
directories:
|
|
- ${HOME}/.m2/repository
|
|
|
|
# the cache can grow constantly
|
|
before_cache: bash scripts/travis/cleanup_cache.sh
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- /release\/.*/
|
|
- /feature\/.*/
|
|
- /fix\/.*/
|
|
|
|
env:
|
|
global:
|
|
- TAS_SCRIPTS=../alfresco-community-repo/packaging/tests/scripts
|
|
- TAS_ENVIRONMENT=./tests/environment
|
|
# Release version has to start with real version (7.1.0-....) for the docker image to build successfully.
|
|
- RELEASE_VERSION=7.1.0-A6
|
|
- DEVELOPMENT_VERSION=7.1.0-SNAPSHOT
|
|
|
|
stages:
|
|
- name: test
|
|
if: commit_message !~ /\[skip tests\]/
|
|
- name: docker_latest
|
|
if: commit_message !~ /\[skip docker_latest\]/ AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND fork = false
|
|
- name: release
|
|
if: commit_message =~ /\[release\]/ AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND fork = false
|
|
- name: publish
|
|
if: commit_message =~ /\[publish\]/ AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND fork = false
|
|
|
|
before_install: travis_retry bash scripts/travis/init.sh
|
|
install: travis_retry travis_wait 40 bash scripts/travis/build.sh
|
|
|
|
jobs:
|
|
include:
|
|
- name: "REST API TAS tests part1"
|
|
if: commit_message !~ /\[skip tas\]/
|
|
before_script:
|
|
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
|
|
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 60 mvn -B install -f tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part1 -Denvironment=default -DrunBugs=false
|
|
|
|
- name: "REST API TAS tests part2"
|
|
if: commit_message !~ /\[skip tas\]/
|
|
before_script:
|
|
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
|
|
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 60 mvn -B install -f tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part2 -Denvironment=default -DrunBugs=false
|
|
|
|
- name: "REST API TAS tests part3"
|
|
if: commit_message !~ /\[skip tas\]/
|
|
before_script:
|
|
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
|
|
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 60 mvn -B install -f tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part3 -Denvironment=default -DrunBugs=false
|
|
|
|
- name: "CMIS TAS tests - BROWSER binding"
|
|
if: commit_message !~ /\[skip tas\]/
|
|
before_script:
|
|
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
|
|
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 40 mvn -B install -f tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-browser -Denvironment=default -DrunBugs=false
|
|
|
|
- name: "CMIS TAS tests - ATOM binding"
|
|
if: commit_message !~ /\[skip tas\]/
|
|
before_script:
|
|
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
|
|
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 40 mvn -B install -f tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-atom -Denvironment=default -DrunBugs=false
|
|
|
|
- name: "CMIS TAS tests - WEBSERVICES binding"
|
|
if: commit_message !~ /\[skip tas\]/
|
|
before_script:
|
|
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
|
|
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 40 mvn -B install -f tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-webservices -Denvironment=default -DrunBugs=false
|
|
|
|
- name: "Email TAS tests"
|
|
if: commit_message !~ /\[skip tas\]/
|
|
before_script:
|
|
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal.yml
|
|
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 30 mvn -B install -f tests/tas-email/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
|
|
|
|
- name: "WebDAV TAS tests"
|
|
if: commit_message !~ /\[skip tas\]/
|
|
before_script:
|
|
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal.yml
|
|
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 20 mvn -B install -f tests/tas-webdav/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
|
|
|
|
- name: "Integration TAS tests"
|
|
if: commit_message !~ /\[skip tas\]/
|
|
before_script:
|
|
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal.yml
|
|
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
script:
|
|
- travis_wait 30 mvn -B install -f tests/tas-integration/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
|
|
|
|
- name: "Update latest images"
|
|
stage: docker_latest
|
|
script: travis_retry travis_wait 30 mvn -B -V clean install -DskipTests -Dmaven.javadoc.skip=true -Ppush-docker-images
|
|
|
|
- name: "Release and Copy to S3 Staging Bucket"
|
|
stage: release
|
|
before_script: bash scripts/travis/verify_release_tag.sh
|
|
script: travis_wait 60 bash scripts/travis/maven_release.sh
|
|
before_deploy:
|
|
# Move the final artifacts to a single folder (deploy_dir) to be copied to S3
|
|
- mkdir -p deploy_dir
|
|
- cp distribution/target/alfresco.war deploy_dir
|
|
- cp distribution/target/*-distribution*.zip deploy_dir
|
|
- ls -lA deploy_dir
|
|
- mkdir -p deploy_dir_ags
|
|
- cp distribution-ags/target/*.zip deploy_dir_ags
|
|
- ls -lA deploy_dir_ags
|
|
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
|
|
- 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_ags"
|
|
upload_dir: "community/RM/${RELEASE_VERSION}"
|
|
on:
|
|
all_branches: true
|
|
after_deploy:
|
|
- echo "Finished release and deployed to https://s3.console.aws.amazon.com/s3/buckets/alfresco-artefacts-staging/alfresco-content-services/release/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}"
|
|
|
|
- name: "Copy to S3 Release Bucket"
|
|
stage: publish
|
|
# 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: bash scripts/travis/copy_to_release_bucket.sh
|
|
on:
|
|
all_branches: true
|
|
- provider: script
|
|
script: bash scripts/travis/copy_ags_to_release_bucket.sh
|
|
on:
|
|
all_branches: true
|