Skip to content

Commit f869d9e

Browse files
Merge pull request #5550 from topcoder-platform/develop
Release v1.9.4
2 parents a663404 + a76f8f8 commit f869d9e

File tree

14 files changed

+10284
-253
lines changed

14 files changed

+10284
-253
lines changed

.circleci/config.yml

Lines changed: 116 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
version: 2.1
2+
parameters:
3+
run_basedeployment:
4+
default: true
5+
type: boolean
6+
run_smoketesting:
7+
default: false
8+
type: boolean
9+
run_performancetesting:
10+
default: false
11+
type: boolean
212

313
defaults: &defaults
414
docker:
@@ -37,7 +47,7 @@ build_docker_image: &build_docker_image
3747
./build.sh
3848
jobs:
3949
# Build & Deploy against development backend
40-
"build-dev":
50+
deployDev:
4151
<<: *defaults
4252
steps:
4353
# Initialization.
@@ -63,9 +73,8 @@ jobs:
6373
source awsenvconf
6474
source buildenvvar
6575
./master_deploy.sh -d ECS -e DEV -t latest -s dev_communityapp_taskvar -i communityapp
66-
6776
# Build & Deploy against testing backend
68-
"build-test":
77+
deployTest:
6978
<<: *defaults
7079
steps:
7180
# Initialization.
@@ -91,9 +100,8 @@ jobs:
91100
source awsenvconf
92101
source buildenvvar
93102
./master_deploy.sh -d ECS -e DEV -t latest -s test_communityapp_taskvar -i communityapp
94-
95103
# Build & Deploy against testing backend
96-
"build-qa":
104+
deployQA:
97105
<<: *defaults
98106
steps:
99107
# Initialization.
@@ -119,9 +127,8 @@ jobs:
119127
source awsenvconf
120128
source buildenvvar
121129
./master_deploy.sh -d ECS -e DEV -t latest -s qa_communityapp_taskvar -i communityapp
122-
123130
# Build & Deploy against prod api backend
124-
"build-prod-beta":
131+
deployBeta:
125132
<<: *defaults
126133
steps:
127134
# Initialization.
@@ -149,7 +156,7 @@ jobs:
149156
./master_deploy.sh -d ECS -e PROD -t latest -s beta_communityapp_taskvar, -i communityapp
150157
151158
# Build & Deploy against prod api backend
152-
"build-prod-staging":
159+
deployStag:
153160
<<: *defaults
154161
steps:
155162
# Initialization.
@@ -174,10 +181,15 @@ jobs:
174181
command: |
175182
source awsenvconf
176183
source buildenvvar
177-
./master_deploy.sh -d ECS -e PROD -t latest -s staging_communityapp_taskvar, -i communityapp
178-
184+
./master_deploy.sh -d ECS -e PROD -t latest -s staging_communityapp_taskvar, -i communityapp
185+
curl --request POST \
186+
--url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \
187+
--header "Circle-Token: ${CIRCLE_TOKEN}" \
188+
--header 'content-type: application/json' \
189+
--data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_smoketesting":true , "run_performancetesting":false, "run_basedeployment": false}}'
190+
179191
# Build & Deploy against production backend
180-
"build-prod":
192+
deployProd:
181193
<<: *defaults
182194
steps:
183195
# Initialization.
@@ -203,8 +215,12 @@ jobs:
203215
source awsenvconf
204216
source buildenvvar
205217
./master_deploy.sh -d ECS -e PROD -t latest -s prod_communityapp_taskvar -i communityapp
206-
207-
"smoke-test-on-staging":
218+
curl --request POST \
219+
--url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \
220+
--header "Circle-Token: ${CIRCLE_TOKEN}" \
221+
--header 'content-type: application/json' \
222+
--data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_smoketesting":true , "run_performancetesting":false, "run_basedeployment": false}}'
223+
Smoke-Testing-On-Staging:
208224
<<: *defaults
209225
steps:
210226
# Initialization.
@@ -221,12 +237,14 @@ jobs:
221237
./buildenv.sh -e PROD -b staging_communityapp_buildvar,staging_communityapp_deployvar
222238
- run:
223239
name: "Run automation"
240+
no_output_timeout: 20m
224241
command: |
225242
source awsenvconf
226243
source buildenvvar
227244
./automated-smoke-test/smoketest.sh automation-config-staging.json prod
228-
229-
"smoke-test-on-production":
245+
- store_artifacts:
246+
path: /automated-smoke-test/test-results
247+
Smoke-Testing-On-Production:
230248
<<: *defaults
231249
steps:
232250
# Initialization.
@@ -243,11 +261,11 @@ jobs:
243261
./buildenv.sh -e PROD -b prod_communityapp_buildvar,prod_communityapp_deployvar
244262
- run:
245263
name: "Run automation"
264+
no_output_timeout: 20m
246265
command: |
247266
source awsenvconf
248267
source buildenvvar
249268
./automated-smoke-test/smoketest.sh automation-config-prod.json prod
250-
251269
# Test job for the cases when we do not need deployment. It just rapidly
252270
# installs (updates) app dependencies, and runs tests (ESLint, Stylelint,
253271
# Jest unit-tests).
@@ -264,78 +282,137 @@ jobs:
264282
paths:
265283
- node_modules
266284
- run: npm test
285+
286+
Performance-Testing:
287+
docker:
288+
# specify the version you desire here
289+
- image: circleci/openjdk:8-jdk
290+
291+
# Specify service dependencies here if necessary
292+
# CircleCI maintains a library of pre-built images
293+
# documented at https://circleci.com/docs/2.0/circleci-images/
294+
# - image: circleci/postgres:9.4
295+
296+
working_directory: ~/repo
297+
298+
environment:
299+
# Customize the JVM maximum heap limit
300+
MAVEN_OPTS: -Xmx3200m
301+
302+
steps:
303+
- checkout
267304

305+
# Download and cache dependencies
306+
- restore_cache:
307+
keys:
308+
- v1-dependencies-{{ checksum "pom.xml" }}
309+
# fallback to using the latest cache if no exact match is found
310+
- v1-dependencies-
311+
312+
- run: mvn dependency:go-offline
313+
314+
- save_cache:
315+
paths:
316+
- ~/.m2
317+
key: v1-dependencies-{{ checksum "pom.xml" }}
318+
319+
- run: mvn verify
320+
321+
- store_artifacts:
322+
path: target/jmeter/reports
323+
268324
workflows:
269325
version: 2
270-
build:
326+
Build:
327+
when: << pipeline.parameters.run_basedeployment >>
271328
jobs:
272329
# Development builds are executed on "new-develop" branch only.
273-
- "build-dev":
330+
- deployDev:
274331
context : org-global
275332
filters:
276333
branches:
277334
only:
278335
- develop
279336
# This is alternate dev env for parallel testing
280-
- "build-test":
337+
- deployTest:
281338
context : org-global
282339
filters:
283340
branches:
284341
only:
285342
- free
286343
# This is alternate dev env for parallel testing
287-
- "build-qa":
344+
- deployQA:
288345
context : org-global
289346
filters:
290347
branches:
291348
only:
292349
- free
293350
# This is beta env for production soft releases
294-
- "build-prod-beta":
351+
- deployBeta:
295352
context : org-global
296353
filters:
297354
branches:
298355
only:
299356
- free
300357
# This is stage env for production QA releases
301-
- "build-prod-staging":
358+
- deployStag:
302359
context : org-global
303360
filters:
304361
branches:
305362
only:
306363
- develop
307-
- "approve-smoke-test-on-staging":
308-
type: approval
309-
requires:
310-
- build-prod-staging
311-
- "smoke-test-on-staging":
312-
context : org-global
313-
requires:
314-
- approve-smoke-test-on-staging
315364
# Production builds are exectuted
316365
# when PR is merged to the master
317366
# Don't change anything in this configuration
318367
# That might trigger wrong branch to be
319368
# deployed on the production
320369
# master branch.
321-
- "build-prod":
370+
- deployProd:
322371
context : org-global
323372
filters:
324373
branches:
325374
only:
326375
- master
327-
- "approve-smoke-test-on-production":
328-
type: approval
329-
requires:
330-
- build-prod
331-
- "smoke-test-on-production":
332-
context : org-global
333-
requires:
334-
- approve-smoke-test-on-production
335376
# Simple testing is executed for any branch other than "develop" and
336377
# "master".
337378
- test:
338379
filters:
339380
branches:
340381
ignore:
341382
- develop
383+
384+
Smoke Testing:
385+
when: << pipeline.parameters.run_smoketesting >>
386+
jobs:
387+
- Hold [Smoke-Testing]:
388+
type: approval
389+
- Smoke-Testing-On-Staging:
390+
context : org-global
391+
requires:
392+
- Hold [Smoke-Testing]
393+
filters:
394+
branches:
395+
only:
396+
- develop
397+
- Smoke-Testing-On-Production:
398+
context : org-global
399+
requires:
400+
- Hold [Smoke-Testing]
401+
filters:
402+
branches:
403+
only:
404+
- master
405+
406+
Performance Testing:
407+
when: << pipeline.parameters.run_performancetesting >>
408+
jobs:
409+
- Hold [Performance-Testing]:
410+
type: approval
411+
- Performance-Testing:
412+
requires:
413+
- Hold [Performance-Testing]
414+
filters:
415+
branches:
416+
only:
417+
- master
418+
- develop

0 commit comments

Comments
 (0)