This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 10 files changed +67
-28
lines changed Expand file tree Collapse file tree 10 files changed +67
-28
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,17 @@ builddeploy_steps: &builddeploy_steps
28
28
- setup_remote_docker
29
29
- run : *install_dependency
30
30
- run : *install_deploysuite
31
- - restore_cache : *restore_cache_settings_for_build
32
- - run : ./build.sh ${APPNAME}
33
- - save_cache : *save_cache_settings
31
+ # - restore_cache: *restore_cache_settings_for_build
32
+ - run :
33
+ command : |
34
+ ./awsconfiguration.sh $DEPLOY_ENV
35
+ source awsenvconf
36
+ ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar
37
+ - run :
38
+ command : |
39
+ source buildenvvar
40
+ ./build.sh ${APPNAME}
41
+ # - save_cache: *save_cache_settings
34
42
- deploy :
35
43
name : Running MasterScript.
36
44
command : |
@@ -40,6 +48,12 @@ builddeploy_steps: &builddeploy_steps
40
48
source buildenvvar
41
49
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME}
42
50
51
+ #For mock server
52
+ echo "Running Masterscript - For mock server"
53
+ ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-mock-${APPNAME}-deployvar
54
+ source buildenvvar
55
+ ./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-mock-${APPNAME}-appvar -i mock-${APPNAME}
56
+
43
57
jobs :
44
58
# Build & Deploy against development backend
45
59
" build-dev " :
@@ -69,6 +83,7 @@ workflows:
69
83
branches :
70
84
only :
71
85
- dev
86
+ - devverify
72
87
73
88
# Production builds are exectuted only on tagged commits to the
74
89
# master branch.
Original file line number Diff line number Diff line change @@ -3,22 +3,26 @@ set -eo pipefail
3
3
APP_NAME=$1
4
4
UPDATE_CACHE=" "
5
5
6
- docker build -f docker/Dockerfile -t $APP_NAME :latest .
6
+ docker build -f docker/Dockerfile -t $APP_NAME :latest \
7
+ --build-arg APPMODE=$APPMODE \
8
+ --build-arg APPENV=$APPENV .
7
9
8
- docker create --name app $APP_NAME :latest
10
+ docker build -f docker/mockDockerfile -t mock- $APP_NAME :latest .
9
11
10
- if [ -d node_modules ]
11
- then
12
- mv package-lock.json old-package-lock.json
13
- docker cp app:/$APP_NAME /package-lock.json package-lock.json
14
- set +eo pipefail
15
- UPDATE_CACHE=$( cmp package-lock.json old-package-lock.json)
16
- set -eo pipefail
17
- else
18
- UPDATE_CACHE=1
19
- fi
12
+ # docker create --name app $APP_NAME:latest
20
13
21
- if [ " $UPDATE_CACHE " == 1 ]
22
- then
23
- docker cp app:/$APP_NAME /node_modules .
24
- fi
14
+ # if [ -d node_modules ]
15
+ # then
16
+ # mv package-lock.json old-package-lock.json
17
+ # docker cp app:/$APP_NAME/package-lock.json package-lock.json
18
+ # set +eo pipefail
19
+ # UPDATE_CACHE=$(cmp package-lock.json old-package-lock.json)
20
+ # set -eo pipefail
21
+ # else
22
+ # UPDATE_CACHE=1
23
+ # fi
24
+
25
+ # if [ "$UPDATE_CACHE" == 1 ]
26
+ # then
27
+ # docker cp app:/$APP_NAME/node_modules .
28
+ # fi
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ module.exports = {
7
7
/**
8
8
* Topcoder Teams Service base URL
9
9
*/
10
- TC_TEAMS_SERVICE_URL : "http ://localhost:8502 " ,
10
+ TC_TEAMS_SERVICE_URL : "https ://api.topcoder-dev.com/taasmock " ,
11
11
12
12
/**
13
13
* URL of Topcoder Community Website
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ module.exports = {
7
7
/**
8
8
* Topcoder Teams Service base URL
9
9
*/
10
- TC_TEAMS_SERVICE_URL : "http://localhost:8502" ,
10
+ TC_TEAMS_SERVICE_URL : "http://localhost:8502/taasmock " ,
11
11
12
12
/**
13
13
* URL of Topcoder Community Website
Original file line number Diff line number Diff line change 1
1
# Use the base image with Node.js
2
2
FROM node:latest
3
3
4
+ ARG APPMODE
5
+ ARG APPENV
6
+
7
+ ENV APPMODE=$APPMODE
8
+ ENV APPENV=$APPENV
9
+
4
10
# Copy the current directory into the Docker image
5
- COPY . /micro-frontends-teams
11
+ COPY . /taas-app
6
12
7
13
# Set working directory for future use
8
- WORKDIR /micro-frontends-teams
14
+ WORKDIR /taas-app
9
15
10
16
# Install the dependencies from package.json
11
17
RUN npm install
Original file line number Diff line number Diff line change 1
1
version : ' 3'
2
2
services :
3
- micro-frontends-teams :
4
- image : micro-frontends-teams :latest
3
+ taas-app :
4
+ image : taas-app :latest
5
5
build :
6
6
context : ../
7
7
dockerfile : docker/Dockerfile
Original file line number Diff line number Diff line change
1
+ # Use the base image with Node.js
2
+ FROM node:latest
3
+
4
+ # Copy the current directory into the Docker image
5
+ COPY . /taas-app
6
+
7
+ # Set working directory for future use
8
+ WORKDIR /taas-app/local/mock-server
9
+
10
+ # Install the dependencies from package.json
11
+
12
+ RUN npm install
13
+
14
+ CMD npm start
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ router.render = (req, res) => {
45
45
}
46
46
} ;
47
47
48
- server . use ( router ) ;
48
+ server . use ( '/taasmock' , router ) ;
49
49
50
50
server . listen ( PORT , ( ) => {
51
51
console . log ( `JSON Server is running on port ${ PORT } ` ) ; // eslint-disable-line no-console
Original file line number Diff line number Diff line change 4
4
"start" : " node server.js" ,
5
5
"dev" : " webpack-dev-server --port 8501 --host 0.0.0.0" ,
6
6
"dev-https" : " webpack-dev-server --https --port 8501 --host 0.0.0.0" ,
7
- "build" : " webpack --mode=production " ,
7
+ "build" : " webpack --mode=${APPMODE:-development} --env.config=${APPENV:-dev} " ,
8
8
"analyze" : " webpack --mode=production --env.analyze=true" ,
9
9
"lint" : " eslint src --ext js" ,
10
10
"format" : " prettier --write \" ./**\" " ,
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ const express = require("express");
4
4
5
5
const app = express ( ) ;
6
6
7
- app . use ( '/react ' ,
7
+ app . use ( '/taas-app ' ,
8
8
express . static ( "./dist" , {
9
9
setHeaders : function setHeaders ( res ) {
10
10
res . header ( "Access-Control-Allow-Origin" , "*" ) ;
You can’t perform that action at this time.
0 commit comments