@@ -13,15 +13,15 @@ install_dependency: &install_dependency
13
13
install_deploysuite : &install_deploysuite
14
14
name : Installation of install_deploysuite.
15
15
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
17
17
cp ./../buildscript/master_deploy.sh .
18
18
cp ./../buildscript/buildenv.sh .
19
19
cp ./../buildscript/awsconfiguration.sh .
20
20
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 " }}
22
22
23
23
save_cache_settings : &save_cache_settings
24
- key : docker-node-modules-{{ checksum "yarn. lock" }}
24
+ key : docker-node-modules-{{ checksum "package- lock.json " }}
25
25
paths :
26
26
- node_modules
27
27
@@ -31,7 +31,15 @@ builddeploy_steps: &builddeploy_steps
31
31
- run : *install_dependency
32
32
- run : *install_deploysuite
33
33
- 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}
35
43
- save_cache : *save_cache_settings
36
44
- deploy :
37
45
name : Running MasterScript.
@@ -41,16 +49,23 @@ builddeploy_steps: &builddeploy_steps
41
49
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar
42
50
source buildenvvar
43
51
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME}
44
-
45
-
46
52
jobs :
47
53
# Build & Deploy against development backend
48
54
" build-dev " :
49
55
<< : *defaults
50
56
environment :
51
57
DEPLOY_ENV : " DEV"
52
58
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"
54
69
steps : *builddeploy_steps
55
70
56
71
" build-prod " :
@@ -73,6 +88,13 @@ workflows:
73
88
only :
74
89
- dev
75
90
91
+ - " build-qa " :
92
+ context : org-global
93
+ filters :
94
+ branches :
95
+ only :
96
+ - refactor/domain-challenge
97
+
76
98
# Production builds are exectuted only on tagged commits to the
77
99
# master branch.
78
100
- " build-prod " :
0 commit comments