@@ -64,6 +64,130 @@ jobs:
6464 cp -f buildvar-web.conf buildvar.conf
6565 ./deploy.sh DEV $VER
6666 #cp ./../buildscript/master_deploy.sh .
67+ " build-qa " :
68+ docker :
69+ - image : openjdk:7
70+ steps :
71+ # Initialization.
72+ - run :
73+ name : Installation of build dependencies.
74+ command : |
75+ apt update
76+ apt install -y openssl ant git zip jq
77+ mkdir ~/awscli
78+ cd ~/awscli
79+ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
80+ unzip awscli-bundle.zip
81+ ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
82+ cd /usr/share/ant/lib
83+ wget https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/1.7.8/groovy-all-1.7.8.jar
84+ wget https://repo1.maven.org/maven2/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar
85+ cd ~
86+ wget http://downloads.sourceforge.net/project/jboss/JBoss/JBoss-4.2.3.GA/jboss-4.2.3.GA-jdk6.zip
87+ unzip jboss-4.2.3.GA-jdk6.zip
88+ cd project
89+ - run :
90+ name : checking out build repo
91+ command : |
92+ git clone --branch master https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
93+ #git clone --branch master git@github.com:appirio-tech/ops.git ../direct-config-update
94+ #git clone --branch master https://$GITUSER:$GITPASSWD@github.com/appirio-tech/ops ../direct-config-update
95+ - checkout
96+ - run :
97+ name : copying configuration file
98+ command : |
99+ cp ./../buildscript/direct/conf/dev/token.properties.enc .
100+ openssl enc -aes-256-cbc -d -in token.properties.enc -out token.properties -k $SECPASSWD
101+ - run :
102+ name : Installation of build dependencies.
103+ command : |
104+ javac -version
105+ ant -version
106+ aws --version
107+ ant package-direct package-static-direct
108+ - store_artifacts :
109+ path : ./direct.jar
110+ destination : direct.jar
111+ - store_artifacts :
112+ path : ./direct-static-all.jar
113+ destination : direct-static-all.jar
114+ - run :
115+ name : Build Pacakge
116+ command : ./build-package.sh QA
117+ - run :
118+ name : Deployment direct app.
119+ command : |
120+ #cp ./../buildscript/master_deploy.sh .
121+ cp -f buildvar-app.conf buildvar.conf
122+ ./deploy.sh QA $VER
123+ - run :
124+ name : Deployment direct web
125+ command : |
126+ cp -f buildvar-web.conf buildvar.conf
127+ ./deploy.sh QA $VER
128+ #cp ./../buildscript/master_deploy.sh .
129+ " build-prod " :
130+ docker :
131+ - image : openjdk:7
132+ steps :
133+ # Initialization.
134+ - run :
135+ name : Installation of build dependencies.
136+ command : |
137+ apt update
138+ apt install -y openssl ant git zip jq
139+ mkdir ~/awscli
140+ cd ~/awscli
141+ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
142+ unzip awscli-bundle.zip
143+ ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
144+ cd /usr/share/ant/lib
145+ wget https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/1.7.8/groovy-all-1.7.8.jar
146+ wget https://repo1.maven.org/maven2/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar
147+ cd ~
148+ wget http://downloads.sourceforge.net/project/jboss/JBoss/JBoss-4.2.3.GA/jboss-4.2.3.GA-jdk6.zip
149+ unzip jboss-4.2.3.GA-jdk6.zip
150+ cd project
151+ - run :
152+ name : checking out build repo
153+ command : |
154+ git clone --branch master https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
155+ #git clone --branch master git@github.com:appirio-tech/ops.git ../direct-config-update
156+ #git clone --branch master https://$GITUSER:$GITPASSWD@github.com/appirio-tech/ops ../direct-config-update
157+ - checkout
158+ - run :
159+ name : copying configuration file
160+ command : |
161+ cp ./../buildscript/direct/conf/dev/token.properties.enc .
162+ openssl enc -aes-256-cbc -d -in token.properties.enc -out token.properties -k $SECPASSWD
163+ - run :
164+ name : Installation of build dependencies.
165+ command : |
166+ javac -version
167+ ant -version
168+ aws --version
169+ ant package-direct package-static-direct
170+ - store_artifacts :
171+ path : ./direct.jar
172+ destination : direct.jar
173+ - store_artifacts :
174+ path : ./direct-static-all.jar
175+ destination : direct-static-all.jar
176+ - run :
177+ name : Build Pacakge
178+ command : ./build-package.sh PROD
179+ - run :
180+ name : Deployment direct app.
181+ command : |
182+ #cp ./../buildscript/master_deploy.sh .
183+ cp -f buildvar-app.conf buildvar.conf
184+ ./deploy.sh PROD $VER
185+ - run :
186+ name : Deployment direct web
187+ command : |
188+ cp -f buildvar-web.conf buildvar.conf
189+ ./deploy.sh PROD $VER
190+ #cp ./../buildscript/master_deploy.sh .
67191
68192workflows :
69193 version : 2
@@ -72,4 +196,13 @@ workflows:
72196 - build-dev :
73197 filters :
74198 branches :
75- only : dev-circleci
199+ only : [dev, dev-circleci]
200+ - build-qa :
201+ filters :
202+ branches :
203+ only : qa
204+ - build-prod :
205+ filters :
206+ branches :
207+ only : master
208+
0 commit comments