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

"dev" branch merged into "v5-upgrade" #4

Merged
merged 1 commit into from
Oct 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
33 changes: 17 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
python_env: &python_env
docker:
- image: circleci/python:2.7-stretch-browsers

install_awscli: &install_awscli
name: "Install awscli"
command: |
Expand All @@ -14,7 +14,7 @@ install_deploysuite: &install_deploysuite
cp ./../buildscript/master_deploy.sh .
cp ./../buildscript/buildenv.sh .
cp ./../buildscript/awsconfiguration.sh .

# Instructions of deployment
deploy_steps: &deploy_steps
- checkout
Expand All @@ -25,14 +25,14 @@ deploy_steps: &deploy_steps
- setup_remote_docker
- run: docker build -t ${APPNAME}:latest .
- deploy:
name: "Running Masterscript - deploy tc-project-service "
name: "Running Masterscript - deploy tc-project-service "
command: |
./awsconfiguration.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 ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME}

jobs:
test:
docker:
Expand All @@ -42,21 +42,22 @@ jobs:
- POSTGRES_USER: circle_test
- POSTGRES_DB: circle_test
- image: elasticsearch:2.3
- image: rabbitmq:3-management
environment:
DEPLOY_ENV: "DEV"
LOGICAL_ENV: "dev"
APPNAME: "projects-api"
APPNAME: "projects-api"
steps:
- checkout
- run:
name: "Install dependeency"
command: |
sudo apt update
sudo apt install curl
sudo apt install python-pip
sudo apt install python-pip
- run: *install_awscli
- run: *install_deploysuite
- setup_remote_docker
- setup_remote_docker
- restore_cache:
key: test-node-modules-{{ checksum "package.json" }}
- run: npm install
Expand All @@ -66,36 +67,36 @@ jobs:
- node_modules
- run: npm run lint
- run:
name: "Running Masterscript - deploy tc-project-service "
name: "Running Masterscript - deploy tc-project-service "
command: |
./awsconfiguration.sh $DEPLOY_ENV
./awsconfiguration.sh $DEPLOY_ENV
source awsenvconf
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-testvar
source buildenvvar
source buildenvvar
npm run test
rm -f buildenvvar
- run: npm run build
- persist_to_workspace:
root: .
paths:
- dist

deployProd:
<<: *python_env
environment:
DEPLOY_ENV: "PROD"
LOGICAL_ENV: "prod"
APPNAME: "projects-api"
APPNAME: "projects-api"
steps: *deploy_steps

deployDev:
<<: *python_env
environment:
DEPLOY_ENV: "DEV"
LOGICAL_ENV: "dev"
APPNAME: "projects-api"
steps: *deploy_steps
APPNAME: "projects-api"
steps: *deploy_steps

workflows:
version: 2
build:
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"mocha": true
},
"rules": {
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/*.test.js", "**/*.spec.js", "**/serviceMocks.js"]}],
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/*.test.js", "**/*.spec.js", "src/tests/*.js"]}],
"max-len": ["error", { "ignoreComments": true, "code": 120 }],
"valid-jsdoc": ["error", {
"requireReturn": true,
Expand Down
14 changes: 13 additions & 1 deletion config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,17 @@
"accountsAppUrl": "ACCOUNTS_APP_URL",
"inviteEmailSubject": "INVITE_EMAIL_SUBJECT",
"inviteEmailSectionTitle": "INVITE_EMAIL_SECTION_TITLE",
"pageSize": "PAGE_SIZE"
"pageSize": "PAGE_SIZE",
"SSO_REFCODES": "SSO_REFCODES",
"lookerConfig": {
"BASE_URL": "LOOKER_API_BASE_URL",
"CLIENT_ID": "LOOKER_API_CLIENT_ID",
"CLIENT_SECRET": "LOOKER_API_CLIENT_SECRET",
"TOKEN": "TOKEN",
"USE_MOCK": "LOOKER_API_ENABLE_MOCK",
"QUERIES": {
"REG_STATS": "LOOKER_API_REG_STATS_QUERY_ID",
"BUDGET": "LOOKER_API_BUDGET_QUERY_ID"
}
}
}
15 changes: 14 additions & 1 deletion config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,18 @@
"accountsAppUrl": "https://accounts.topcoder-dev.com",
"MAX_REVISION_NUMBER": 100,
"UNIQUE_GMAIL_VALIDATION": false,
"pageSize": 20
"pageSize": 20,
"VALID_STATUSES_BEFORE_PAUSED": "[\"active\"]",
"SSO_REFCODES": "[]",
"lookerConfig": {
"BASE_URL": "",
"CLIENT_ID": "",
"CLIENT_SECRET": "",
"TOKEN": "TOKEN",
"USE_MOCK": "true",
"QUERIES": {
"REG_STATS": 1234,
"BUDGET": 123
}
}
}
Loading