-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9083bea
Showing
2,285 changed files
with
148,559 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,6 @@ | ||
{ | ||
"plugins": [ | ||
"transform-es2015-modules-commonjs" | ||
] | ||
} | ||
|
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,3 @@ | ||
*Dockerfile* | ||
*docker-compose* | ||
node_modules |
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 @@ | ||
localhost,.app.local,.openware.com,.devkube.com,.terakube.com,.openware.work |
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,161 @@ | ||
--- | ||
kind: pipeline | ||
name: "Push" | ||
|
||
concurrency: | ||
limit: 2 | ||
|
||
steps: | ||
- name: "Test & Build" | ||
image: node:12.13.1 | ||
commands: | ||
- export REACT_APP_GIT_SHA=$(git rev-parse --short HEAD) | ||
- echo $REACT_APP_GIT_SHA > .tags | ||
- export BUILD_DOMAIN=$(cat .domains) | ||
- export BUILD_EXPIRE=$(date -d "+1 month" +%s000) | ||
- npm -g install yarn | ||
- yarn install | ||
- yarn lint | ||
- yarn test:ci --collectCoverage=true | ||
- yarn build | ||
|
||
- name: "Stage with mock server" | ||
image: instrumentisto/rsync-ssh | ||
environment: | ||
PRIVATE_KEY: | ||
from_secret: deploy_key | ||
commands: | ||
- echo "$PRIVATE_KEY" | base64 -d > id_rsa | ||
- chmod 0600 id_rsa | ||
- cd build/config/ | ||
- echo "window.env={api:{authUrl:'http://api-v2.mock.openware.work/api/v2/barong',tradeUrl:'http://api-v2.mock.openware.work/api/v2/peatio',applogicUrl:'http://api-v2.mock.openware.work/api/v2/applogic',rangerUrl:'ws://ranger.mock.openware.work/api/v2/ranger'}};" > env.js | ||
- cat env.js | ||
- cd /drone/src | ||
- rsync -avzhre "ssh -i id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" build/ mock@mock.openware.work:/home/mock/builds/${DRONE_COMMIT_SHA:0:7} | ||
- rsync -avzhre "ssh -i id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" coverage/ mock@mock.openware.work:/home/mock/builds/${DRONE_COMMIT_SHA:0:7}-coverage | ||
- echo "http://${DRONE_COMMIT_SHA:0:7}.mock.openware.work" | ||
- echo "http://${DRONE_COMMIT_SHA:0:7}-coverage.mock.openware.work" | ||
|
||
- name: "Notify staging" | ||
image: plugins/slack | ||
settings: | ||
webhook: | ||
from_secret: baseapp_slack_webhook | ||
channel: | ||
from_secret: baseapp_slack_channel | ||
template: > | ||
{{#success build.status}} | ||
[SUCCESS] (Base Application) Branch {{ build.branch }} by {{ build.author }} staging has succeeded! | ||
Visit http://{{ truncate build.commit 7 }}.mock.openware.work to check it out! | ||
Coverage report: http://{{ truncate build.commit 7 }}-coverage.mock.openware.work | ||
{{else}} | ||
[FAILURE] Branch {{ build.branch }} by {{ build.author }} staging has failed! | ||
{{/success}} | ||
Check the build info here: {{ build.link }} | ||
when: | ||
status: [success, failure] | ||
|
||
trigger: | ||
event: | ||
- push | ||
branch: | ||
exclude: | ||
- master | ||
- "2-*-stable" | ||
|
||
--- | ||
kind: pipeline | ||
name: "New version" | ||
|
||
concurrency: | ||
limit: 2 | ||
|
||
steps: | ||
- name: "Test" | ||
image: node:12.13.1 | ||
commands: | ||
- npm -g install yarn | ||
- yarn install | ||
- yarn lint | ||
- yarn test:ci --collectCoverage=true | ||
|
||
- name: "Bump & Tag" | ||
image: quay.io/openware/sdk-citools:2.4.5 | ||
environment: | ||
BRANCH_NAME: ${DRONE_BRANCH} | ||
REPO_NAME: ${DRONE_REPO} | ||
GITHUB_API_KEY: | ||
from_secret: kite_bot_key | ||
commands: | ||
- BUNDLE_GEMFILE=/sdk/Gemfile bundle exec rake --rakefile=/sdk/Rakefile ci:prebuild | ||
|
||
|
||
- name: "Build Docker image" | ||
image: plugins/docker | ||
settings: | ||
environment: | ||
REACT_APP_SENTRY_KEY: | ||
from_secret: master_sentry_key | ||
REACT_APP_SENTRY_ORGANIZATION: | ||
from_secret: master_sentry_organization | ||
REACT_APP_SENTRY_PROJECT: | ||
from_secret: master_sentry_project | ||
username: | ||
from_secret: quay_username | ||
password: | ||
from_secret: quay_password | ||
repo: | ||
from_secret: quay_repo | ||
registry: quay.io | ||
|
||
- name: "Redeploy on master.devkube.com" | ||
image: rubykube/microkube:0.2.0 | ||
environment: | ||
WEBHOOK_JWT_SECRET: | ||
from_secret: devkube_webhook_secret | ||
DOCKER_REPO: | ||
from_secret: quay_repo | ||
commands: | ||
- export latest_image=$DOCKER_REPO:$(cat .tags) | ||
- cd /home/app | ||
- bundle exec rake payload:send[frontend,$latest_image,http://$DRONE_BRANCH.devkube.com:1337] | ||
when: | ||
branch: | ||
- master | ||
|
||
- name: "Push and Notify" | ||
image: quay.io/openware/sdk-citools:2.4.5 | ||
environment: | ||
BOT_USERNAME: kite-bot | ||
BOT_NAME: Kite Bot | ||
BOT_EMAIL: kite-bot@heliostech.fr | ||
BRANCH_NAME: ${DRONE_BRANCH} | ||
SDK_BRANCH: ${DRONE_BRANCH} | ||
REPO_NAME: ${DRONE_REPO} | ||
TELEGRAM_BOT_TOKEN: | ||
from_secret: baseapp_telegram_bot_token | ||
TELEGRAM_CHAT_ID: | ||
from_secret: baseapp_telegram_chat_id | ||
SLACK_TOKEN: | ||
from_secret: baseapp_slack_token | ||
SLACK_CHANNEL: | ||
from_secret: baseapp_slack_channel | ||
GITHUB_API_KEY: | ||
from_secret: kite_bot_key | ||
commands: | ||
- BUNDLE_GEMFILE=/sdk/Gemfile bundle exec rake --rakefile=/sdk/Rakefile ci:postbuild[/drone/src] | ||
when: | ||
branch: | ||
- master | ||
- "2-*-stable" | ||
|
||
trigger: | ||
branch: | ||
- master | ||
- "2-*-stable" | ||
event: | ||
- push | ||
|
||
image_pull_secrets: | ||
- dockerconfigjson |
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,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
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,28 @@ | ||
/.npmrc | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
/.idea | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env | ||
env.js | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
index.css | ||
|
||
# environment config | ||
public/config/ |
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 @@ | ||
v10.11.0 |
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,15 @@ | ||
{ | ||
"extends": "stylelint-config-standard", | ||
"plugins": [ | ||
"stylelint-order" | ||
], | ||
"rules": { | ||
"at-rule-no-unknown": null, | ||
"order/order": [ | ||
"custom-properties", | ||
"declarations" | ||
], | ||
"order/properties-alphabetical-order": true, | ||
"no-descending-specificity": null | ||
} | ||
} |
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,19 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Run Playground test", | ||
"type": "node", | ||
"request": "launch", | ||
"runtimeExecutable": "/usr/bin/node", | ||
"runtimeArgs": [ | ||
"--inspect-brk", | ||
"/usr/bin/yarn", | ||
"test" | ||
], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"port": 9229 | ||
} | ||
] | ||
} |
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,45 @@ | ||
# test directories | ||
__tests__ | ||
test | ||
tests | ||
powered-test | ||
|
||
# asset directories | ||
docs | ||
doc | ||
website | ||
images | ||
assets | ||
|
||
# examples | ||
example | ||
examples | ||
|
||
# code coverage directories | ||
coverage | ||
.nyc_output | ||
|
||
# build scripts | ||
Makefile | ||
Gulpfile.js | ||
Gruntfile.js | ||
|
||
# configs | ||
appveyor.yml | ||
circle.yml | ||
codeship-services.yml | ||
codeship-steps.yml | ||
wercker.yml | ||
.tern-project | ||
.gitattributes | ||
.editorconfig | ||
.*ignore | ||
.eslintrc | ||
.jshintrc | ||
.flowconfig | ||
.documentup.json | ||
.yarn-metadata.json | ||
.travis.yml | ||
|
||
# misc | ||
*.md |
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,28 @@ | ||
FROM node:12.13.1 AS builder | ||
|
||
WORKDIR /home/node | ||
COPY --chown=node:node . . | ||
|
||
ARG BUILD_EXPIRE | ||
ARG BUILD_DOMAIN | ||
ARG REACT_APP_SENTRY_KEY=${REACT_APP_SENTRY_KEY:-""} | ||
ARG REACT_APP_SENTRY_ORGANIZATION=${REACT_APP_SENTRY_ORGANIZATION:-""} | ||
ARG REACT_APP_SENTRY_PROJECT=${REACT_APP_SENTRY_PROJECT:-""} | ||
|
||
RUN npm i -g yarn | ||
|
||
USER node | ||
|
||
ENV REACT_APP_SENTRY_KEY=${REACT_APP_SENTRY_KEY} | ||
ENV REACT_APP_SENTRY_ORGANIZATION=${REACT_APP_SENTRY_ORGANIZATION} | ||
ENV REACT_APP_SENTRY_PROJECT=${REACT_APP_SENTRY_PROJECT} | ||
|
||
RUN yarn install | ||
RUN chmod -R 777 ./scripts/build.sh | ||
RUN ./scripts/build.sh | ||
|
||
FROM nginx:mainline-alpine | ||
|
||
COPY --from=builder /home/node/build /usr/share/nginx/html | ||
COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 3000 |
Oops, something went wrong.