-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
46 lines (43 loc) · 1.33 KB
/
Jenkinsfile
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
pipeline {
agent {
label "node"
}
stages {
stage('Doc') {
steps {
git 'https://devcentral.nasqueron.org/source/docs-www.git'
sh '''
npm install
npm run build
cd dist
tar czf ../www-nasqueron-docs.tar.gz *
'''
}
post {
success {
archiveArtifacts artifacts: 'www-nasqueron-docs.tar.gz'
}
}
}
stage('Publish') {
steps {
sshPublisher(
failOnError: true,
publishers: [
sshPublisherDesc(
configName: 'ysul-deploy',
transfers: [
sshTransfer(
sourceFiles: 'www-nasqueron-docs.tar.gz',
remoteDirectory: 'workspace',
cleanRemote: true,
execCommand: 'tar xzvf workspace/www-nasqueron-docs.tar.gz -C /var/wwwroot/nasqueron.org/docs/'
)
]
)
]
)
}
}
}
}