Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Dev circleci #1226

Open
wants to merge 129 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
172eb98
Added circle.yml, deploy.sh and removed travis.yml
Aug 10, 2017
130f72b
Update webpack.config.js
Gunasekar-K Aug 10, 2017
ef4ff74
Update README.md
Gunasekar-K Aug 10, 2017
beac1be
Update README.md
Gunasekar-K Aug 10, 2017
3060218
Update README.md
Gunasekar-K Aug 10, 2017
326a3d7
Update circle.yml
Gunasekar-K Aug 10, 2017
f83a98a
Update circle.yml
Gunasekar-K Aug 10, 2017
b75af63
Update circle.yml
Gunasekar-K Aug 10, 2017
5395d57
Update circle.yml
Gunasekar-K Aug 10, 2017
16bc97a
Update circle.yml
Gunasekar-K Aug 10, 2017
2c0d985
Update circle.yml
Gunasekar-K Aug 10, 2017
f758403
Update circle.yml
Gunasekar-K Aug 11, 2017
6114ac8
Update circle.yml
Gunasekar-K Aug 11, 2017
5617230
Update circle.yml
Gunasekar-K Aug 11, 2017
3ac455d
Update circle.yml
Gunasekar-K Aug 11, 2017
5fe35a7
Update circle.yml
Gunasekar-K Aug 11, 2017
03808df
Update circle.yml
Gunasekar-K Aug 11, 2017
8878a89
Update circle.yml
Gunasekar-K Aug 11, 2017
a76786a
Update circle.yml
Gunasekar-K Aug 11, 2017
9640b60
Update circle.yml
Gunasekar-K Aug 11, 2017
baa0b49
Update circle.yml
Gunasekar-K Aug 11, 2017
6841b66
Update circle.yml
Gunasekar-K Aug 11, 2017
1920fff
Update circle.yml
Gunasekar-K Aug 11, 2017
4297ac1
Update circle.yml
Gunasekar-K Aug 11, 2017
fbb3e2f
Update circle.yml
Gunasekar-K Aug 11, 2017
41b676e
Update circle.yml
Gunasekar-K Aug 11, 2017
ba9aaf7
Update circle.yml
Gunasekar-K Aug 11, 2017
abacfdc
Update circle.yml
Gunasekar-K Aug 14, 2017
c2e7698
Update circle.yml
Gunasekar-K Aug 14, 2017
879d8c3
Update circle.yml
Gunasekar-K Aug 14, 2017
7b5c606
Update circle.yml
Gunasekar-K Aug 14, 2017
96e603a
Update circle.yml
Gunasekar-K Aug 14, 2017
02d7325
Update circle.yml
Gunasekar-K Aug 14, 2017
6182e12
Update circle.yml
Gunasekar-K Aug 14, 2017
be2fe72
Update circle.yml
Gunasekar-K Aug 14, 2017
f803749
Update circle.yml
Gunasekar-K Aug 14, 2017
afbd541
Update circle.yml
Gunasekar-K Aug 16, 2017
b644237
Update circle.yml
Gunasekar-K Aug 16, 2017
ed4596f
Update circle.yml
Gunasekar-K Aug 16, 2017
24eae39
Update circle.yml
Gunasekar-K Aug 16, 2017
ff26291
Update circle.yml
Gunasekar-K Aug 16, 2017
4e4b64e
Update circle.yml
Gunasekar-K Aug 16, 2017
e2da184
Update circle.yml
Gunasekar-K Aug 16, 2017
3aa0de1
Update circle.yml
Gunasekar-K Aug 16, 2017
2245272
Update circle.yml
Gunasekar-K Aug 16, 2017
bf962be
Update circle.yml
Gunasekar-K Aug 16, 2017
87ccc3d
Update circle.yml
Gunasekar-K Aug 16, 2017
4b19d8d
Update circle.yml
Gunasekar-K Aug 16, 2017
a7cc767
Update circle.yml
Gunasekar-K Aug 16, 2017
d782741
Update circle.yml
Gunasekar-K Aug 16, 2017
3585862
Update circle.yml
Gunasekar-K Aug 16, 2017
15c6901
Update circle.yml
Gunasekar-K Aug 16, 2017
cf6160c
Update circle.yml
Gunasekar-K Aug 16, 2017
15bed01
Update circle.yml
Gunasekar-K Aug 16, 2017
dafa81d
Update circle.yml
Gunasekar-K Aug 16, 2017
e33074c
Update circle.yml
Gunasekar-K Aug 16, 2017
f38d973
Update circle.yml
Gunasekar-K Aug 16, 2017
a71bb53
Update circle.yml
Gunasekar-K Aug 16, 2017
88b2d06
Update circle.yml
Gunasekar-K Aug 16, 2017
d250ace
Update circle.yml
Gunasekar-K Aug 16, 2017
2b94de1
Update circle.yml
Gunasekar-K Aug 16, 2017
971dad2
Update circle.yml
Gunasekar-K Aug 16, 2017
374fd4d
Update circle.yml
Gunasekar-K Aug 16, 2017
7e63928
Update circle.yml
Gunasekar-K Aug 16, 2017
dfbbfc9
Update circle.yml
Gunasekar-K Aug 16, 2017
4d231da
Update circle.yml
Gunasekar-K Aug 16, 2017
dd536df
Update circle.yml
Gunasekar-K Aug 16, 2017
832000d
Update circle.yml
Gunasekar-K Aug 16, 2017
032e3cf
Update circle.yml
Gunasekar-K Aug 16, 2017
854b340
Update circle.yml
Gunasekar-K Aug 16, 2017
5603642
Update circle.yml
Gunasekar-K Aug 16, 2017
f4a5253
Update circle.yml
Gunasekar-K Aug 16, 2017
49e2fa0
Update circle.yml
Gunasekar-K Aug 16, 2017
7228dca
Update circle.yml
Gunasekar-K Aug 16, 2017
af400b5
Update circle.yml
Gunasekar-K Aug 17, 2017
4acbecf
Update circle.yml
Gunasekar-K Aug 17, 2017
b507754
Update circle.yml
Gunasekar-K Aug 17, 2017
a385a59
Update circle.yml
Gunasekar-K Aug 17, 2017
f799046
Update circle.yml
Gunasekar-K Aug 17, 2017
fcdef58
Update circle.yml
Gunasekar-K Aug 17, 2017
337765e
Update circle.yml
Gunasekar-K Aug 17, 2017
ae60e70
Update circle.yml
Gunasekar-K Aug 17, 2017
9d3a0cd
Update circle.yml
Gunasekar-K Aug 17, 2017
fcecbd4
Update circle.yml
Gunasekar-K Aug 17, 2017
91c4f19
Update circle.yml
Gunasekar-K Aug 18, 2017
7ab55ed
Update circle.yml
Gunasekar-K Aug 18, 2017
5b38657
Update circle.yml
Gunasekar-K Aug 18, 2017
33f4e1a
Update circle.yml
Gunasekar-K Aug 18, 2017
f512f8d
Update circle.yml
Gunasekar-K Aug 18, 2017
b9f6733
Update circle.yml
Gunasekar-K Aug 18, 2017
f9a638c
Merge branch 'dev' into dev-circleci
Aug 21, 2017
bbf9c40
Update circle.yml
Gunasekar-K Aug 21, 2017
767217a
Update circle.yml
Gunasekar-K Aug 21, 2017
953164a
Update circle.yml
Gunasekar-K Aug 21, 2017
9749f4e
Update circle.yml
Gunasekar-K Aug 21, 2017
48c8614
Update circle.yml
Gunasekar-K Aug 21, 2017
f2f18f7
Update circle.yml
Gunasekar-K Aug 21, 2017
51def14
Update circle.yml
Gunasekar-K Aug 21, 2017
bb3a037
Update circle.yml
Gunasekar-K Aug 21, 2017
309b8d1
Update circle.yml
Gunasekar-K Aug 21, 2017
bdde141
Update circle.yml
Gunasekar-K Aug 21, 2017
4fcfffa
Update README.md
Gunasekar-K Aug 22, 2017
8370219
Update circle.yml
Gunasekar-K Aug 22, 2017
343344b
Update circle.yml
Gunasekar-K Aug 22, 2017
e82b246
Update README.md
Gunasekar-K Aug 22, 2017
a3fca5b
merged from Dev branch
Aug 24, 2017
ea33e4d
Update README.md
Gunasekar-K Aug 24, 2017
6fc3b6e
Update circle.yml
Gunasekar-K Aug 24, 2017
4865bec
Update circle.yml
Gunasekar-K Sep 6, 2017
bafab48
Update circle.yml
Gunasekar-K Sep 6, 2017
7849c94
Update circle.yml
Gunasekar-K Sep 6, 2017
4bec490
Update circle.yml
Gunasekar-K Sep 6, 2017
7a5417e
Update circle.yml
Gunasekar-K Sep 6, 2017
b1e8763
Update circle.yml
Gunasekar-K Sep 6, 2017
a7d1da9
Update circle.yml
Gunasekar-K Sep 6, 2017
e952cc7
Update circle.yml
Gunasekar-K Sep 6, 2017
7ea68cf
Update circle.yml
Gunasekar-K Sep 6, 2017
27a2f62
Update circle.yml
Gunasekar-K Sep 6, 2017
a2c1b81
Update circle.yml
Gunasekar-K Sep 6, 2017
97dd9ad
Update circle.yml
Gunasekar-K Sep 6, 2017
7d95bbb
Update circle.yml
Gunasekar-K Sep 6, 2017
2eea95e
Update circle.yml
Gunasekar-K Sep 6, 2017
ac42b26
Update circle.yml
Gunasekar-K Sep 6, 2017
8bb08a4
Update circle.yml
Gunasekar-K Sep 6, 2017
34208e8
Update circle.yml
Gunasekar-K Sep 6, 2017
9a32c8a
Update circle.yml
Gunasekar-K Sep 6, 2017
b124af0
Update circle.yml
Gunasekar-K Sep 6, 2017
0ebf0b3
Update circle.yml
Gunasekar-K Sep 6, 2017
0efc1c6
Update circle.yml
Gunasekar-K Sep 6, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 0 additions & 66 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#### Dev [![Build Status](https://travis-ci.org/appirio-tech/topcoder-app.svg?branch=dev)](https://travis-ci.org/appirio-tech/topcoder-app) QA [![Build Status](https://travis-ci.org/appirio-tech/topcoder-app.svg?branch=qa-integration)](https://travis-ci.org/appirio-tech/topcoder-app) Master [![Build Status](https://travis-ci.org/appirio-tech/topcoder-app.svg?branch=master)](https://travis-ci.org/appirio-tech/topcoder-app)
#### Dev [![Build Status](https://circleci.com/gh/appirio-tech/topcoder-app/tree/dev.svg?style=shield&circle-token=5acf3da74ea00fc827850218f9f01578a4d6ea68)] QA [![Build Status](https://circleci.com/gh/appirio-tech/topcoder-app/tree/qa-integration.svg?style=shield&circle-token=5acf3da74ea00fc827850218f9f01578a4d6ea68)] Master [![Build Status](https://circleci.com/gh/appirio-tech/topcoder-app/tree/master.svg?style=shield&circle-token=5acf3da74ea00fc827850218f9f01578a4d6ea68)]
# Topcoder-App

Topcoder-App is an Angular application that contains dashboard, profile, settings, login/registration, and design submissions.

The technologies used are NPM, Webpack, ES2015, Jade, SCSS, and Angular 1.x.
The technologies used are NPM, Webpack, ES2015, Jade, SCSS, and Angular 1.x.

## Installation

Expand Down Expand Up @@ -128,7 +128,7 @@ See any `*.routes.js` file as an example.

### Style Guide and Naming Conventions

- Our travis build runs `npm run lint` and `npm test`, so make sure your code adheres to the code style enforced by our linters
- Our circleci build runs `npm run lint` and `npm test`, so make sure your code adheres to the code style enforced by our linters
- Please use ES2015 syntax whenever possible
- Use the Angular style guide mentioned below

Expand Down
44 changes: 44 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
machine:
node:
version: 5.5.0
environment:
CXX: g++-4.8

dependencies:
pre:
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update -y
- sudo apt-get install g++-4.8 -y
override:
- node --version
- npm --version
- nvm --version
- npm install coffeescript
- npm install

compile:
override:
- ls node_modules/*
- npm run lint && npm run build

test:
override:
- npm test

deployment:
development:
branch: [dev, dev-circleci]
owner: appirio-tech
commands:
- ./deploy.sh DEV
qa:
branch: qa-integration
owner: appirio-tech
commands:
- ./deploy.sh QA
production:
branch: master
owner: appirio-tech
commands:
- ./deploy.sh PROD

58 changes: 58 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env bash

ENV=$1
echo $ENV
#AWS_REGION=$(eval "echo \$${ENV}_AWS_REGION")
AWS_ACCESS_KEY_ID=$(eval "echo \$${ENV}_AWS_ACCESS_KEY_ID")
AWS_SECRET_ACCESS_KEY=$(eval "echo \$${ENV}_AWS_SECRET_ACCESS_KEY")
AWS_S3_BUCKET=$(eval "echo \$${ENV}_S3_BUCKET")

configure_aws_cli() {
aws --version
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
#aws configure set default.region $AWS_REGION
aws configure set default.output json
echo "Configured AWS CLI."
}

deploy_s3bucket() {
#chmod -R 775 ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist
cat dist/app.2e9868372e0e2992d5d2.css
#aws s3 sync --dryrun ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} --cache-control private,no-store,no-cache,must-revalidate,max-age=0
#result=`aws s3 sync ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} --cache-control private,no-store,no-cache,must-revalidate,max-age=0`
aws s3 sync --dryrun ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} --cache-control max-age=0,s-maxage=86400 --exclude "*.txt" --exclude "*.js" --exclude "*.map" --exclude "*.css"
result=`aws s3 sync ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} --cache-control max-age=0,s-maxage=86400 --exclude "*.txt" --exclude "*.js" --exclude "*.map" --exclude "*.css"`
if [ $? -eq 0 ]; then
#echo $result
echo "All html, font, image and media files are Deployed without gzip encoding!"
else
echo "Deployment Failed - $result"
exit 1
fi
#result=`aws s3 sync ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} --cache-control private,no-store,no-cache,must-revalidate,max-age=0`
aws s3 sync --dryrun ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} --cache-control max-age=0,s-maxage=86400 --exclude "*" --include "*.txt" --include "*.js" --include "*.map" --include "*.css" --content-encoding gzip
result=`aws s3 sync ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} --cache-control max-age=0,s-maxage=86400 --exclude "*" --include "*.txt" --include "*.js" --include "*.map" --include "*.css" --content-encoding gzip`
if [ $? -eq 0 ]; then
#echo $result
echo "All css, js, and map files are Deployed! with gzip"
else
echo "Deployment Failed - $result"
exit 1
fi

}

#sed -i 's/^application\/x-font-woff.*/application\/font-woff\t\t\t\twoff/' /etc/mime.types
echo -e "application/font-woff\t\t\t\twoff2" >> /etc/mime.types
echo -e "application/font-sfnt\t\t\t\tttf" >> /etc/mime.types
echo -e "application/json\t\t\t\tmap" >> /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
cat /etc/mime.types | grep -i woff
cat /etc/mime.types | grep -i ico
cat /etc/mime.types | grep -i map
cat /etc/mime.types | grep -i ttf

configure_aws_cli
deploy_s3bucket
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require('./node_modules/coffee-script/register')

const CI = process.env.TRAVIS_BRANCH
const CI = process.env.CIRCLE_BRANCH

if (CI === 'master') {
process.env.ENV = 'PROD'
Expand Down