This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Jenkinsfile
74 lines (69 loc) · 1.45 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env groovy
// This example should be placed on the same folder where your package.json is encontered so your npm commands will work fine.
@Library('xenv-jenkins-lib') _
// or
// library identifier: 'xenv-jenkins-lib@master',
// retriever: modernSCM([$class: 'GitSCMSource',
// remote: 'https://github.com/pedrocesar-ti/Xenv-jenkins-lib.git'])
@Library('xenv-jenkins-lib') _
pipeline {
agent any
stages {
stage('NodeJS 6.14.4') {
steps {
script {
withNodenv('6.14.4', 'clean') {
sh "node --version"
}
}
}
}
stage('NodeJS 9.11.0') {
steps {
script {
withNodenv('9.11.0') {
sh "node --version"
}
}
}
}
stage('Ruby 2.5.1') {
steps {
script {
withRbenv() {
sh "ruby --version"
}
}
}
}
stage('Ruby 2.3.0') {
steps {
script {
withRbenv.purgeAll('rbenv')
withRbenv('2.3.0', 'clean') {
sh "ruby --version"
}
}
}
}
stage('Python 2.7') {
steps {
script {
withPyenv('2.7') {
sh "python --version"
}
}
}
}
stage('Python 3.7.0') {
steps {
script {
withPyenv() {
sh "python --version"
}
withPyenv.purgeAll('pyenv')
}
}
}
}
}