Skip to content

Commit 2701fe5

Browse files
authored
Merge pull request #120 from topcoder-platform/develop
feat: scroll search
2 parents bde163d + 7adb853 commit 2701fe5

File tree

3 files changed

+193
-7272
lines changed

3 files changed

+193
-7272
lines changed

.circleci/config.yml

+74-90
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ parameters:
77
default: true
88
type: boolean
99
defaults: &defaults
10-
docker:
11-
- image: circleci/python:2.7-stretch-browsers
10+
docker:
11+
- image: circleci/python:2.7-stretch-browsers
1212
install_dependency: &install_dependency
1313
name: Installation of build and deployment dependencies.
1414
command: |
@@ -28,120 +28,104 @@ restore_cache_settings_for_build: &restore_cache_settings_for_build
2828
save_cache_settings: &save_cache_settings
2929
key: docker-node-modules-{{ checksum "package-lock.json" }}
3030
paths:
31-
- node_modules
31+
- node_modules
3232

3333
builddeploy_steps: &builddeploy_steps
34-
- checkout
35-
- setup_remote_docker
36-
- run: *install_dependency
37-
- run: *install_deploysuite
38-
- restore_cache: *restore_cache_settings_for_build
39-
- run: ./build.sh ${APPNAME}
40-
- save_cache: *save_cache_settings
41-
- deploy:
42-
name: Running MasterScript.
43-
command: |
44-
./awsconfiguration.sh $DEPLOY_ENV
45-
source awsenvconf
46-
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar
47-
source buildenvvar
48-
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME}
49-
#testing code changes
50-
if [[ true ]]; then
51-
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-qa-v1-appvar
52-
source buildenvvar
53-
curl --request POST \
54-
--url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \
55-
--header "Circle-Token: ${QA_USER_TOKEN}" \
56-
--header 'content-type: application/json' \
57-
--data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_automatedtesting":true , "run_basedeployment": false}}'
58-
fi
59-
60-
34+
- checkout
35+
- setup_remote_docker
36+
- run: *install_dependency
37+
- run: *install_deploysuite
38+
- restore_cache: *restore_cache_settings_for_build
39+
- run: ./build.sh ${APPNAME}
40+
- save_cache: *save_cache_settings
41+
- deploy:
42+
name: Running MasterScript.
43+
command: "./awsconfiguration.sh $DEPLOY_ENV\nsource awsenvconf\n./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar\nsource buildenvvar\n./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME}\n#testing code changes\nif [[ true ]]; then\n ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-qa-v1-appvar\n source buildenvvar \n curl --request POST \\\n --url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \\\n --header \"Circle-Token: ${QA_USER_TOKEN}\" \\\n --header 'content-type: application/json' \\\n --data '{\"branch\":\"'\"$CIRCLE_BRANCH\"'\",\"parameters\":{\"run_automatedtesting\":true , \"run_basedeployment\": false}}'\nfi \n #magic___^_^___line\n #magic___^_^___line\n"
6144
jobs:
6245
# Build & Deploy against development backend
6346
"build-dev":
64-
<<: *defaults
47+
!!merge <<: *defaults
6548
environment:
6649
DEPLOY_ENV: "DEV"
6750
LOGICAL_ENV: "dev"
68-
APPNAME: "resources-api"
51+
APPNAME: "resources-api"
6952
steps: *builddeploy_steps
7053

7154
"build-prod":
72-
<<: *defaults
55+
!!merge <<: *defaults
7356
environment:
7457
DEPLOY_ENV: "PROD"
75-
LOGICAL_ENV: "prod"
76-
APPNAME: "resources-api"
58+
LOGICAL_ENV: "prod"
59+
APPNAME: "resources-api"
7760
steps: *builddeploy_steps
7861

7962
"Run-Newman-Test":
8063
docker:
81-
- image: circleci/node:12
82-
environment:
83-
DEPLOY_ENV: "DEV"
84-
LOGICAL_ENV: "dev"
85-
APPNAME: "resources-api"
86-
- image: tray/dynamodb-local
87-
command: "-inMemory -port 7777"
88-
- image: elasticsearch:6.8.13
89-
environment:
90-
discovery.type: "single-node"
64+
- image: circleci/node:12
65+
environment:
66+
DEPLOY_ENV: "DEV"
67+
LOGICAL_ENV: "dev"
68+
APPNAME: "resources-api"
69+
- image: tray/dynamodb-local
70+
command: "-inMemory -port 7777"
71+
- image: elasticsearch:6.8.13
72+
environment:
73+
discovery.type: "single-node"
9174
steps:
92-
- checkout
93-
- setup_remote_docker
94-
- run: *install_dependency
95-
- run: *install_deploysuite
96-
- run:
97-
name: 'newman test'
98-
command: |
99-
./awsconfiguration.sh $DEPLOY_ENV
100-
source awsenvconf
101-
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-qa-appvar
102-
source buildenvvar
103-
npm i
104-
cd mock
105-
(npm run mock-challenge-api&)
106-
(NODE_ENV=test npm start&)
107-
npm run test:newman:clear
108-
npm run test:newman
109-
npm run test:newman:clear
110-
- store_artifacts:
111-
path: ./newman
75+
- checkout
76+
- setup_remote_docker
77+
- run: *install_dependency
78+
- run: *install_deploysuite
79+
- run:
80+
name: 'newman test'
81+
command: |
82+
./awsconfiguration.sh $DEPLOY_ENV
83+
source awsenvconf
84+
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-qa-appvar
85+
source buildenvvar
86+
npm i
87+
cd mock
88+
(npm run mock-challenge-api&)
89+
(NODE_ENV=test npm start&)
90+
npm run test:newman:clear
91+
npm run test:newman
92+
npm run test:newman:clear
93+
- store_artifacts:
94+
path: ./newman
11295

11396
workflows:
11497
version: 2
11598
build:
11699
when: << pipeline.parameters.run_basedeployment >>
117100
jobs:
118-
# Development builds are executed on "develop" branch only.
119-
- "build-dev":
120-
context : org-global
121-
filters:
122-
branches:
123-
only:
124-
- develop
101+
# Development builds are executed on "develop" branch only.
102+
- "build-dev":
103+
context: org-global
104+
filters:
105+
branches:
106+
only:
107+
- develop
108+
- feature/scroll-search
125109

126-
# Production builds are exectuted only on tagged commits to the testing
127-
# master branch.
128-
- "build-prod":
129-
context : org-global
130-
filters:
131-
branches:
132-
only: master
110+
# Production builds are exectuted only on tagged commits to the testing
111+
# master branch.
112+
- "build-prod":
113+
context: org-global
114+
filters:
115+
branches:
116+
only: master
133117

134118
testingflow:
135119
when: << pipeline.parameters.run_automatedtesting >>
136120
jobs:
137-
- Hold [Performance-Testing]:
138-
type: approval
139-
- "Run-Newman-Test":
140-
context : org-global
141-
requires:
142-
- Hold [Performance-Testing]
143-
filters:
144-
branches:
145-
only:
146-
- develop
147-
- dev-circleci
121+
- Hold [Performance-Testing]:
122+
type: approval
123+
- "Run-Newman-Test":
124+
context: org-global
125+
requires:
126+
- Hold [Performance-Testing]
127+
filters:
128+
branches:
129+
only:
130+
- develop
131+
- dev-circleci

0 commit comments

Comments
 (0)