forked from yavin-dev/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
screwdriver.yaml
174 lines (168 loc) · 4.59 KB
/
screwdriver.yaml
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
cache:
pipeline: [~/.npm, ~/.gradle]
shared:
image: maven:3.8.2-openjdk-11
annotations:
screwdriver.cd/ram: TURBO
screwdriver.cd/cpu: TURBO
steps:
- .: &install-node
install-node: |
sd-cmd exec screwdriver/install-nodejs@latest $NODE_VERSION
export NVM_DIR="$HOME/.nvm" && . "$NVM_DIR/nvm.sh" && nvm use node
- .: &npm-cache-verify
npm-cache-verify: npm cache verify
- .: &npm-ci
npm-ci: npm ci --unsafe-perm
- .: &install-chrome
install-chrome: ./build-scripts/setup-chrome.sh
jobs:
main-npm-test-job: &main-npm-test-job
steps:
- *install-node
- *npm-cache-verify
- *npm-ci
- *install-chrome
- test-package: npx lerna run test --scope $PACKAGE --stream;
requires:
- ~pr
- ~commit
environment:
NODE_VERSION: 14.16.1
JOBS: 4
jobs:
lint:
<<: *main-npm-test-job
steps:
- *install-node
- *npm-ci
# TODO add lint meta https://docs.screwdriver.cd/user-guide/metadata#additional-pull-request-checks
- lint-pretty: npx prettier -c --config prettier.config.js packages/*/{addon,tests}/**/*.{js,ts};
- lint-styles: npx stylelint "**/*.scss";
- lint-addons: npx lerna run lint --stream;
main-admin:
<<: *main-npm-test-job
environment:
PACKAGE: navi-admin
main-app:
<<: *main-npm-test-job
environment:
PACKAGE: navi-app
main-core:
<<: *main-npm-test-job
environment:
PACKAGE: navi-core
main-dashboards:
<<: *main-npm-test-job
environment:
PACKAGE: navi-dashboards
main-data:
<<: *main-npm-test-job
environment:
PACKAGE: navi-data
main-directory:
<<: *main-npm-test-job
environment:
PACKAGE: navi-directory
main-notifications:
<<: *main-npm-test-job
environment:
PACKAGE: navi-notifications
main-reports:
<<: *main-npm-test-job
environment:
PACKAGE: navi-reports
main-search:
<<: *main-npm-test-job
environment:
PACKAGE: navi-search
main-webservice:
steps:
- *install-node
- *npm-ci
- test-navi-webservice: cd packages/webservice && ./gradlew check && cd -;
requires:
- ~pr
- ~commit
main:
annotations:
screwdriver.cd/ram: MICRO
screwdriver.cd/cpu: MICRO
steps:
- echo "success"
requires:
[
lint,
main-admin,
main-app,
main-core,
main-dashboards,
main-data,
main-directory,
main-notifications,
main-reports,
main-search,
main-webservice,
]
alpha-main:
steps:
- *install-node
- *npm-ci
- *install-chrome
- test-navi-admin: npx lerna run test --scope navi-admin --stream;
- test-navi-app: npx lerna run test --scope navi-app --stream;
- test-navi-core: npx lerna run test --scope navi-core --stream;
- test-navi-dashboards: npx lerna run test --scope navi-dashboards --stream;
- test-navi-data: npx lerna run test --scope navi-data --stream;
- test-navi-directory: npx lerna run test --scope navi-directory --stream;
- test-navi-notifications: npx lerna run test --scope navi-notifications --stream;
- test-navi-reports: npx lerna run test --scope navi-reports --stream;
- test-navi-search: npx lerna run test --scope navi-search --stream;
- test-navi-webservice: cd packages/webservice && ./gradlew check && cd -;
requires:
- ~commit:0.2.x-alpha
- ~pr:0.2.x-alpha
publish-npm:
requires:
- ~main
- ~alpha-main
environment:
GIT_SHALLOW_CLONE: false
steps:
- *install-node
- *npm-ci
- publish: ./scripts/npm-publish.sh
secrets:
- NPM_TOKEN
publish-maven:
annotations:
screwdriver.cd/ram: LOW
screwdriver.cd/cpu: LOW
requires:
- ~main
- ~alpha-main
steps:
- decrypt: ./scripts/decrypt.sh
- publish: ./scripts/maven-publish.sh
secrets:
- GPG_KEY
- GPG_ENCPHRASE
- OSSRH_TOKEN
- OSSRH_USER
- GPG_PASSPHRASE
gh-pages:
requires: main
environment:
BUILD_NAVI_DEMO: true
steps:
- *install-node
- *npm-ci
- setup-ci: git clone https://github.com/screwdriver-cd/toolbox.git /tmp/ci
- build-pages: |
cd packages/app
npx ember github-pages:commit --message "Deploy gh-pages from $SD_BUILD_SHA" --destination ../../
- deploy: |
. /tmp/ci/git-ssh.sh
git push origin gh-pages:gh-pages
secrets:
- GIT_KEY_BASE64