-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathJenkinsfile-release
63 lines (55 loc) · 1.79 KB
/
Jenkinsfile-release
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env groovy
pipeline {
agent {
label 'slave-group-release'
}
parameters {
string(name: 'version', defaultValue: '0.0.0', description: 'Release version')
string(name: 'branch', defaultValue: 'main', description: 'Branch to release from')
}
options {
timeout(time: 60, unit: 'MINUTES')
}
stages {
stage('Checkout') {
steps {
sh "git checkout ${branch}"
sh "git remote -v"
}
}
stage('Install release package') {
steps {
nodejs(nodeJSInstallationName: 'Node 18') {
sh 'rm -drf node_modules/'
sh 'npm config ls'
sh 'npm install'
sh 'npm install npm-release -g'
}
}
}
stage('Release') {
steps {
nodejs(nodeJSInstallationName: 'Node 18') {
withCredentials([string(credentialsId: 'npmauthtoken', variable: 'NPM_AUTH_TOKEN')]) {
sh './set-npm-auth-token.sh'
}
sh "git status"
sh "git diff"
sh "npm-release ${version}"
}
}
}
stage('Generate JS API docs and upload') {
steps {
nodejs(nodeJSInstallationName: 'Node 18') {
sh './node_modules/.bin/jsdoc lib/*.js'
sh 'mv out apidocs'
sh 'mkdir 1.0'
sh 'mv apidocs 1.0'
sh 'rsync -rv --protocol=28 1.0 [email protected]:/docs_htdocs/infinispan/hotrod-clients/javascript'
sh 'mv 1.0 out'
}
}
}
}
}