mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Update Jenkinsfile
This commit is contained in:
parent
0b41d32cbb
commit
dc8f4ffc2a
1 changed files with 17 additions and 16 deletions
33
services/real-time/Jenkinsfile
vendored
33
services/real-time/Jenkinsfile
vendored
|
@ -1,11 +1,6 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
|
|
||||||
agent {
|
agent any
|
||||||
docker {
|
|
||||||
image 'node:4.2.1'
|
|
||||||
args "-v /var/lib/jenkins/.npm:/tmp/.npm"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
HOME = "/tmp"
|
HOME = "/tmp"
|
||||||
|
@ -17,29 +12,35 @@ pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Set up') {
|
stage('Install') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'node:4.2.1'
|
||||||
|
args "-v /var/lib/jenkins/.npm:/tmp/.npm -e HOME=/tmp"
|
||||||
|
reuseNode true
|
||||||
|
}
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
// we need to disable logallrefupdates, else git clones during the npm install will require git to lookup the user id
|
// we need to disable logallrefupdates, else git clones during the npm install will require git to lookup the user id
|
||||||
// which does not exist in the container's /etc/passwd file, causing the clone to fail.
|
// which does not exist in the container's /etc/passwd file, causing the clone to fail.
|
||||||
sh 'git config --global core.logallrefupdates false'
|
sh 'git config --global core.logallrefupdates false'
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Install') {
|
|
||||||
steps {
|
|
||||||
sh 'rm -fr node_modules'
|
sh 'rm -fr node_modules'
|
||||||
sh 'npm install'
|
sh 'npm install'
|
||||||
sh 'npm rebuild'
|
sh 'npm rebuild'
|
||||||
sh 'npm install --quiet grunt-cli'
|
sh 'npm install --quiet grunt-cli'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Compile') {
|
stage('Compile and Test') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'node:4.2.1'
|
||||||
|
args "-v /var/lib/jenkins/.npm:/tmp/.npm -e HOME=/tmp"
|
||||||
|
reuseNode true
|
||||||
|
}
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'node_modules/.bin/grunt install'
|
sh 'node_modules/.bin/grunt install'
|
||||||
sh 'node_modules/.bin/grunt compile:acceptance_tests'
|
sh 'node_modules/.bin/grunt compile:acceptance_tests'
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Test') {
|
|
||||||
steps {
|
|
||||||
sh 'node_modules/.bin/grunt test:unit'
|
sh 'node_modules/.bin/grunt test:unit'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue