This repository has been archived by the owner on Jan 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy path.travis.yml
142 lines (123 loc) · 4.45 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
os: linux
dist: xenial
language: java
jdk: openjdk11
git:
depth: false
quiet: true
services:
- docker
import:
- Alfresco/alfresco-process-tools:.travis.kubernetes_install.yml@master
- Alfresco/alfresco-process-tools:.travis.helm_install.yml@master
cache:
directories:
- $HOME/.m2
# the cache can grow constantly
before_cache:
- rm -rf $HOME/.m2/repository/org/alfresco/alfresco-share*
- rm -rf $HOME/.m2/repository/org/alfresco/share*
- rm -rf $HOME/.m2/repository/org/alfresco/alfresco-content-services-share-*
- rm -rf $HOME/.m2/repository/org/alfresco/alfresco-wcmqs*
branches:
only:
- master
- develop
- /^SP\/.+$/
- /.*\/APPS-.*$/
env:
global:
- REPO_TAG_NAME=7.0.0-A30
- SHARE_TAG_NAME=latest
- SYNC_TAG_NAME=3.4.0-A1
# Release version has to start with real version (7.0.0-....) for the docker image to build successfully.
- RELEASE_VERSION=7.0.0
- DEVELOPMENT_VERSION=7.0.1-SNAPSHOT
- HOSTED_ZONE=dev.alfresco.me
- KEEP_ENV=false
stages:
- build
- deploy
- wait
- tests
- tearDown
- release
- company_release
before_install:
- |
pip install --upgrade awscli
curl -o aws-iam-authenticator https://amazon-eks.s3.us-west-2.amazonaws.com/1.16.8/2020-04-16/bin/linux/amd64/aws-iam-authenticator
curl -o aws-iam-authenticator.sha256 https://amazon-eks.s3.us-west-2.amazonaws.com/1.16.8/2020-04-16/bin/linux/amd64/aws-iam-authenticator.sha256
openssl sha1 -sha256 aws-iam-authenticator
chmod +x ./aws-iam-authenticator
mkdir -p $HOME/bin && cp ./aws-iam-authenticator $HOME/bin/aws-iam-authenticator && export PATH=$PATH:$HOME/bin
export PATH=$PATH:$HOME/bin
aws eks update-kubeconfig --name appsTeam --region=eu-west-1
jobs:
include:
- name: "Build and Test"
stage: build
if: commit_message !~ /\[trigger company release|release\]/
before_install: bash _ci/init.sh
script: bash _ci/build.sh
# - name: "White Source"
# stage: build
# # only on SP branches or master and if it is not a PR
# if: fork = false AND (branch = develop OR branch =~ /support\/SP\/.*/ OR branch =~ /.*\/APPS-.*$/) AND type != pull_request
# before_install: bash _ci/init.sh
# script: travis_wait 30 bash _ci/whitesource.sh _ci/.wss-unified-agent.config
- name: "Source Clear Scan (SCA)"
stage: build
# only on SP branches or master and if it is not a PR
if: fork = false AND (branch = develop OR branch =~ /support\/SP\/.*/ OR branch =~ /.*\/APPS-.*$/) AND type != pull_request
before_install: bash _ci/init.sh
# Run Veracode
install: skip
script: travis_wait 30 bash _ci/source_clear.sh
- name: "Deploy on K8s"
stage: deploy
if: commit_message !~ /\[trigger company release|skip tests\]/
install: skip
script: bash _ci/deploy_k8s.sh
- &test-staging
name: "User and Authentication Tests"
stage: tests
jdk: openjdk11
if: fork=false AND commit_message !~ /\[trigger company release|skip tests\]/
before_install: bash _ci/init.sh
install: skip
script:
- bash _ci/execute_share_web.sh "user-tests.xml"
addons:
chrome: stable
artifacts:
paths:
- alfresco-tas-share-test/target/surefire-reports
- alfresco-tas-share-test/target/reports
target_paths: $TRAVIS_BUILD_NUMBER
- <<: *test-staging
name: "User and Site Dashboard Tests"
script: bash _ci/execute_share_web.sh "user-and-site-dashboard-tests.xml"
- <<: *test-staging
name: "Admin Tools Tests"
script: bash _ci/execute_share_web.sh "admin-tools-tests.xml"
- <<: *test-staging
name: "Content Tests"
script: bash _ci/execute_share_web.sh "content-tests.xml"
- name: "Delete environment"
stage: tearDown
if: commit_message !~ /\[trigger company release|skip tests\]/
install: skip
script: bash _ci/delete-env.sh
- name: "Release"
stage: release
if: fork=false AND commit_message =~ /\[release\]/ AND branch =~ /(master|develop|SP\/.+|HF\/.+)$/
before_install: bash _ci/init_tag.sh
script: travis_wait 30 _ci/maven_release.sh
- name: "Company Release"
stage: company_release
if: fork=false AND commit_message =~ /\[trigger company release\]/ AND branch =~ /(master|SP\/.+|HF\/.+)$/
before_install:
- bash _ci/init.sh
- bash _ci/init_tag.sh
script: travis_wait 30 _ci/company-release.sh