Skip to content

Commit 91fa77f

Browse files
committed
Circle Ci changes integration
1 parent ba66e46 commit 91fa77f

File tree

2 files changed

+96
-1
lines changed

2 files changed

+96
-1
lines changed

.circleci/config.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
version: 2.1
2+
defaults: &defaults
3+
docker:
4+
- image: cimg/python:3.13.5-browsers
5+
install_dependency: &install_dependency
6+
name: Installation of build and deployment dependencies.
7+
command: |
8+
pip3 install awscli --upgrade
9+
install_deploysuite: &install_deploysuite
10+
name: Installation of install_deploysuite.
11+
command: |
12+
git clone --branch v1.4.17 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
13+
cp ./../buildscript/master_deploy.sh .
14+
cp ./../buildscript/buildenv.sh .
15+
cp ./../buildscript/awsconfiguration.sh .
16+
cp ./../buildscript/psvar-processor.sh .
17+
18+
restore_cache_settings_for_build: &restore_cache_settings_for_build
19+
key: docker-node-modules-{{ checksum "pnpm-lock.yaml" }}
20+
21+
save_cache_settings: &save_cache_settings
22+
key: docker-node-modules-{{ checksum "pnpm-lock.yaml" }}
23+
paths:
24+
- node_modules
25+
26+
27+
builddeploy_steps: &builddeploy_steps
28+
- checkout
29+
- setup_remote_docker
30+
- run: *install_dependency
31+
- run: *install_deploysuite
32+
- restore_cache: *restore_cache_settings_for_build
33+
- run:
34+
name: "Build docker image"
35+
command: |
36+
./build.sh
37+
- save_cache: *save_cache_settings
38+
- deploy:
39+
name: Running MasterScript.
40+
command: |
41+
./awsconfiguration.sh $DEPLOY_ENV
42+
source awsenvconf
43+
./psvar-processor.sh -t appenv -p /config/${APPNAME}/deployvar
44+
source deployvar_env
45+
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -j /config/${APPNAME}/appvar -i ${APPNAME} -p FARGATE
46+
jobs:
47+
# Build & Deploy against development backend
48+
"build-dev":
49+
!!merge <<: *defaults
50+
environment:
51+
DEPLOY_ENV: "DEV"
52+
LOGICAL_ENV: "dev"
53+
APPNAME: "tc-mcp"
54+
steps: *builddeploy_steps
55+
56+
"build-qa":
57+
!!merge <<: *defaults
58+
environment:
59+
DEPLOY_ENV: "QA"
60+
LOGICAL_ENV: "qa"
61+
APPNAME: "tc-mcp"
62+
steps: *builddeploy_steps
63+
64+
"build-prod":
65+
!!merge <<: *defaults
66+
environment:
67+
DEPLOY_ENV: "PROD"
68+
LOGICAL_ENV: "prod"
69+
APPNAME: "tc-mcp"
70+
steps: *builddeploy_steps
71+
72+
workflows:
73+
version: 2
74+
build:
75+
jobs:
76+
# Development builds are executed on "develop" branch only.
77+
- "build-dev":
78+
context: org-global
79+
filters:
80+
branches:
81+
only:
82+
- dev
83+
84+
- "build-qa":
85+
context: org-global
86+
filters:
87+
branches:
88+
only:
89+
- qa
90+
91+
- "build-prod":
92+
context: org-global
93+
filters:
94+
branches:
95+
only: master

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22
set -eo pipefail
3-
docker buildx build --no-cache=true -t ${APPNAME}}:latest .
3+
docker buildx build --no-cache=true -t ${APPNAME}:latest .

0 commit comments

Comments
 (0)