Skip to content

Commit a35a7f5

Browse files
committed
Fix Jenkinsfile format
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
1 parent d464058 commit a35a7f5

File tree

1 file changed

+51
-51
lines changed

1 file changed

+51
-51
lines changed

Jenkinsfile

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
11
#!/usr/bin/env groovy
22

33
node('rhel7'){
4-
stage('Checkout repo') {
5-
deleteDir()
6-
git url: 'https://github.com/redhat-developer/vscode-openshift-tools.git',
7-
branch: "${BRANCH}"
8-
}
4+
stage('Checkout repo') {
5+
deleteDir()
6+
git url: 'https://github.com/redhat-developer/vscode-openshift-tools.git',
7+
branch: "${BRANCH}"
8+
}
99

10-
stage('Install requirements') {
11-
def nodeHome = tool 'nodejs-12.13.1'
12-
env.PATH="${env.PATH}:${nodeHome}/bin"
13-
sh "npm install -g typescript vsce"
14-
}
10+
stage('Install requirements') {
11+
def nodeHome = tool 'nodejs-12.13.1'
12+
env.PATH="${env.PATH}:${nodeHome}/bin"
13+
sh "npm install -g typescript vsce"
14+
}
1515

16-
stage('Build') {
17-
sh "npm install"
18-
sh "npm run vscode:prepublish"
19-
}
16+
stage('Build') {
17+
sh "npm install"
18+
sh "npm run vscode:prepublish"
19+
}
2020

21-
withEnv(['JUNIT_REPORT_PATH=report.xml']) {
22-
stage('Test') {
23-
wrap([$class: 'Xvnc']) {
24-
sh "npm test"
25-
junit 'report.xml'
26-
}
27-
}
28-
}
21+
withEnv(['JUNIT_REPORT_PATH=report.xml']) {
22+
stage('Test') {
23+
wrap([$class: 'Xvnc']) {
24+
sh "npm test"
25+
junit 'report.xml'
26+
}
27+
}
28+
}
2929

30-
stage('Package') {
31-
def packageJson = readJSON file: 'package.json'
32-
packageJson.extensionDependencies = ["ms-kubernetes-tools.vscode-kubernetes-tools"]
33-
writeJSON file: 'package.json', json: packageJson, pretty: 4
34-
sh "vsce package -o openshift-connector-${packageJson.version}-${env.BUILD_NUMBER}.vsix"
35-
sh "sha256sum *.vsix > openshift-connector-${packageJson.version}-${env.BUILD_NUMBER}.vsix.sha256"
36-
sh "npm pack && mv vscode-openshift-connector-${packageJson.version}.tgz openshift-connector-${packageJson.version}-${env.BUILD_NUMBER}.tgz"
37-
sh "sha256sum *.tgz > openshift-connector-${packageJson.version}-${env.BUILD_NUMBER}.tgz.sha256"
38-
}
30+
stage('Package') {
31+
def packageJson = readJSON file: 'package.json'
32+
packageJson.extensionDependencies = ["ms-kubernetes-tools.vscode-kubernetes-tools"]
33+
writeJSON file: 'package.json', json: packageJson, pretty: 4
34+
sh "vsce package -o openshift-connector-${packageJson.version}-${env.BUILD_NUMBER}.vsix"
35+
sh "sha256sum *.vsix > openshift-connector-${packageJson.version}-${env.BUILD_NUMBER}.vsix.sha256"
36+
sh "npm pack && mv vscode-openshift-connector-${packageJson.version}.tgz openshift-connector-${packageJson.version}-${env.BUILD_NUMBER}.tgz"
37+
sh "sha256sum *.tgz > openshift-connector-${packageJson.version}-${env.BUILD_NUMBER}.tgz.sha256"
38+
}
3939

40-
if(params.UPLOAD_LOCATION) {
41-
stage('Snapshot') {
42-
def filesToPush = findFiles(glob: '**.vsix')
43-
sh "rsync -Pzrlt --rsh=ssh --protocol=28 *.vsix* ${UPLOAD_LOCATION}/snapshots/vscode-openshift-tools/"
44-
}
40+
if(params.UPLOAD_LOCATION) {
41+
stage('Snapshot') {
42+
def filesToPush = findFiles(glob: '**.vsix')
43+
sh "rsync -Pzrlt --rsh=ssh --protocol=28 *.vsix* ${UPLOAD_LOCATION}/snapshots/vscode-openshift-tools/"
4544
}
45+
}
4646

47-
if(publishToMarketPlace.equals('true')){
48-
timeout(time:5, unit:'DAYS') {
49-
input message:'Approve deployment?', submitter: 'msuman,degolovi'
50-
}
47+
if(publishToMarketPlace.equals('true')){
48+
timeout(time:5, unit:'DAYS') {
49+
input message:'Approve deployment?', submitter: 'msuman,degolovi'
50+
}
5151

52-
stage("Publish to Marketplace") {
53-
withCredentials([[$class: 'StringBinding', credentialsId: 'vscode_java_marketplace', variable: 'TOKEN']]) {
54-
def vsix = findFiles(glob: '**.vsix')
55-
sh 'vsce publish -p ${TOKEN} --packagePath' + " ${vsix[0].path}"
56-
}
57-
archive includes:"**.vsix*","**.tgz*"
52+
stage("Publish to Marketplace") {
53+
withCredentials([[$class: 'StringBinding', credentialsId: 'vscode_java_marketplace', variable: 'TOKEN']]) {
54+
def vsix = findFiles(glob: '**.vsix')
55+
sh 'vsce publish -p ${TOKEN} --packagePath' + " ${vsix[0].path}"
56+
}
57+
archive includes:"**.vsix*","**.tgz*"
5858

59-
stage "Promote the build to stable"
60-
sh "rsync -Pzrlt --rsh=ssh --protocol=28 *.vsix* ${UPLOAD_LOCATION}/stable/vscode-openshift-tools/"
61-
sh "rsync -Pzrlt --rsh=ssh --protocol=28 *.tgz* ${UPLOAD_LOCATION}/stable/vscode-openshift-tools/"
62-
}
63-
}
59+
stage "Promote the build to stable"
60+
sh "rsync -Pzrlt --rsh=ssh --protocol=28 *.vsix* ${UPLOAD_LOCATION}/stable/vscode-openshift-tools/"
61+
sh "rsync -Pzrlt --rsh=ssh --protocol=28 *.tgz* ${UPLOAD_LOCATION}/stable/vscode-openshift-tools/"
62+
}
63+
}
6464
}

0 commit comments

Comments
 (0)