Skip to content

Commit

Permalink
feat: add jenkins support (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-ziv authored Oct 11, 2021
1 parent faaa213 commit 8a56bd4
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
60 changes: 60 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
pipeline {
agent any
options {
timestamps()
}
stages {
stage('Define docker node.') {
steps {
script {
nodeImage = docker.image("node:lts")
}
}
}
stage('run lint') {
steps {
script {
nodeImage.inside(
{
sh label: 'install tools', script:
'''
id
npm_config_cache=npm-cache
export HOME=.
yarn install
'''

sh label: 'run lint', script:
'''
yarn run eslint
yarn run typecheck
'''
}
)
}
}
}
stage('build') {
steps {
script {
nodeImage.inside(
{
sh label: 'build', script: 'yarn run build'
}
)
}
}
}
stage('run test') {
steps {
script {
nodeImage.inside(
{
sh label: 'run test', script: 'yarn run test'
}
)
}
}
}
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"docs:generate": "typedoc",
"docs:watch": "typedoc --watch",
"node": "node src/server.js",
"publish": "echo \"Publish script is not implemented\""
"publish": "echo \"publish script is not implemented\"",
"test": "echo \"test script is not implemented\""
},
"husky": {
"hooks": {
Expand Down

0 comments on commit 8a56bd4

Please sign in to comment.