Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
124 lines (124 loc) · 5.33 KB
/
Copy pathpackage.json
File metadata and controls
124 lines (124 loc) · 5.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
{
"name": "data-pipeline-template",
"scripts": {
"prepare": "if [ \"$taito_mode\" != 'ci' ]; then husky install; fi",
"install-clean": "echo '# Nothing to cleanup'",
"install-ci": "echo '# Nothing to install'",
"install-dev": "echo '# Nothing to install'",
"install-all": "echo '# Nothing to install'",
"taito-host-init": "taito -z ${taito_options} init:${taito_env} && npm run taito-host-db-deploy && npm-run-all import-db-data",
"taito-host-init:clean": "taito -z ${taito_options} init:${taito_env} --clean && npm run taito-host-db-deploy && npm-run-all import-db-data",
"import-db-data": "if [ -f ./database/data/${taito_env}.sql ]; then taito ${taito_options} db import:${taito_env} ./database/data/${taito_env}.sql; fi",
"taito-host-db-generate": "rm -rf docs/database &> /dev/null || true && mkdir -p docs/database && docker run --user $(id -u):$(id -g) --network $(echo ${PWD##*/} | tr '[:upper:]' '[:lower:]')_default -v `pwd`/docs/database:/output schemaspy/schemaspy:6.1.0 -t pgsql11 --port 5432 -u ${db_database_app_username} -db ${db_database_name} -host ${taito_project}-database -p ${taito_default_password}",
"taito-host-db-deploy": "if [ ${taito_env} = 'local' ]; then docker exec ${taito_project}-server python src/manage.py migrate; else docker compose -f docker-compose-cicd.yaml run --rm ${taito_project}-server-cicd sh -c 'echo Sleeping... && sleep 30 && echo Done sleeping && python src/manage.py migrate'; fi",
"manage": "taito exec:server:${taito_env} python src/manage.py",
"clean:storage": "if [ ${taito_env} = 'local' ] && [ -d storage ]; then echo Cleaning storage; rm -rf ./storage/bucket/*; rm -rf ./storage/.minio.sys/buckets/bucket/*/; fi",
"info:local": "yes | taito ${taito_options} secret show:${taito_env}",
"info": "yes | taito ${taito_options} secret show:${taito_env} basic-auth",
"lint": "echo Running lint locally && npm-run-all lint:server",
"lint:server": "taito exec:server npm run lint",
"unit": "npm-run-all unit:server",
"unit:server": "taito exec:server npm run unit",
"test": "npm-run-all test:server",
"test:server": "taito ${taito_options} util test:server:${taito_env}",
"code-check": "docker run --interactive --tty --rm --env CODECLIMATE_CODE=\"$PWD\" --volume \"$PWD\":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate engines:install && docker run --interactive --tty --rm --env CODECLIMATE_CODE=\"$PWD\" --volume \"$PWD\":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze",
"taito-host-code-check": "npm-run-all code-check",
"project-show": "cat PROJECT.md | sed -n -e '/^## Contacts.*$/,/^#.*$/{ /^## Contacts.*$/d; /^#.*$/d; p; }'",
"precommit:branch": "if git-branch-is -q test || git-branch-is -q uat || git-branch-is -q qa || git-branch-is -q stag || git-branch-is -q canary || git-branch-is -q cana || git-branch-is -q prod || git-branch-is -q master; then echo 'ERROR: You cannot commit changes directly to this environment branch. Only fast-forward merge is allowed.' && echo && exit 1; fi",
"precommit:lint": "echo 'SKIP: Skipping linting on commit since we are already continuously linting during development.'",
"husky:commit-msg": "commitlint --edit",
"husky:pre-commit": "if [ \"$taito_mode\" != 'ci' ]; then npm-run-all precommit:branch precommit:lint; fi",
"husky:pre-push": "if [ \"$taito_mode\" != 'ci' ]; then echo 'husky push check disabled because of tty problem: npm-run-all --parallel lint unit'; fi",
"release-pre:prod": "semantic-release --dry-run",
"release-post:prod": "semantic-release --no-ci"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
],
"rules": {
"type-enum": [
2,
"always",
[
"wip",
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"revert",
"build",
"ci",
"chore"
]
]
}
},
"release": {
"npmPublish": false,
"analyzeCommits": {
"preset": "angular",
"releaseRules": [
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "style",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "perf",
"release": "patch"
},
{
"type": "test",
"release": "patch"
},
{
"type": "revert",
"release": "patch"
},
{
"type": "build",
"release": "patch"
},
{
"type": "ci",
"release": "patch"
},
{
"type": "chore",
"release": "patch"
}
]
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/TaitoUnited/data-pipeline-template.git"
},
"devDependencies": {
"@commitlint/cli": "~16.1.0",
"@commitlint/config-conventional": "~16.0.0",
"git-branch-is": "~4.0.0",
"husky": "~7.0.4",
"npm-run-all": "~4.1.5",
"semantic-release": "~19.0.2"
}
}