diff --git a/.circleci/config.yml b/.circleci/config.yml index 3696dc9..c89a26a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,22 +1,22 @@ -version: 2 +version: 2.1 defaults: &defaults - docker: - - image: cimg/python:3.11.7-browsers + docker: + - image: cimg/python:3.11.7-browsers install_dependency: &install_dependency name: Installation of build and deployment dependencies. command: | - sudo apt update - sudo apt install jq - sudo apt install python3-pip + sudo rm -f /etc/apt/sources.list.d/google-chrome.list || true + sudo apt-get update || true + sudo apt-get install -y jq python3-pip sudo pip3 install awscli --upgrade - # sudo pip3 install docker-compose install_deploysuite: &install_deploysuite name: Installation of install_deploysuite. command: | - git clone --branch v1.4.15 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript + git clone --branch v1.4.19 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript cp ./../buildscript/master_deploy.sh . cp ./../buildscript/buildenv.sh . cp ./../buildscript/awsconfiguration.sh . + cp ./../buildscript/psvar-processor.sh . restore_cache_settings_for_build: &restore_cache_settings_for_build key: docker-node-modules-{{ checksum "package-lock.json" }} @@ -25,25 +25,30 @@ save_cache_settings: &save_cache_settings paths: - node_modules +run_build: &run_build + name: Build of Docker image + command: ./build.sh ${APPNAME} builddeploy_steps: &builddeploy_steps - - checkout - - setup_remote_docker - - run: *install_dependency - - run: *install_deploysuite - - restore_cache: *restore_cache_settings_for_build - - run: ./build.sh ${APPNAME} - - save_cache: *save_cache_settings - - deploy: - name: Running MasterScript. - command: | - ./awsconfiguration.sh $DEPLOY_ENV - source awsenvconf - ./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} -p FARGATE - - + - checkout + - setup_remote_docker + - run: *install_dependency + - run: *install_deploysuite + - restore_cache: *restore_cache_settings_for_build + - run: *run_build + - save_cache: *save_cache_settings + - deploy: + name: Running deployment. + command: | + ./awsconfiguration.sh $DEPLOY_ENV + source awsenvconf + #./buildenv.sh -e DEV -b ${LOGICAL_ENV}-${APPNAME}-deployvar + #source buildenvvar + #./master_deploy.sh -d ECS -e DEV -t latest -s dev-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME} -p FARGATE + #./deploy.sh DEV $CIRCLE_SHA1 + ./psvar-processor.sh -t appenv -p /config/${APPNAME}/deployvar + source deployvar_env + ./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -j /config/${APPNAME}/appvar,/config/common/global-appvar -i ${APPNAME} -p FARGATE jobs: # Build & Deploy against development backend "build-dev": @@ -51,7 +56,7 @@ jobs: environment: DEPLOY_ENV: "DEV" LOGICAL_ENV: "dev" - APPNAME: "taas-es-processor" + APPNAME: "taas-es-processor" steps: *builddeploy_steps "build-qa": @@ -59,15 +64,15 @@ jobs: environment: DEPLOY_ENV: "QA" LOGICAL_ENV: "qa" - APPNAME: "taas-es-processor" + APPNAME: "taas-es-processor" steps: *builddeploy_steps "build-prod": <<: *defaults environment: DEPLOY_ENV: "PROD" - LOGICAL_ENV: "prod" - APPNAME: "taas-es-processor" + LOGICAL_ENV: "prod" + APPNAME: "taas-es-processor" steps: *builddeploy_steps workflows: @@ -76,14 +81,14 @@ workflows: jobs: # Development builds are executed on "develop" branch only. - "build-dev": - context : org-global + context: org-global filters: branches: only: - dev - "build-qa": - context : org-global + context: org-global filters: branches: only: @@ -92,7 +97,7 @@ workflows: # Production builds are exectuted only on tagged commits to the # master branch. - "build-prod": - context : org-global + context: org-global filters: branches: - only: master + only: master \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 2276194..3d5f0e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "lodash": "^4.17.21", "no-kafka": "^3.4.3", "superagent": "^8.1.2", - "tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.4", + "tc-core-library-js": "github:topcoder-platform/tc-core-library-js#v2.6.4", "topcoder-healthcheck-dropin": "^1.0.3", "winston": "^3.3.3" }, @@ -4964,8 +4964,8 @@ } }, "node_modules/tc-core-library-js": { - "version": "2.4.1", - "resolved": "git+ssh://git@github.com/appirio-tech/tc-core-library-js.git#df0b36c51cf80918194cbff777214b3c0cf5a151", + "version": "github:topcoder-platform/tc-core-library-js#df0b36c51cf80918194cbff777214b3c0cf5a151", + "resolved": "git+ssh://git@github.com/topcoder-platform/tc-core-library-js.git#df0b36c51cf80918194cbff777214b3c0cf5a151", "license": "ISC", "dependencies": { "axios": "^0.19.0", @@ -5419,4 +5419,4 @@ "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==" } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index e56bbb1..b23f9a0 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "lodash": "^4.17.21", "no-kafka": "^3.4.3", "superagent": "^8.1.2", - "tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.4", + "tc-core-library-js": "github:topcoder-platform/tc-core-library-js#v2.6.4", "topcoder-healthcheck-dropin": "^1.0.3", "winston": "^3.3.3" }