Skip to content
Open
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
95 changes: 12 additions & 83 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
kind: secret
name: timelog_docker_user
---
kind: secret
name: timelog_docker_passwd
---
kind: secret
name: rancher_cluster_token
---
kind: secret
name: rancher_host
---
kind: secret
name: sonar_host
---
kind: secret
Expand All @@ -25,82 +13,23 @@ steps:
- name: Install node modules
image: node:10.16.3
commands:
- yarn

trigger:
branch:
- master
- dev

---

kind: pipeline
type: docker
name: Build

steps:
- name: Install node modules
image: node:10.16.3
commands:
- yarn
- yarn install

- name: Build production web
- name: Test
image: node:10.16.3
commands:
- yarn run build
when:
branch:
- master
- yarn test

- name: Publish
image: plugins/docker
- name: Sonar Scanner
image: aosapps/drone-sonar-plugin
settings:
repo: nightlord851108/timelog_web
tags: ${DRONE_COMMIT_BRANCH}.${DRONE_COMMIT_SHA:0:8}
username:
from_secret: timelog_docker_user
password:
from_secret: timelog_docker_passwd
when:
event:
- push
sonar_token:
from_secret: sonar_project_token
sonar_host:
from_secret:
sonar_url
ver: 1.0

trigger:
branch:
- master

depends_on:
- Analysis

---

kind: pipeline
type: docker
name: Deployment

steps:
- name: Deploy Production
image: nightlord851108/kustomize
environment:
RANCHER_HOST:
from_secret:
rancher_host
CLUSTER_TOKEN:
from_secret:
rancher_cluster_token
commands:
- cd kustomize/overlays/production
- kustomize edit set image nightlord851108/timelog_web:${DRONE_COMMIT_BRANCH}.${DRONE_COMMIT_SHA:0:8}
- kustomize build . | kubectl apply --server=$${RANCHER_HOST} --token=$${CLUSTER_TOKEN} --insecure-skip-tls-verify=true --namespace=ois-production -f -
when:
branch:
- master
event:
- push

trigger:
branch:
- master

depends_on:
- Build
- main
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
NODE_PATH=./src
SKIP_PREFLIGHT_CHECK=true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
# testing
/coverage

# Sonar
.scannerwork

# production
/build

Expand Down
8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/timelog_web-no-redux.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ The page will reload if you make edits.<br />
You will also see any lint errors in the console.

### `yarn test`
We use Jest framework for unit testing. with `yarn test` command, the Jest UTs will be executed.

Launches the test runner in the interactive watch mode.<br />
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
All Jest UTs are placed in `gui_test/Jest`.
By default, `yarn test` command invokes `jest --collect-coverage` command among node_modules. The `--colect-coverage` parameter is added to generate the coverage test report after the execution of the test.

### `yarn build`

Expand Down
12 changes: 12 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// babel.config.js
// module.exports = {
// presets: [['@babel/preset-env', {targets: {node: 'current'}}]],
// };

module.exports = {
presets: ["@babel/preset-env", "@babel/preset-react"],
plugins: [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-runtime"
],
};
Loading