-
Notifications
You must be signed in to change notification settings - Fork 25
92 lines (85 loc) · 3.03 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
name: Alfresco REST API Explorer CI
on:
pull_request:
branches:
- master
- fix/**
- feature/**
push:
branches:
- master
- fix/**
- feature/**
workflow_dispatch:
schedule:
- cron: '0 5 * * 3'
env:
MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }}
GIT_PASSWORD: ${{ secrets.BOT_GITHUB_TOKEN }}
RELEASE_VERSION: "23.3.0-A1"
DEVELOPMENT_VERSION: "23.3.0-A2-SNAPSHOT"
MAVEN_CLI_OPTS: "-B -q -e -fae -V -DinstallAtEnd=true -U"
GITHUB_ACTIONS_DEPLOY_TIMEOUT: 30
jobs:
pre_commit:
runs-on: ubuntu-latest
steps:
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
build:
name: "Build"
runs-on: ubuntu-latest
needs: [pre_commit]
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- name: "Build"
run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
- name: "Verify"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: mvn ${MAVEN_CLI_OPTS} verify -Dlogging.root.level=off -Dspring.main.banner-mode=off
tests:
name: "Integration tests"
runs-on: ubuntu-latest
needs: [build]
if: "!contains(github.event.head_commit.message, '[skip tests]')"
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- name: "Run tests"
run: mvn verify
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]
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- name: "Publish"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: mvn ${MAVEN_CLI_OPTS} deploy -DskipTests
release:
name: "Release"
runs-on: ubuntu-latest
needs: [publish]
if: >
!(failure() || cancelled()) && contains(github.event.head_commit.message, '[release]') &&
github.ref_name == 'master' && github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
username: ${{ secrets.BOT_GITHUB_USERNAME }}
email: ${{ secrets.BOT_GITHUB_EMAIL }}
global: true
- name: "Release"
run: bash CI/release.sh