Setup Jenkins Dockerfile for unit tests
Some checks failed
Core Repos/Homepage/pipeline/head There was a failure building this commit
Some checks failed
Core Repos/Homepage/pipeline/head There was a failure building this commit
This commit is contained in:
46
Jenkinsfile
vendored
46
Jenkinsfile
vendored
@@ -1,20 +1,32 @@
|
||||
pipeline {
|
||||
agent { docker { image 'node:13.10-alpine' } }
|
||||
stages {
|
||||
stage('setup') {
|
||||
steps {
|
||||
sh 'npm install'
|
||||
}
|
||||
}
|
||||
stage('build') {
|
||||
steps {
|
||||
sh 'node_modules/.bin/ng build --prod'
|
||||
}
|
||||
}
|
||||
stage('lint') {
|
||||
steps {
|
||||
sh 'node_modules/.bin/ng lint'
|
||||
}
|
||||
}
|
||||
agent {
|
||||
dockerfile {
|
||||
filename 'Dockerfile.jenkins'
|
||||
dir '.'
|
||||
args '-e CHROME_BIN=/bin/chromium -e NG_CLI_ANALYTICS="false"'
|
||||
}
|
||||
}
|
||||
stages {
|
||||
stage('setup') {
|
||||
steps {
|
||||
sh 'npm install'
|
||||
}
|
||||
}
|
||||
stage('build') {
|
||||
steps {
|
||||
sh 'node_modules/.bin/ng build --prod'
|
||||
}
|
||||
}
|
||||
stage('lint') {
|
||||
steps {
|
||||
sh 'node_modules/.bin/ng lint'
|
||||
}
|
||||
}
|
||||
stage('test') {
|
||||
steps {
|
||||
sh 'node_modules/.bin/ng test --watch=false --progress=false --browsers=ChomeHeadlessCI'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user