-
Notifications
You must be signed in to change notification settings - Fork 113
146 lines (140 loc) · 4.68 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
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/[email protected]
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/[email protected]
- 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: >
!(failure() || cancelled()) &&
!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: "23.1 Enterprise Java 17"
java-version: 17
suite: -Penterprise-231-tests
- name: "23.1 Community Java 17"
java-version: 17
suite: -Pcommunity-231-tests
- name: "23.1 Enterprise Java 11"
java-version: 11
suite: -Penterprise-231-tests
- name: "23.1 Community Java 11"
java-version: 11
suite: -Pcommunity-231-tests
- name: "7.4 Enterprise Java 17"
java-version: 17
suite: -Penterprise-74-tests
- name: "7.4 Community Java 17"
java-version: 17
suite: -Pcommunity-74-tests
- name: "7.4 Enterprise Java 11"
java-version: 11
suite: -Penterprise-74-tests
- name: "7.4 Community Java 11"
java-version: 11
suite: -Pcommunity-74-tests
- 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/[email protected]
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
java-version: ${{ matrix.java-version }}
- name: "Login to Docker Hub"
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: "Login to Quay.io"
uses: docker/[email protected]
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: >
!(failure() || cancelled()) &&
github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- name: "Build"
run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
- name: "Publish"
run: mvn $MAVEN_CLI_OPTS deploy -DskipTests