-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Clever/bstein-dev-public
Pruning git history. Now public!
- Loading branch information
Showing
52 changed files
with
6,426 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
version: 2.1 | ||
|
||
executors: | ||
common-executor: | ||
working_directory: /go/src/github.com/Clever/analytics-latency-config-service | ||
docker: | ||
- image: circleci/golang:1.13-stretch-node | ||
- image: circleci/postgres:9.4-alpine-ram | ||
- image: circleci/mongo:3.2.20-jessie-ram | ||
environment: | ||
POSTGRES_USER: postgres | ||
|
||
environment: | ||
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts | ||
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results | ||
POSTGRES_USER: postgres | ||
|
||
commands: | ||
clone-ci-scripts: | ||
description: Clone the ci-scripts repo | ||
steps: | ||
- run: | ||
command: cd .. && git clone --depth 1 -v https://github.com/Clever/ci-scripts.git && cd ci-scripts && git show --oneline -s | ||
name: Clone ci-scripts | ||
|
||
jobs: | ||
build: | ||
executor: common-executor | ||
steps: | ||
- checkout | ||
- run: | ||
command: sudo apt-get update && sudo apt-get install postgresql | ||
name: Install psql | ||
- run: | ||
command: |- | ||
echo Waiting for postgres | ||
for i in `seq 1 10`; | ||
do | ||
nc -z localhost 5432 && echo Success && exit 0 | ||
echo -n . | ||
sleep 1 | ||
done | ||
echo Failed waiting for postgres && exit 1 | ||
name: Wait for postgres database to be ready | ||
- run: make install_deps | ||
- run: make db-setup | ||
- run: make build | ||
- run: make test | ||
- persist_to_workspace: | ||
root: /go/src/github.com/Clever | ||
paths: "." | ||
|
||
publish: | ||
executor: common-executor | ||
steps: | ||
- attach_workspace: | ||
at: /go/src/github.com/Clever | ||
- clone-ci-scripts | ||
- setup_remote_docker | ||
- run: ../ci-scripts/circleci/docker-publish $DOCKER_USER $DOCKER_PASS "$DOCKER_EMAIL" $DOCKER_ORG | ||
- run: ../ci-scripts/circleci/catapult-publish $CATAPULT_URL $CATAPULT_USER $CATAPULT_PASS $APP_NAME | ||
- run: if [ "${CIRCLE_BRANCH}" == "master" ]; then ../ci-scripts/circleci/npm-publish $NPM_TOKEN gen-js/; fi; | ||
- run: if [ "${CIRCLE_BRANCH}" == "master" ]; then cat ./swagger.yml | grep "^ version:" | cut -d":" -f2 | tr -d " " > ./VERSION; fi; | ||
- run: if [ "${CIRCLE_BRANCH}" == "master" ]; then ../ci-scripts/circleci/github-release $GH_RELEASE_TOKEN; fi; | ||
|
||
unit-test: | ||
executor: common-executor | ||
steps: | ||
- attach_workspace: | ||
at: /go/src/github.com/Clever | ||
- run: | ||
command: sudo apt-get update && sudo apt-get install postgresql | ||
name: Install psql | ||
- run: | ||
command: |- | ||
echo Waiting for postgres | ||
for i in `seq 1 10`; | ||
do | ||
nc -z localhost 5432 && echo Success && exit 0 | ||
echo -n . | ||
sleep 1 | ||
done | ||
echo Failed waiting for postgres && exit 1 | ||
name: Wait for postgres database to be ready | ||
- run: | ||
command: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS | ||
name: Set up CircleCI artifacts directories | ||
- run: make db-setup | ||
- run: make test | ||
|
||
deploy: | ||
executor: common-executor | ||
steps: | ||
- clone-ci-scripts | ||
- run: if [ "${CIRCLE_BRANCH}" == "master" ]; then ../ci-scripts/circleci/dapple-deploy $DAPPLE_URL $DAPPLE_USER $DAPPLE_PASS $APP_NAME clever-dev no-confirm-deploy; fi; | ||
- run: if [ "${CIRCLE_BRANCH}" == "master" ]; then ../ci-scripts/circleci/dapple-deploy $DAPPLE_URL $DAPPLE_USER $DAPPLE_PASS $APP_NAME production no-confirm-deploy; fi; | ||
|
||
workflows: | ||
version: 2.1 | ||
build_test_publish_deploy: | ||
jobs: | ||
- build | ||
- unit-test: | ||
requires: | ||
- build | ||
- publish: | ||
requires: | ||
- build | ||
- deploy: | ||
requires: | ||
- unit-test | ||
- publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
gen-*/** linguist-generated |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @Clever/eng-deip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## Link to JIRA: | ||
[Link to JIRA](url) | ||
|
||
## Overview: | ||
[insert description] | ||
|
||
If you made any changes to swagger.yml: | ||
- [ ] Update swagger.yml version | ||
- [ ] Run "make generate" | ||
|
||
## Testing | ||
|
||
## Rollout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# osx / sshfs | ||
._* | ||
.DS_Store | ||
|
||
# emacs / vim | ||
*~ | ||
\#*\# | ||
.\#* | ||
|
||
vendor | ||
bin | ||
|
||
# don't commit mocks | ||
mock_*.go | ||
|
||
# js | ||
node_modules | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM alpine:3.10 | ||
|
||
RUN apk add ca-certificates | ||
RUN update-ca-certificates | ||
|
||
COPY kvconfig.yml /bin/kvconfig.yml | ||
COPY bin/analytics-latency-config-service /bin/analytics-latency-config-service | ||
|
||
CMD ["/bin/analytics-latency-config-service", "--addr=0.0.0.0:80"] |
Oops, something went wrong.