Skip to content

Commit 3836afe

Browse files
committed
Подготовка к выпуску rc.7
(cherry picked from commit 631d30a)
1 parent 72b3d14 commit 3836afe

File tree

1 file changed

+45
-27
lines changed

1 file changed

+45
-27
lines changed

Jenkinsfile

Lines changed: 45 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,11 @@ pipeline {
55

66
environment {
77
VersionPrefix = '2.0.0'
8-
VersionSuffix = 'rc6'
8+
VersionSuffix = 'rc.7'
99
outputEnc = '65001'
1010
}
1111

1212
stages {
13-
//stage('Prepare Linux Environment') {
14-
// agent{ label 'master'}
15-
// steps{
16-
// dir('install'){
17-
// sh 'chmod +x make-dockers.sh && ./make-dockers.sh'
18-
// }
19-
// withCredentials([usernamePassword(credentialsId: 'docker-hub', passwordVariable: 'dockerpassword', usernameVariable: 'dockeruser')]) {
20-
// sh """
21-
// docker login -p $dockerpassword -u $dockeruser
22-
// docker push oscript/onescript-builder:deb
23-
// docker push oscript/onescript-builder:rpm
24-
// docker push oscript/onescript-builder:gcc
25-
// """.stripIndent()
26-
// }
27-
// }
28-
//}
2913
stage('Build'){
3014
parallel {
3115
stage('Windows Build') {
@@ -228,16 +212,17 @@ pipeline {
228212
}
229213
}
230214
agent { label 'master' }
215+
options { skipDefaultCheckout() }
231216

232217
steps {
233218
cleanWs()
219+
234220
unstash 'dist'
235221
unstash 'vsix'
236222

237223
dir('targetContent') {
238224
sh '''
239225
ZIPS=../built
240-
NUGET=../built/nuget
241226
VSIX=../built/vscode
242227
mv $ZIPS/*.zip ./
243228
mv $VSIX/*.vsix ./
@@ -255,9 +240,14 @@ pipeline {
255240
}
256241
}
257242
agent { label 'master' }
258-
243+
options { skipDefaultCheckout() }
244+
245+
environment {
246+
CODENAME = 'preview'
247+
}
248+
259249
steps {
260-
250+
checkout scm
261251
unstash 'dist'
262252
unstash 'vsix'
263253

@@ -269,29 +259,39 @@ pipeline {
269259
mv $ZIPS/*.zip ./
270260
mv $VSIX/*.vsix ./
271261
272-
TARGET="/var/www/oscript.io/download/versions/preview/"
262+
TARGET="/var/www/oscript.io/download/versions/${CODENAME}/"
273263
sudo rsync -rv --delete --exclude mddoc*.zip --exclude *.src.rpm . $TARGET
274264
'''.stripIndent()
275265
}
266+
267+
sh '''
268+
TARGET_DIR="/var/www/oscript.io/markdown/versions/"
269+
cp install/release-notes.md "${TARGET_DIR}/${CODENAME}.md"
270+
cp install/release-notes.md "${TARGET_DIR}/${VersionPrefix}.md"
271+
'''.stripIndent()
276272
}
277273
}
278-
274+
279275
stage ('Publishing latest') {
280276
when { anyOf {
281-
branch 'latest';
277+
branch 'release/latest';
282278
}
283279
}
284280
agent { label 'master' }
285-
281+
options { skipDefaultCheckout() }
282+
283+
environment {
284+
CODENAME = 'preview'
285+
}
286+
286287
steps {
287-
288+
checkout scm
288289
unstash 'dist'
289290
unstash 'vsix'
290-
291+
291292
dir('targetContent') {
292293
sh '''
293294
ZIPS=../built
294-
NUGET=../built/nuget
295295
VSIX=../built/vscode
296296
mv $ZIPS/*.zip ./
297297
mv $VSIX/*.vsix ./
@@ -302,5 +302,23 @@ pipeline {
302302
}
303303
}
304304
}
305+
306+
stage ('Publishing artifacts to clouds') {
307+
when {
308+
anyOf {
309+
branch 'release/latest';
310+
branch 'release/preview';
311+
}
312+
}
313+
314+
agent { label 'windows' }
315+
316+
steps{
317+
unstash 'dist'
318+
withCredentials([string(credentialsId: 'NuGetToken', variable: 'NUGET_TOKEN')]) {
319+
bat "chcp $outputEnc > nul\r\n\"${tool 'MSBuild'}\" Build.csproj /t:PublishNuget /p:NugetToken=$NUGET_TOKEN"
320+
}
321+
}
322+
}
305323
}
306324
}

0 commit comments

Comments
 (0)