diff --git a/.circleci/config.yml b/.circleci/config.yml index 334a941..3640bf5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,11 @@ -version: 2 +version: 2.1 +parameters: + run_automatedtesting: + default: false + type: boolean + run_basedeployment: + default: true + type: boolean defaults: &defaults docker: - image: circleci/python:2.7-stretch-browsers @@ -39,6 +46,16 @@ builddeploy_steps: &builddeploy_steps ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar source buildenvvar ./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME} + #testing code changes + if [[ true ]]; then + ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-qa-v1-appvar + source buildenvvar + curl --request POST \ + --url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \ + --header "Circle-Token: ${QA_USER_TOKEN}" \ + --header 'content-type: application/json' \ + --data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_automatedtesting":true , "run_basedeployment": false}}' + fi jobs: @@ -85,6 +102,7 @@ jobs: workflows: version: 2 build: + when: << pipeline.parameters.run_basedeployment >> jobs: # Development builds are executed on "develop" branch only. - "build-dev": @@ -93,8 +111,9 @@ workflows: branches: only: - develop + - dev-circleci - # Production builds are exectuted only on tagged commits to the + # Production builds are exectuted only on tagged commits to the testing # master branch. - "build-prod": context : org-global @@ -102,13 +121,16 @@ workflows: branches: only: master + testingflow: + when: << pipeline.parameters.run_automatedtesting >> + jobs: + - Hold [Performance-Testing]: + type: approval - "Run-Newman-Test": - context : org-global + context : org-global requires: - - build-dev - - build-prod + - Hold [Performance-Testing] filters: branches: only: - - automated-postman-testing - - develop \ No newline at end of file + - dev-circleci