Skip to content

Commit

Permalink
Merge remote-tracking branch 'acs-community-packaging/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Shields committed Jul 21, 2020
2 parents 4c82353 + cd847f8 commit 0c69b98
Show file tree
Hide file tree
Showing 627 changed files with 95,132 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packaging/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.* eol=crlf
*.html eol=crlf
*.java eol=crlf
*.txt eol=crlf
*.css eol=crlf
*.xml eol=crlf
*.js eol=crlf
*.properties eol=crlf
4 changes: 4 additions & 0 deletions packaging/.gitbugtraq
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# For SmartGit
[bugtraq "jira"]
url = https://issues.alfresco.com/jira/browse/%BUGID%
logRegex = ([A-Z]+-\\d+)
41 changes: 41 additions & 0 deletions packaging/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
*.class

# Eclipse
.classpath
.settings
.project

# Intellij
.idea/
*.iml
*.iws

#VSCode
/.vscode

# Mac
.DS_Store

# Maven
target
*.log
*.log.*


# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# Alfresco
alf_data/

helm/alfresco-content-services-community/charts/*
helm/alfresco-content-services-community/requirements.lock
helm/alfresco-content-services-community*.tgz

# Travis deployment folder
deploy_dir
49 changes: 49 additions & 0 deletions packaging/.travis.settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<settings>
<profiles>
<profile>
<id>alfresco-internal</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>alfresco-internal</id>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<name>Alfresco Internal Repository</name>
<url>https://artifacts.alfresco.com/nexus/content/groups/internal</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>alfresco-internal</id>
<name>Alfresco Internal Repository</name>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>


<servers>
<server>
<id>alfresco-internal</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
<server>
<id>quay.io</id>
<username>${env.QUAY_USERNAME}</username>
<password>${env.QUAY_PASSWORD}</password>
</server>
<server>
<id>docker.io</id>
<username>${env.DOCKERHUB_USERNAME}</username>
<password>${env.DOCKERHUB_PASSWORD}</password>
</server>
</servers>
</settings>
143 changes: 143 additions & 0 deletions packaging/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
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


8 changes: 8 additions & 0 deletions packaging/.whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"generalSettings": {
"shouldScanRepo": true
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure"
}
}
Loading

0 comments on commit 0c69b98

Please sign in to comment.