Skip to content

Commit 134814e

Browse files
committed
ci: deploy to QA
1 parent 4bd2755 commit 134814e

File tree

2 files changed

+34
-8
lines changed

2 files changed

+34
-8
lines changed

.circleci/config.yml

+29-7
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ install_dependency: &install_dependency
1313
install_deploysuite: &install_deploysuite
1414
name: Installation of install_deploysuite.
1515
command: |
16-
git clone --branch v1.4 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
16+
git clone --branch v1.4.14 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
1717
cp ./../buildscript/master_deploy.sh .
1818
cp ./../buildscript/buildenv.sh .
1919
cp ./../buildscript/awsconfiguration.sh .
2020
restore_cache_settings_for_build: &restore_cache_settings_for_build
21-
key: docker-node-modules-{{ checksum "yarn.lock" }}
21+
key: docker-node-modules-{{ checksum "package-lock.json" }}
2222

2323
save_cache_settings: &save_cache_settings
24-
key: docker-node-modules-{{ checksum "yarn.lock" }}
24+
key: docker-node-modules-{{ checksum "package-lock.json" }}
2525
paths:
2626
- node_modules
2727

@@ -31,7 +31,15 @@ builddeploy_steps: &builddeploy_steps
3131
- run: *install_dependency
3232
- run: *install_deploysuite
3333
- restore_cache: *restore_cache_settings_for_build
34-
- run: ./build.sh ${APPNAME}
34+
- run:
35+
name: "Authenticate with CodeArtifact and build docker image"
36+
command: |
37+
./awsconfiguration.sh ${CODEARTIFACT_ENV}
38+
source awsenvconf
39+
aws codeartifact login --tool npm --repository topcoder-framework --domain topcoder --domain-owner $AWS_ACCOUNT_ID --region $AWS_REGION --namespace @topcoder-framework
40+
cp ~/.npmrc .
41+
rm -f awsenvconf
42+
./build.sh ${APPNAME}
3543
- save_cache: *save_cache_settings
3644
- deploy:
3745
name: Running MasterScript.
@@ -41,16 +49,23 @@ builddeploy_steps: &builddeploy_steps
4149
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar
4250
source buildenvvar
4351
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME}
44-
45-
4652
jobs:
4753
# Build & Deploy against development backend
4854
"build-dev":
4955
<<: *defaults
5056
environment:
5157
DEPLOY_ENV: "DEV"
5258
LOGICAL_ENV: "dev"
53-
APPNAME: "challenge-api"
59+
APPNAME: "challenge-api"
60+
steps: *builddeploy_steps
61+
62+
"build-qa":
63+
<<: *defaults
64+
environment:
65+
DEPLOY_ENV: "QA"
66+
LOGICAL_ENV: "qa"
67+
APPNAME: "challenge-api"
68+
CODEARTIFACT_ENV: "PROD"
5469
steps: *builddeploy_steps
5570

5671
"build-prod":
@@ -73,6 +88,13 @@ workflows:
7388
only:
7489
- dev
7590

91+
- "build-qa":
92+
context : org-global
93+
filters:
94+
branches:
95+
only:
96+
- refactor/domain-challenge
97+
7698
# Production builds are exectuted only on tagged commits to the
7799
# master branch.
78100
- "build-prod":

config/default.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ module.exports = {
7878
CLIENT_MANAGER_ROLE_ID: process.env.OBSERVER_ROLE_ID || "9b2f1905-8128-42da-85df-ed64410f4781",
7979

8080
// topgear billing accounts
81-
TOPGEAR_BILLING_ACCOUNTS_ID: process.env.TOPGEAR_BILLING_ACCOUNTS_ID ? process.env.TOPGEAR_BILLING_ACCOUNTS_ID.split(',') : [],
81+
TOPGEAR_BILLING_ACCOUNTS_ID: process.env.TOPGEAR_BILLING_ACCOUNTS_ID
82+
? process.env.TOPGEAR_BILLING_ACCOUNTS_ID.split(",")
83+
: [],
8284

8385
// health check timeout in milliseconds
8486
HEALTH_CHECK_TIMEOUT: process.env.HEALTH_CHECK_TIMEOUT || 3000,
@@ -122,4 +124,6 @@ module.exports = {
122124
ZENDESK_CUSTOM_FIELD_TAG_ID: process.env.ZENDESK_CUSTOM_FIELD_TAG_ID,
123125
ZENDESK_DEFAULT_PRIORITY: process.env.ZENDESK_DEFAULT_PRIORITY || "high",
124126
INTERNAL_CACHE_TTL: process.env.INTERNAL_CACHE_TTL || 1800,
127+
GRPC_CHALLENGE_SERVER_HOST: process.env.GRPC_DOMAIN_CHALLENGE_SERVER_HOST || "localhost",
128+
GRPC_CHALLENGE_SERVER_PORT: process.env.GRPC_DOMAIN_CHALLENGE_SERVER_PORT || 8888,
125129
};

0 commit comments

Comments
 (0)