travis migration (#607)

* Migrated to Travis

Co-authored-by: gfertuso <giovanni.fertuso@alfresco.com>
This commit is contained in:
Andrea Ligios 2021-02-02 19:05:55 +01:00 committed by GitHub
parent 8998e37414
commit 3d2ff7b1e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 118 additions and 0 deletions

10
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,10 @@
default_language_version:
# force all unspecified python hooks to run python3
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-yaml
args: [--allow-multiple-documents]

52
.travis.yml Normal file
View File

@ -0,0 +1,52 @@
import:
- source: Alfresco/alfresco-build-tools:.travis.java.yml@v1.0.1
dist: focal
git:
depth: false
quiet: true
branches:
only:
- master
- /feature\/.*/
- /fix\/.*/
stages:
- name: test
if: commit_message !~ /\[skip tests\]/
- name: release
if: commit_message ~= /\[release\]/ AND branch = master AND type != push AND type != pull_request AND fork = false
env:
global:
- MAVEN_INSTALL_CMD="mvn clean install -B"
jobs:
include:
- name: "default version"
stage: test
script:
- ${MAVEN_INSTALL_CMD}
- name: "6.2 Enterprise"
stage: test
script:
- ${MAVEN_INSTALL_CMD} -Penterprise-62-tests
- name: "6.2 Community"
stage: test
script:
- ${MAVEN_INSTALL_CMD} -Pcommunity-62-tests
- name: "6.1 Enterprise"
stage: test
script:
- ${MAVEN_INSTALL_CMD} -Penterprise-61-tests
- name: "6.1 Community"
stage: test
script:
- ${MAVEN_INSTALL_CMD} -Pcommunity-61-tests

14
pom.xml
View File

@ -241,6 +241,15 @@
</build>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public
@ -254,6 +263,11 @@
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>alfresco-private-repository</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
</repository>
<!-- Activiti Enterprise Edition Artifacts, put username/pwd for server in settings.xml -->
<repository>
<id>activiti-private-repository</id>

42
settings.xml Normal file
View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>alfresco-private-repository</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
<server>
<id>activiti-private-repository</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
<server>
<id>alfresco-public-snapshots</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
<server>
<id>alfresco-public</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
<server>
<id>alfresco-plugin-public</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
<server>
<id>alfresco-plugin-public-snapshots</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
<server>
<id>alfresco-internal-snapshots</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
</servers>
</settings>