forked from Alfresco/alfresco-content-app
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
231 lines (198 loc) · 9.72 KB
/
.travis.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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# =================
# merge anchor
# =================
dist: bionic
sudo: required
services:
- xvfb
addons:
chrome: stable
language: node_js
node_js:
- '12.18.1'
cache:
directories:
- node_modules
branches:
only:
- master
- develop
- /.*beta.*/
before_install:
- . ./scripts/ci/job_hooks/before_install.sh
install: echo "no install"
stages:
- name: Quality and Unit tests
if: type = cron || type = pull_request
- name: Publish Docker Registry
if: type = push
- name: Release Tag and Publish to Dockerhub
if: branch = master AND type = push
- name: e2e
if: type = cron || type = pull_request
- name: Trigger DW
if: branch = develop AND type = cron
env:
global:
- ADMIN_EMAIL=$ADMIN_EMAIL_REMOTE
- ADMIN_PASSWORD=$ADMIN_PASSWORD_REMOTE
- CONTENT_CE_DIST_PATH="./dist/content-ce"
# APP CONFIG DEFAULTS
- APP_CONFIG_PROVIDER=ECM
- APP_CONFIG_AUTH_TYPE=BASIC
- APP_CONFIG_OAUTH2_HOST=http://localhost:4200/auth/realms/alfresco
- APP_CONFIG_OAUTH2_CLIENTID=alfresco
- APP_CONFIG_PLUGIN_AOS=true
- APP_CONFIG_OAUTH2_IMPLICIT_FLOW=true
- APP_CONFIG_OAUTH2_SILENT_LOGIN=true
- APP_CONFIG_OAUTH2_REDIRECT_LOGOUT=/
- APP_CONFIG_OAUTH2_REDIRECT_LOGIN=/
- APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI="{protocol}//{hostname}{:port}/assets/silent-refresh.html"
jobs:
include:
- stage: Quality and Unit tests
name: 'Code quality checks'
script: npm ci && npm run lint
- stage: Quality and Unit tests
name: 'Build (without animation)'
before_script: npx @alfresco/adf-cli update-commit-sha --pointer "HEAD" --pathPackage "$(pwd)"
script: npm ci && npm run build -- --prod --configuration=e2e
after_success: ./scripts/ci/utils/artifact-to-s3.sh -a $CONTENT_CE_DIST_PATH -o "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" || travis_terminate 1
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aos'
script: npm ci && ng test adf-office-services-ext
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aca-shared'
script: npm ci && ng test aca-shared
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aca-settings'
script: npm ci && ng test aca-settings
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: ACA'
script:
- npm ci
- ng test content-ce
cache: false
- stage: e2e
name: 'Test Suites: authentication,listViews,navigation,application'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=authentication,listViews,navigation,application"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: search'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=search"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: viewer,infoDrawer,extensions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=viewer,infoDrawer,extensions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: shareActions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=shareActions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: pagination'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=pagination"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: actionsAvailableFilesFolders'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=actionsAvailableFilesFolders"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: actionsAvailableLibraries,actionsAvailableNewMenu'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=actionsAvailableLibraries,actionsAvailableNewMenu"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: actionsAvailableSpecialPermissions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=actionsAvailableSpecialPermissions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: copyMoveActions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=copyMoveActions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: createActions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=createActions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: deleteActions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=deleteActions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: editActions,favoriteActions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=editActions,favoriteActions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: libraryActions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=libraryActions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: uploadDownloadActions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=uploadDownloadActions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: Publish Docker Registry
name: Publish Docker Registry
script: ./scripts/travis/deploy/publish.sh "content-ce" "$DOCKER_REPOSITORY_DOMAIN" "$QUAY_USERNAME" "$QUAY_PASSWORD"
- stage: Release Tag and Publish to Dockerhub
name: Release Tag
script: ./scripts/travis/release/git-tag.sh
- name: Publish to Dockerhub
script: ./scripts/travis/deploy/publish.sh "content-ce" "$DOCKER_HUB_REPOSITORY_DOMAIN" "$DOCKER_HUB_USERNAME" "$DOCKER_HUB_PASSWORD"
- stage: Trigger DW
script: ./scripts/trigger-travis.sh --pro --branch $TRAVIS_BRANCH Alfresco alfresco-digital-workspace-app $TRAVIS_ACCESS_TOKEN
notifications:
slack:
on_pull_requests: false
rooms:
secure: 'qcTP/+rhVweMSZZAQMPz4sW7boS8XC0RX1SPYgg7hIfxBr9747WpRLkJ1sirkVaXI/6XfYAyl42CTfPmTuJxIC+co/NSnEDknwVsnKZd0O/ykTpo+mxIN4BTZX8dm+gELR5IEYQPs+Yki3ZnD9b+0mCK1yD8JallKCQeE2U9BhzZhP/Fn0ce35EulybNp3QQDaox0XC+7gadMdxlvK8mzP1scw76wRLtx25QLxxV+OwEw0bzyh8y3onfjHfnoDcUQWRTNdnjapzmgf1LNdC202A5kwp5sJggfSDr+ActRqaMvv4BbMsFpdan34B6zPQJfyZL1r8IB8O8BEKcAaOUVcTjnZAOom8kHS8F07/mo5xnNYmV8oNX2/egr1CiG4U0EAGF2XGqM+vetYnF88LTEzy84kVxmSwKGVfzlGOyTplMXJ1iCENndtfWm1AXhAFj5RSsSAZg6IStTM+mcpnC75moEwQtj8bTenwehHz1HQAjQX7xeTQo27SxDc7oqp1ReyXCllMjKxckjVGmp2j6yxn1Jl55kivBj57vluLtEtziOGluVELP5E2fV0VAuErNhnjLm4LJARVN76PQaTOXYwATVVJJDhb/77TesvxQsr3VfiROEKm7QB7IDFjghjLLisSX67JQ5+7K/qMlqf9+9hNw4n0v1eMylVjt+gyxspc='
on_failure: always
on_success: change
template:
- 'Repo `%{repository_slug}` *%{result}* build (<%{build_url}|#%{build_number}>) for commit (<%{compare_url}|%{commit}>) on branch `%{branch}`.'
- 'Author: %{author} Execution time: *%{duration}*'
- 'Message: %{message}'