Skip to content

Commit d31c69b

Browse files
committed
libcouchbase: try to workaround cleanWs issue
1 parent 83d01cc commit d31c69b

File tree

4 files changed

+30
-14
lines changed

4 files changed

+30
-14
lines changed

libcouchbase/Jenkinsfile.erb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,15 @@ pipeline {
236236
booleanParam(name: "USE_TLS", defaultValue: false)
237237
booleanParam(name: "USE_CERT_AUTH", defaultValue: false)
238238
}
239+
post {
240+
always {
241+
cleanWs(cleanWhenNotBuilt: false, deleteDirs: true, disableDeferredWipeout: true)
242+
}
243+
}
239244
stages {
240245
stage('prepare and validate') {
241246
agent { label 'centos7 || centos6' }
242247
steps {
243-
cleanWs()
244248
script {
245249
if (IS_GERRIT_TRIGGER.toBoolean()) {
246250
currentBuild.displayName = "cv-${BUILD_NUMBER}"
@@ -555,7 +559,7 @@ pipeline {
555559
stages {
556560
stage('<%= name[0] %><%= bits %>v<%= relno %>') {
557561
steps {
558-
dir('ws_<%= name %><%= bits %>_v<%= relno %>') {
562+
dir('ws_<%= name %><%= relno %>-<%= bits %>') {
559563
sh("sudo chown couchbase:couchbase -R .")
560564
deleteDir()
561565
unstash 'libcouchbase'
@@ -713,7 +717,7 @@ def package_deb(name, arch, codename, VERSION) {
713717
}
714718

715719
def package_srpm(name, bits, relno, arch, mock, VERSION) {
716-
dir("ws_${name}${bits}_v${relno}/build") {
720+
dir("ws_${name}${relno}-${bits}/build") {
717721
unstash 'tarball'
718722
sh("""
719723
sed 's/@VERSION@/${VERSION.rpmVer()}/g;s/@RELEASE@/${VERSION.rpmRel()}/g;s/@TARREDAS@/${VERSION.tarName()}/g' \
@@ -727,7 +731,7 @@ def package_srpm(name, bits, relno, arch, mock, VERSION) {
727731
}
728732

729733
def package_rpm(bits, relno, arch, mock, VERSION) {
730-
dir("ws_${name}${bits}_v${relno}/build") {
734+
dir("ws_${name}${relno}-${bits}/build") {
731735
sh("""
732736
sudo mock --rebuild -r ${mock} --resultdir="libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}" --old-chroot \
733737
--verbose libcouchbase-${VERSION.tar()}_${name}${relno}_srpm/libcouchbase-${VERSION.version()}-${VERSION.rpmRel()}.el${relno}.src.rpm

libcouchbase/lcb-lnx-scripted-build-pipeline.groovy

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,15 @@ pipeline {
168168
booleanParam(name: "USE_TLS", defaultValue: false)
169169
booleanParam(name: "USE_CERT_AUTH", defaultValue: false)
170170
}
171+
post {
172+
always {
173+
cleanWs(cleanWhenNotBuilt: false, deleteDirs: true, disableDeferredWipeout: true)
174+
}
175+
}
171176
stages {
172177
stage('prepare and validate') {
173178
agent { label 'centos7 || centos6' }
174179
steps {
175-
cleanWs()
176180
script {
177181
if (IS_GERRIT_TRIGGER.toBoolean()) {
178182
currentBuild.displayName = "cv-${BUILD_NUMBER}"
@@ -355,7 +359,7 @@ pipeline {
355359
stages {
356360
stage('c64v7') {
357361
steps {
358-
dir('ws_centos64_v7') {
362+
dir('ws_centos7-64') {
359363
sh("sudo chown couchbase:couchbase -R .")
360364
deleteDir()
361365
unstash 'libcouchbase'
@@ -379,7 +383,7 @@ pipeline {
379383
stages {
380384
stage('r64v8') {
381385
steps {
382-
dir('ws_rhel64_v8') {
386+
dir('ws_rhel8-64') {
383387
sh("sudo chown couchbase:couchbase -R .")
384388
deleteDir()
385389
unstash 'libcouchbase'
@@ -752,7 +756,7 @@ def package_deb(name, arch, codename, VERSION) {
752756
}
753757

754758
def package_srpm(name, bits, relno, arch, mock, VERSION) {
755-
dir("ws_${name}${bits}_v${relno}/build") {
759+
dir("ws_${name}${relno}-${bits}/build") {
756760
unstash 'tarball'
757761
sh("""
758762
sed 's/@VERSION@/${VERSION.rpmVer()}/g;s/@RELEASE@/${VERSION.rpmRel()}/g;s/@TARREDAS@/${VERSION.tarName()}/g' \
@@ -766,7 +770,7 @@ def package_srpm(name, bits, relno, arch, mock, VERSION) {
766770
}
767771

768772
def package_rpm(bits, relno, arch, mock, VERSION) {
769-
dir("ws_${name}${bits}_v${relno}/build") {
773+
dir("ws_${name}${relno}-${bits}/build") {
770774
sh("""
771775
sudo mock --rebuild -r ${mock} --resultdir="libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}" --old-chroot \
772776
--verbose libcouchbase-${VERSION.tar()}_${name}${relno}_srpm/libcouchbase-${VERSION.version()}-${VERSION.rpmRel()}.el${relno}.src.rpm

libcouchbase/lcb-scripted-build-pipeline.groovy

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,15 @@ pipeline {
168168
booleanParam(name: "USE_TLS", defaultValue: false)
169169
booleanParam(name: "USE_CERT_AUTH", defaultValue: false)
170170
}
171+
post {
172+
always {
173+
cleanWs(cleanWhenNotBuilt: false, deleteDirs: true, disableDeferredWipeout: true)
174+
}
175+
}
171176
stages {
172177
stage('prepare and validate') {
173178
agent { label 'centos7 || centos6' }
174179
steps {
175-
cleanWs()
176180
script {
177181
if (IS_GERRIT_TRIGGER.toBoolean()) {
178182
currentBuild.displayName = "cv-${BUILD_NUMBER}"
@@ -448,7 +452,7 @@ pipeline {
448452
stages {
449453
stage('c64v7') {
450454
steps {
451-
dir('ws_centos64_v7') {
455+
dir('ws_centos7-64') {
452456
sh("sudo chown couchbase:couchbase -R .")
453457
deleteDir()
454458
unstash 'libcouchbase'
@@ -606,7 +610,7 @@ def package_deb(name, arch, codename, VERSION) {
606610
}
607611

608612
def package_srpm(name, bits, relno, arch, mock, VERSION) {
609-
dir("ws_${name}${bits}_v${relno}/build") {
613+
dir("ws_${name}${relno}-${bits}/build") {
610614
unstash 'tarball'
611615
sh("""
612616
sed 's/@VERSION@/${VERSION.rpmVer()}/g;s/@RELEASE@/${VERSION.rpmRel()}/g;s/@TARREDAS@/${VERSION.tarName()}/g' \
@@ -620,7 +624,7 @@ def package_srpm(name, bits, relno, arch, mock, VERSION) {
620624
}
621625

622626
def package_rpm(bits, relno, arch, mock, VERSION) {
623-
dir("ws_${name}${bits}_v${relno}/build") {
627+
dir("ws_${name}${relno}-${bits}/build") {
624628
sh("""
625629
sudo mock --rebuild -r ${mock} --resultdir="libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}" --old-chroot \
626630
--verbose libcouchbase-${VERSION.tar()}_${name}${relno}_srpm/libcouchbase-${VERSION.version()}-${VERSION.rpmRel()}.el${relno}.src.rpm

libcouchbase/lcb-win-scripted-build-pipeline.groovy

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,15 @@ pipeline {
168168
booleanParam(name: "USE_TLS", defaultValue: false)
169169
booleanParam(name: "USE_CERT_AUTH", defaultValue: false)
170170
}
171+
post {
172+
always {
173+
cleanWs(cleanWhenNotBuilt: false, deleteDirs: true, disableDeferredWipeout: true)
174+
}
175+
}
171176
stages {
172177
stage('prepare and validate') {
173178
agent { label 'centos7 || centos6' }
174179
steps {
175-
cleanWs()
176180
script {
177181
if (IS_GERRIT_TRIGGER.toBoolean()) {
178182
currentBuild.displayName = "cv-${BUILD_NUMBER}"

0 commit comments

Comments
 (0)