-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathscrewdriver.yaml
162 lines (157 loc) · 3.87 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
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-app:
<<: *main-npm-test-job
environment:
PACKAGE: navi-app
main-c3:
<<: *main-npm-test-job
environment:
PACKAGE: '@yavin/c3'
main-core:
<<: *main-npm-test-job
environment:
PACKAGE: navi-core
main-client:
<<: *main-npm-test-job
environment:
PACKAGE: '@yavin/client'
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-model-types:
<<: *main-npm-test-job
environment:
PACKAGE: '@yavin/model-types'
main-notifications:
<<: *main-npm-test-job
environment:
PACKAGE: navi-notifications
main-reports:
<<: *main-npm-test-job
environment:
PACKAGE: navi-reports
main-perspective:
<<: *main-npm-test-job
environment:
PACKAGE: '@yavin/perspective'
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-app,
main-c3,
main-core,
main-client,
main-dashboards,
main-data,
main-directory,
main-notifications,
main-reports,
main-perspective,
main-webservice,
]
publish-npm:
requires:
- ~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
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