Skip to content

Commit 7792b01

Browse files
committed
ci: try speed up checkout
Signed-off-by: Vitor Bandeira <[email protected]>
1 parent cb8d00b commit 7792b01

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

jenkins/public_tests_all.Jenkinsfile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,22 @@ node {
55
properties([copyArtifactPermission('${JOB_NAME},'+env.BRANCH_NAME)]);
66

77
stage('Checkout') {
8-
checkout scm;
8+
checkout([
9+
$class: 'GitSCM',
10+
branches: [[name: scm.branches[0].name]],
11+
doGenerateSubmoduleConfigurations: false,
12+
extensions: [
13+
[$class: 'CloneOption', noTags: false],
14+
[$class: 'SubmoduleOption', recursiveSubmodules: true]
15+
],
16+
submoduleCfg: [],
17+
userRemoteConfigs: scm.userRemoteConfigs
18+
]);
19+
def description = sh(script: "git log -1 --pretty=%B", returnStdout: true).trim();
20+
if (description.contains('ci') && description.contains('skip')) {
21+
currentBuild.result = 'SKIPPED'; // 'SUCCESS', 'SKIPPED'
22+
return;
23+
}
924
}
1025

1126
def DOCKER_IMAGE;

0 commit comments

Comments
 (0)