-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaws.Jenkinsfile
100 lines (90 loc) · 2.16 KB
/
aws.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
pipeline {
agent {
kubernetes {
defaultContainer 'idetools'
yamlFile 'Jenkins.pod.yaml'
}
}
environment {
BUILD_VERSION = sh(returnStdout: true, script: 'gitversion').trim()
NIGHTLY_VERSION = sh(returnStdout: true, script: './tools/nightlyversion').trim()
}
options {
timeout(time: 30, unit: 'MINUTES')
}
stages {
stage('vscode') {
stages {
stage('install') {
steps {
dir('vscode') {
sh 'npm install'
}
}
}
stage('lint') {
steps {
dir('vscode') {
sh 'npm run lint'
}
}
}
stage("test") {
steps {
dir("vscode") {
sh """
export DISPLAY=':99.0'
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
npm run jenkins-test
"""
}
}
post {
always {
dir("vscode") {
junit "junit.xml"
}
}
}
}
stage('compile') {
steps {
dir('vscode') {
sh 'npm run compile-prod'
}
}
}
stage('build package') {
steps {
dir('vscode') {
sh "npm version ${NIGHTLY_VERSION} --allow-same-version"
sh "npm run package"
}
}
post {
success {
archiveArtifacts artifacts: "vscode/toit-${NIGHTLY_VERSION}.vsix"
}
}
}
stage("publish") {
when {
anyOf {
tag 'v*'
}
}
steps {
dir('vscode') {
withCredentials([string(credentialsId: 'leon-azure-access-token', variable: 'AZURE_TOKEN')]) {
sh 'npm run vsce-publish'
}
withCredentials([string(credentialsId: 'leon-open-vsx-access-token', variable: 'OPEN_VSX_TOKEN')]) {
sh 'npm run ovsx-publish'
}
}
}
}
}
}
}
}