Skip to content

Commit 751fcaf

Browse files
Merge pull request #62 from topcoder-platform/dev-circleci
Dev circleci
2 parents 5fe4aaf + fbe3324 commit 751fcaf

File tree

1 file changed

+29
-7
lines changed

1 file changed

+29
-7
lines changed

.circleci/config.yml

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
version: 2
1+
version: 2.1
2+
parameters:
3+
run_automatedtesting:
4+
default: false
5+
type: boolean
6+
run_basedeployment:
7+
default: true
8+
type: boolean
29
defaults: &defaults
310
docker:
411
- image: circleci/python:2.7-stretch-browsers
@@ -39,6 +46,16 @@ builddeploy_steps: &builddeploy_steps
3946
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar
4047
source buildenvvar
4148
./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
4259
4360
4461
jobs:
@@ -85,6 +102,7 @@ jobs:
85102
workflows:
86103
version: 2
87104
build:
105+
when: << pipeline.parameters.run_basedeployment >>
88106
jobs:
89107
# Development builds are executed on "develop" branch only.
90108
- "build-dev":
@@ -93,22 +111,26 @@ workflows:
93111
branches:
94112
only:
95113
- develop
114+
- dev-circleci
96115

97-
# Production builds are exectuted only on tagged commits to the
116+
# Production builds are exectuted only on tagged commits to the testing
98117
# master branch.
99118
- "build-prod":
100119
context : org-global
101120
filters:
102121
branches:
103122
only: master
104123

124+
testingflow:
125+
when: << pipeline.parameters.run_automatedtesting >>
126+
jobs:
127+
- Hold [Performance-Testing]:
128+
type: approval
105129
- "Run-Newman-Test":
106-
context : org-global
130+
context : org-global
107131
requires:
108-
- build-dev
109-
- build-prod
132+
- Hold [Performance-Testing]
110133
filters:
111134
branches:
112135
only:
113-
- automated-postman-testing
114-
- develop
136+
- dev-circleci

0 commit comments

Comments
 (0)