Skip to content

Commit 2ba7b1c

Browse files
ci: Update Jenkinsfile
Signed-off-by: 梦里不知身是客 <liang.tang.cx@gmail.com>
1 parent 8bf2932 commit 2ba7b1c

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Jenkinsfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ pipeline {
3333
environment {
3434
USER_NAME = 'Jenkins'
3535
}
36-
stages {
36+
37+
stages {
3738
stage('Check change') {
3839
when {
3940
expression { currentBuild.previousSuccessfulBuild != null }
@@ -59,7 +60,9 @@ pipeline {
5960
echo "no change,skip build"
6061
currentBuild.getRawBuild().getExecutor().interrupt(Result.NOT_BUILT)
6162
sleep(1)
62-
}
63+
} else {
64+
cleanWs()
65+
}
6366
}
6467
}
6568
}
@@ -235,12 +238,6 @@ pipeline {
235238
}
236239
}
237240

238-
stage('Clean Workspace') {
239-
steps {
240-
cleanWs()
241-
}
242-
}
243-
244241
}
245242
}
246243

0 commit comments

Comments
 (0)