diff --git a/settings.xml b/.ci.settings.xml similarity index 100% rename from settings.xml rename to .ci.settings.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..a893a1c1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,118 @@ +name: Alfresco SDK CI + +on: + pull_request: + branches: + - master + - fix/** + - feature/** + - sdk-4.5 + push: + branches: + - master + - fix/** + - feature/** + - sdk-4.5 + workflow_dispatch: + +env: + MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + MAVEN_CENTRAL_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }} + MAVEN_CENTRAL_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }} + MAVEN_CLI_OPTS: "-B -q -e -fae -V -DinstallAtEnd=true -U" + +jobs: + pre_commit: + runs-on: ubuntu-latest + steps: + - uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v1.35.0 + + build: + name: "Build application" + runs-on: ubuntu-latest + needs: [pre_commit] + if: "!contains(github.event.head_commit.message, '[skip tests]')" + steps: + - uses: actions/checkout@v3 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.0 + - name: "Build" + run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V + - name: "Verify" + run: mvn $MAVEN_CLI_OPTS verify -Dlogging.root.level=off -Dspring.main.banner-mode=off + + tests: + name: ${{ matrix.name }} + runs-on: ubuntu-latest + needs: [build] + if: "!contains(github.event.head_commit.message, '[skip tests]')" + strategy: + fail-fast: false + matrix: + include: + - name: "current version Java 17" + java-version: 17 + - name: "current version Java 11" + java-version: 11 + - name: "7.3 Enterprise Java 17" + java-version: 17 + suite: -Penterprise-73-tests + - name: "7.3 Community Java 17" + java-version: 17 + suite: -Pcommunity-73-tests + - name: "7.3 Enterprise Java 11" + java-version: 11 + suite: -Penterprise-73-tests + - name: "7.3 Community Java 11" + java-version: 11 + suite: -Pcommunity-73-tests + - name: "7.2 Enterprise" + java-version: 11 + suite: -Penterprise-72-tests + - name: "7.2 Community" + java-version: 11 + suite: -Pcommunity-72-tests + - name: "7.1 Enterprise" + java-version: 11 + suite: -Penterprise-71-tests + - name: "7.1 Community" + java-version: 11 + suite: -Pcommunity-71-tests + - name: "7.0 Enterprise" + java-version: 11 + suite: -Penterprise-70-tests + - name: "7.0 Community" + java-version: 11 + suite: -Pcommunity-70-tests + steps: + - uses: actions/checkout@v3 + - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.0 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.0 + with: + java-version: ${{ matrix.java-version }} + - name: "Login to Docker Hub" + uses: docker/login-action@v2.1.0 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: "Login to Quay.io" + uses: docker/login-action@v2.1.0 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + - name: "Build" + run: mvn clean install -B ${{ matrix.suite }} + + publish: + name: "Publish artifacts" + runs-on: ubuntu-latest + needs: [tests] + if: github.event_name != 'pull_request' + steps: + - uses: actions/checkout@v3 + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.0 + - name: "Build" + run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V + - name: "Publish" + run: mvn $MAVEN_CLI_OPTS deploy -DskipTests \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b4e97d73..00000000 --- a/.travis.yml +++ /dev/null @@ -1,106 +0,0 @@ -import: - - source: Alfresco/alfresco-build-tools:.travis.docker_login.yml@v1.1.5 - - source: Alfresco/alfresco-build-tools:.travis.docker_hub_login.yml@v1.1.5 - - source: Alfresco/alfresco-build-tools:.travis.java.yml@v1.1.5 - - source: Alfresco/alfresco-build-tools:.travis.pre-commit.yml@v1.1.5 - -dist: focal - -jdk: - - openjdk17 - - openjdk11 - -git: - depth: false - quiet: true - -branches: - only: - - master - - /feature\/.*/ - - /fix\/.*/ - - sdk-4.5 - -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: "current version Java 17" - stage: test - jdk: openjdk17 - script: - - ${MAVEN_INSTALL_CMD} - - - name: "current version Java 11" - stage: test - jdk: openjdk11 - script: - - ${MAVEN_INSTALL_CMD} - - - name: "7.3 Enterprise Java 17" - stage: test - jdk: openjdk17 - script: - - ${MAVEN_INSTALL_CMD} -Penterprise-73-tests - - - name: "7.3 Community Java 17" - stage: test - jdk: openjdk17 - script: - - ${MAVEN_INSTALL_CMD} -Pcommunity-73-tests - - - name: "7.3 Enterprise Java 11" - stage: test - jdk: openjdk11 - script: - - ${MAVEN_INSTALL_CMD} -Penterprise-73-tests - - - name: "7.3 Community Java 11" - stage: test - jdk: openjdk11 - script: - - ${MAVEN_INSTALL_CMD} -Pcommunity-73-tests - - - name: "7.2 Enterprise" - stage: test - jdk: openjdk11 - script: - - ${MAVEN_INSTALL_CMD} -Penterprise-72-tests - - - name: "7.2 Community" - stage: test - jdk: openjdk11 - script: - - ${MAVEN_INSTALL_CMD} -Pcommunity-72-tests - - - name: "7.1 Enterprise" - stage: test - jdk: openjdk11 - script: - - ${MAVEN_INSTALL_CMD} -Penterprise-71-tests - - - name: "7.1 Community" - stage: test - jdk: openjdk11 - script: - - ${MAVEN_INSTALL_CMD} -Pcommunity-71-tests - - - name: "7.0 Enterprise" - stage: test - jdk: openjdk11 - script: - - ${MAVEN_INSTALL_CMD} -Penterprise-70-tests - - - name: "7.0 Community" - stage: test - jdk: openjdk11 - script: - - ${MAVEN_INSTALL_CMD} -Pcommunity-70-tests diff --git a/README.md b/README.md index baf32bc2..50d951c9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # [![Alfresco SDK logo](https://github.com/Alfresco/alfresco-sdk/raw/master/src/site/resources/img/alfresco-maven-logo.jpg)](#features) Alfresco SDK -[![Build Status](https://travis-ci.com/Alfresco/alfresco-sdk.svg?branch=master)](https://travis-ci.com/Alfresco/alfresco-sdk) +[![Build Status](https://github.com/Alfresco/alfresco-sdk/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Alfresco/alfresco-sdk/actions/workflows/ci.yml) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) ![GitHub](https://img.shields.io/github/license/Alfresco/alfresco-sdk?color=brightgreen) diff --git a/pom.xml b/pom.xml index e578a5eb..a2f390e9 100644 --- a/pom.xml +++ b/pom.xml @@ -405,7 +405,7 @@ alfresco-private-repository https://artifacts.alfresco.com/nexus/content/groups/private - + activiti-private-repository https://artifacts.alfresco.com/nexus/content/repositories/activiti-enterprise-releases