forked from dotCMS/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.deprecated-travis.yml
126 lines (118 loc) · 5.19 KB
/
.deprecated-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
language: bash
git:
submodules: false
cache:
directories:
- ${HOME}/gcloud/
# https://docs.travis-ci.com/user/environment-variables/
env:
global:
- GCLOUD_DIR=${HOME}/gcloud
- PATH=${GCLOUD_DIR}/google-cloud-sdk/bin:${PATH}
- GOOGLE_CREDENTIALS=${TRAVIS_BUILD_DIR}/credentials.json
- CLOUDSDK_CORE_DISABLE_PROMPTS=1
- LICENSE=${DOTCMS_LICENSE}
- TRAVIS_WORKER_HARD_TIMEOUT=80m
- TRAVIS_WORKER_MAX_LOG_LENGTH=20000000
- TRAVIS_COMMIT_SHORT=${TRAVIS_COMMIT::8}
- DOT_CICD_CLOUD_PROVIDER=travis
- DOT_CICD_TARGET=core
before_install:
- chmod +x .cicd/discover.sh
# Commit message format
# [travis] -> executes all dbs and unit tests
# [travis unit]
# [travis postgres]
# [travis mysql]
# [travis oracle]
# [travis mssql]
# [travis mysql] [travis mssql]
# [travis oracle] [travis mssql] [travis postgres]
# https://docs.travis-ci.com/user/conditions-v1
# https://docs.travis-ci.com/user/conditional-builds-stages-jobs/
if: >-
type = pull_request
OR type = api
OR branch = master
OR branch =~ ^release-
OR branch =~ ^test-
OR commit_message =~ /(\[travis\]|\[travis postgres\]|\[travis mysql\]|\[travis oracle\]|\[travis mssql\]|\[travis unit\]|\[travis curl\])/
# https://docs.travis-ci.com/user/build-stages
jobs:
include:
- stage: build base images
name: build dotcms base image
script: bash dotcicd/library/pipeline.sh buildBase
- name: build tests base image
script: bash dotcicd/library/pipeline.sh buildTestsBase
- stage: run tests
name: unit tests
script: bash dotcicd/library/pipeline.sh runUnit
- name: postgres integration testscurlTe
script: bash dotcicd/library/pipeline.sh runIntegration
if: >-
commit_message !~ /(\[travis mysql\]|\[travis oracle\]|\[travis mssql\]|\[travis unit\])/ OR commit_message =~ /(\[travis\]|\[travis postgres\])/
env: DB_TYPE=postgres
- name: mysql integration tests
script: bash dotcicd/library/pipeline.sh runIntegration
if: >-
(type != pull_request AND (branch = master OR branch =~ ^release- OR branch =~ ^test-))
OR commit_message =~ /(\[travis\]|\[travis mysql\])/
env: DB_TYPE=mysql
- name: oracle integration tests
script: bash dotcicd/library/pipeline.sh runIntegration
if: >-
(type != pull_request AND (branch = master OR branch =~ ^release- OR branch =~ ^test-))
OR commit_message =~ /(\[travis\]|\[travis oracle\])/
env: DB_TYPE=oracle
- name: mssql integration tests
script: bash dotcicd/library/pipeline.sh runIntegration
if: >-
(type != pull_request AND (branch = master OR branch =~ ^release- OR branch =~ ^test-))
OR commit_message =~ /(\[travis\]|\[travis mssql\])/
env: DB_TYPE=mssqlayer
- name: postgres postman tests
script: bash dotcicd/library/pipeline.sh runCurl
if: >-
commit_message !~ /(\[travis mysql\]|\[travis oracle\]|\[travis mssql\]|\[travis unit\])/ OR commit_message =~ /(\[travis\]|\[travis postgres\])/
env:
- DB_TYPE=postgres
- PROVIDER_DB_USERNAME=postgres
- PROVIDER_DB_PASSWORD=postgres
- name: mysql postman tests
script: bash dotcicd/library/pipeline.sh runCurl
if: >-
(type != pull_request AND (branch = master OR branch =~ ^release- OR branch =~ ^test-))
OR commit_message =~ /(\[travis\]|\[travis mysql\])/
env:
- DB_TYPE=mysql
- PROVIDER_DB_USERNAME=mysql
- PROVIDER_DB_PASSWORD=mysql
- name: oracle postman tests
script: bash dotcicd/library/pipeline.sh runCurl
if: >-
(type != pull_request AND (branch = master OR branch =~ ^release- OR branch =~ ^test-))
OR commit_message =~ /(\[travis\]|\[travis oracle\])/
env:
- DB_TYPE=oracle
- PROVIDER_DB_USERNAME=oracle
- PROVIDER_DB_PASSWORD=oracle
- name: mssql postman tests
script: bash dotcicd/library/pipeline.sh runCurl
if: >-
(type != pull_request AND (branch = master OR branch =~ ^release- OR branch =~ ^test-))
OR commit_message =~ /(\[travis\]|\[travis mssql\])/
env:
- DB_TYPE=mssql
- PROVIDER_DB_USERNAME=sa
- PROVIDER_DB_PASSWORD=mssqldotCMS2019
install:
- .cicd/discover.sh
- dotcicd/library/checkProvider.sh travis
- dotcicd/library/pipeline.sh environmentVars
- dotcicd/library/pipeline.sh installGCloud
# https://docs.travis-ci.com/user/notifications/#configuring-slack-notifications
# https://docs.travis-ci.com/user/encryption-keys/#usage
notifications:
slack:
secure: aAvcodn0kTpZJYRSht3AZ9dJ1ZBggPmiEPp7+jxBqUuCU01R0mjYJ12KEAc1ZghTj8Bk1g+ZJRqDkUlHTZgqcFaXTEnuUtyhiVSau7xJzmLfu/uf5LNxLN9GaTPo4F2VJqlec5suhbv/EvQyVHrrkGtayGehERuu+fcssrZPwvJZgZMQf4DFq8GHo8lJRMr6qoJJkeEzXTpa3j7SEshtACB5N4sieUsb9l1F9Q9sHbCtU4p24QxTvdSt6iS5TMEjHEXith2pDNpEwguPTfPiWhHfFu2e2vAe+r/62+5/uP42ku0bfLU//K+hBKHpS6XylA+EzfwXIdRjEiooWZYQfY7FHnZfVE0YTMClRdlGFh91pK3WXs3fjk2C6UiqcV5J+/AvzwhSvCJNnuVEsWdmRDgM4/6M9HEmEIcFqwgJnP+NDFwou3te2JEd+HPjrIlPltQoLWBNG7Us2y4M3aBPqXfHj5F5HdGo9zhsYloI6vbz1A9kblgP2XrbmcjRCpdP6kznu5apWUSdII1Nh/4lpMp6BJGWoQ5+vgwDSRWf2gBp7aMuKtVrhXHVdev/J7531JKUZo2fcb4NnzqT7ax2tJOCQ3JWBq4/DF6xat/lvR2/9PiAYbKrrL/yQhZ9w+9TMrl+CeF8OFxnJXD5Axu/7dcF5nNIq1+mfdqvIPmTzZs=