This commit is contained in:
parent
c87e5ad8a8
commit
15d6f5f674
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
|
@ -1,18 +1,21 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent any
|
||||||
node {
|
|
||||||
label 'main'
|
|
||||||
customWorkspace '/var/www/ellpeck'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stages {
|
stages {
|
||||||
|
stage('Pull') {
|
||||||
|
when {
|
||||||
|
branch 'master'
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh '''cd /var/www/ellpeck
|
||||||
|
git pull'''
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Node') {
|
stage('Node') {
|
||||||
when {
|
when {
|
||||||
branch 'master'
|
branch 'master'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh '''ls
|
sh '''cd /var/www/ellpeck/node
|
||||||
cd /var/www/ellpeck/node
|
|
||||||
npm install
|
npm install
|
||||||
node blog.js
|
node blog.js
|
||||||
node rss.js'''
|
node rss.js'''
|
||||||
|
|
Loading…
Reference in a new issue