-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmutato.yml
More file actions
32 lines (29 loc) · 828 Bytes
/
mutato.yml
File metadata and controls
32 lines (29 loc) · 828 Bytes
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
{% set productionBranch = "master" %}
{% set imageTag = "latest" if git.branch == productionBranch else git.branch %}
containers:
- docker:
name: mutato
file: Dockerfile
uri: stelligent/mutato:{{ imageTag }}
events:
pre-build: npm-test
{% if git.branch == productionBranch %}
post-build: npm-deploy
{% endif %}
actions:
- docker:
name: npm-test
container: node:lts
cmd:
- npm install --allow-root --unsafe-perm
- USER=root npm test
{% if git.branch == productionBranch %}
- docker:
name: npm-deploy
container: node:lts
cmd:
- npm install --allow-root --unsafe-perm
- npm run build
- echo //registry.npmjs.org/:_authToken={{ env("NPM_TOKEN") }} > .npmrc
- npm publish --access=public
{% endif %}