Remove separate stage for checkout
We can reduce:
- additional check on GitHub PR
- additional box on standard jenkins view
diff --git a/vars/asfMavenTlpPlgnBuild.groovy b/vars/asfMavenTlpPlgnBuild.groovy
index f0ca2b7..83e0b51 100644
--- a/vars/asfMavenTlpPlgnBuild.groovy
+++ b/vars/asfMavenTlpPlgnBuild.groovy
@@ -167,27 +167,6 @@
}
ws( dir : "$wsDir" )
{
- stage("Checkout ${stageId}") {
- echo "NODE_NAME = ${env.NODE_NAME}"
- try {
- dir(stageDir) {
- checkout scm
- }
- } catch (Throwable e) {
- // First step to keep the workspace clean and safe disk space
- cleanWs()
-
- if (!taskContext.failFast) {
- throw e
- } else if (taskContext.failingFast == null) {
- taskContext.failingFast = stageId
- echo "[FAIL FAST] This is the first failure and likely root cause"
- throw e
- } else {
- echo "[FAIL FAST] ${taskContext.failingFast} had first failure, ignoring ${e.message}"
- }
- }
- }
stage("Build ${stageId}") {
if (taskContext.failingFast != null) {
cleanWs()
@@ -202,6 +181,7 @@
"PATH+MAVEN=${ tool "$jdkName" }/bin:${tool "$mvnName"}/bin",
"MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
dir (stageDir) {
+ checkout scm
if (isUnix()) {
sh 'df -hT'
sh cmd.join(' ')
diff --git a/vars/asfMavenTlpStdBuild.groovy b/vars/asfMavenTlpStdBuild.groovy
index 4071f7a..357f2c4 100644
--- a/vars/asfMavenTlpStdBuild.groovy
+++ b/vars/asfMavenTlpStdBuild.groovy
@@ -86,26 +86,6 @@
wsDir = 'F:\\short\\' + "$BUILD_TAG".replaceAll(/(.+)-maven-box-maven-(.+)/) { "m-${it[2]}" }
}
ws( dir : "$wsDir" ) {
- stage("Checkout ${stageId}") {
- echo "NODE_NAME = ${env.NODE_NAME}"
- try {
- dir('m') {
- checkout scm
- }
- } catch (Throwable e) {
- // First step to keep the workspace clean and safe disk space
- cleanWs()
- if (!failFast) {
- throw e
- } else if (failingFast == null) {
- failingFast = stageId
- echo "[FAIL FAST] This is the first failure and likely root cause"
- throw e
- } else {
- echo "[FAIL FAST] ${failingFast} had first failure, ignoring ${e.message}"
- }
- }
- }
stage("Build ${stageId}") {
if (failingFast != null) {
cleanWs()
@@ -122,7 +102,8 @@
// DISABLED DUE TO INFRA-17514 invokerPublisher(),
pipelineGraphPublisher(disabled: disablePublishers)
], publisherStrategy: 'EXPLICIT') {
- dir ('m') {
+ dir ('m') {
+ checkout scm
if (isUnix()) {
sh cmd.join(' ')
} else {