@@ -3,40 +3,42 @@ properties properties: [
3
3
[$class : ' GithubProjectProperty' , displayName : ' ' , projectUrlStr : ' https://github.com/NathanWalker/nativescript-ngx-fonticon' ],
4
4
]
5
5
6
- node(' nativescript' ) {
7
- def buildNumber = env. BUILD_NUMBER
8
- def branchName = env. BRANCH_NAME
9
- def workspace = env. WORKSPACE
10
- def buildUrl = env. BUILD_URL
6
+ timeout(60 ) {
7
+ node(' nativescript' ) {
8
+ def buildNumber = env. BUILD_NUMBER
9
+ def branchName = env. BRANCH_NAME
10
+ def workspace = env. WORKSPACE
11
+ def buildUrl = env. BUILD_URL
11
12
12
- // PRINT ENVIRONMENT TO JOB
13
- echo " workspace directory is $workspace "
14
- echo " build URL is $buildUrl "
15
- echo " build Number is $buildNumber "
16
- echo " branch name is $branchName "
17
- echo " PATH is $env . PATH "
13
+ // PRINT ENVIRONMENT TO JOB
14
+ echo " workspace directory is $workspace "
15
+ echo " build URL is $buildUrl "
16
+ echo " build Number is $buildNumber "
17
+ echo " branch name is $branchName "
18
+ echo " PATH is $env . PATH "
18
19
19
- try {
20
- stage(' Checkout' ) {
21
- checkout scm
22
- }
20
+ try {
21
+ stage(' Checkout' ) {
22
+ checkout scm
23
+ }
23
24
24
- stage(' Build' ) {
25
- sh " npm run clean && npm run build"
26
- }
25
+ stage(' Build' ) {
26
+ sh " npm run clean && npm run build"
27
+ }
27
28
28
- stage(' Test' ) {
29
- sh " cd src && npm i .. && tns build android && tns build ios"
30
- }
29
+ stage(' Test' ) {
30
+ sh " cd src && npm i .. && tns build android && tns build ios"
31
+ }
31
32
32
- stage(' Publish NPM snapshot' ) {
33
- def currentVersion = sh(returnStdout : true , script : " npm version | grep \" {\" | tr -s ':' | cut -d \" '\" -f 4" ). trim()
34
- def newVersion = " ${ currentVersion} -${ branchName} -${ buildNumber} "
35
- sh " npm version ${ newVersion} --no-git-tag-version && npm publish --tag next"
36
- }
33
+ stage(' Publish NPM snapshot' ) {
34
+ def currentVersion = sh(returnStdout : true , script : " npm version | grep \" {\" | tr -s ':' | cut -d \" '\" -f 4" ). trim()
35
+ def newVersion = " ${ currentVersion} -${ branchName} -${ buildNumber} "
36
+ sh " npm version ${ newVersion} --no-git-tag-version && npm publish --tag next"
37
+ }
37
38
38
- } catch (e) {
39
- mail
subject :
" ${ env.JOB_NAME} (${ env.BUILD_NUMBER} ): Error on build" ,
to :
' [email protected] ' ,
body :
" Please go to ${ env.BUILD_URL} ."
40
- throw e
39
+ } catch (e) {
40
+ mail
subject :
" ${ env.JOB_NAME} (${ env.BUILD_NUMBER} ): Error on build" ,
to :
' [email protected] ' ,
body :
" Please go to ${ env.BUILD_URL} ."
41
+ throw e
42
+ }
41
43
}
42
44
}
0 commit comments