This repository was archived by the owner on Mar 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathconfig.yml
105 lines (102 loc) · 3.18 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
version: 2
defaults: &defaults
docker:
- image: node:5.10.1
install_dependency: &install_dependency
name: Installation of build and deployment dependencies.
command: |
set +e
apt-get update -y
apt-get install g++-4.8 -y
apt install awscli -y
apt install jq -y
chmod 777 /etc/mime.types
sed -i 's/^application\/x-font-woff.*/application\/font-woff\t\t\t\twoff/' /etc/mime.types
sed -i 's/^image\/vnd.microsoft.icon.*/image\/vnd.microsoft.icon/' /etc/mime.types
sed -i 's/^image\/x-icon.*/image\/x-icon\t\t\t\tico/' /etc/mime.types
install_deploysuite: &install_deploysuite
name: Installation of install_deploysuite.
command: |
git clone --branch v1.4 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
cp ./../buildscript/master_deploy.sh .
cp ./../buildscript/buildenv.sh .
cp ./../buildscript/awsconfiguration.sh .
restore_cache_settings_for_build: &restore_cache_settings_for_build
key: ac-node-modules-{{ checksum "package.json" }}
save_cache_settings: &save_cache_settings
key: ac-node-modules-{{ checksum "package.json" }}
paths:
- node_modules
running_npm_build: &running_npm_build
name: Running Npm Build
command: |
source buildenvvar
npm rebuild node-sass
npm run build
npm run build-connector
npm test
builddeploy_steps: &builddeploy_steps
- checkout
- setup_remote_docker
- run: *install_dependency
- run: *install_deploysuite
- restore_cache: *restore_cache_settings_for_build
- run: npm install
- save_cache: *save_cache_settings
- run:
name: "configuring environment"
command: |
./awsconfiguration.sh $DEPLOY_ENV
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar
- run: *running_npm_build
- deploy:
name: Running MasterScript.
command: |
# ./deploy.sh $DEPLOY_ENV
# ./awsconfiguration.sh $DEPLOY_ENV
source awsenvconf
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar
source buildenvvar
./master_deploy.sh -d CFRONT -e $DEPLOY_ENV -c true
jobs:
# Build & Deploy against development backend
"build-dev":
<<: *defaults
environment:
DEPLOY_ENV: "DEV"
LOGICAL_ENV: "dev"
APPNAME: "accounts-app"
steps: *builddeploy_steps
"build-qa":
<<: *defaults
environment:
DEPLOY_ENV: "QA"
LOGICAL_ENV: "qa"
APPNAME: "accounts-app"
steps: *builddeploy_steps
"build-prod":
<<: *defaults
environment:
DEPLOY_ENV: "PROD"
LOGICAL_ENV: "prod"
APPNAME: "accounts-app"
steps: *builddeploy_steps
workflows:
version: 2
build:
jobs:
- build-dev:
context : org-global
filters:
branches:
only: [ dev, qa-accessibility ]
- build-qa:
context : org-global
filters:
branches:
only: qa
- build-prod:
context : org-global
filters:
branches:
only: master