Skip to content

Commit

Permalink
libcouchbase: try to workaround cleanWs issue
Browse files Browse the repository at this point in the history
  • Loading branch information
avsej committed Oct 7, 2022
1 parent 83d01cc commit d31c69b
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 14 deletions.
12 changes: 8 additions & 4 deletions libcouchbase/Jenkinsfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,15 @@ pipeline {
booleanParam(name: "USE_TLS", defaultValue: false)
booleanParam(name: "USE_CERT_AUTH", defaultValue: false)
}
post {
always {
cleanWs(cleanWhenNotBuilt: false, deleteDirs: true, disableDeferredWipeout: true)
}
}
stages {
stage('prepare and validate') {
agent { label 'centos7 || centos6' }
steps {
cleanWs()
script {
if (IS_GERRIT_TRIGGER.toBoolean()) {
currentBuild.displayName = "cv-${BUILD_NUMBER}"
Expand Down Expand Up @@ -555,7 +559,7 @@ pipeline {
stages {
stage('<%= name[0] %><%= bits %>v<%= relno %>') {
steps {
dir('ws_<%= name %><%= bits %>_v<%= relno %>') {
dir('ws_<%= name %><%= relno %>-<%= bits %>') {
sh("sudo chown couchbase:couchbase -R .")
deleteDir()
unstash 'libcouchbase'
Expand Down Expand Up @@ -713,7 +717,7 @@ def package_deb(name, arch, codename, VERSION) {
}

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

def package_rpm(bits, relno, arch, mock, VERSION) {
dir("ws_${name}${bits}_v${relno}/build") {
dir("ws_${name}${relno}-${bits}/build") {
sh("""
sudo mock --rebuild -r ${mock} --resultdir="libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}" --old-chroot \
--verbose libcouchbase-${VERSION.tar()}_${name}${relno}_srpm/libcouchbase-${VERSION.version()}-${VERSION.rpmRel()}.el${relno}.src.rpm
Expand Down
14 changes: 9 additions & 5 deletions libcouchbase/lcb-lnx-scripted-build-pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,15 @@ pipeline {
booleanParam(name: "USE_TLS", defaultValue: false)
booleanParam(name: "USE_CERT_AUTH", defaultValue: false)
}
post {
always {
cleanWs(cleanWhenNotBuilt: false, deleteDirs: true, disableDeferredWipeout: true)
}
}
stages {
stage('prepare and validate') {
agent { label 'centos7 || centos6' }
steps {
cleanWs()
script {
if (IS_GERRIT_TRIGGER.toBoolean()) {
currentBuild.displayName = "cv-${BUILD_NUMBER}"
Expand Down Expand Up @@ -355,7 +359,7 @@ pipeline {
stages {
stage('c64v7') {
steps {
dir('ws_centos64_v7') {
dir('ws_centos7-64') {
sh("sudo chown couchbase:couchbase -R .")
deleteDir()
unstash 'libcouchbase'
Expand All @@ -379,7 +383,7 @@ pipeline {
stages {
stage('r64v8') {
steps {
dir('ws_rhel64_v8') {
dir('ws_rhel8-64') {
sh("sudo chown couchbase:couchbase -R .")
deleteDir()
unstash 'libcouchbase'
Expand Down Expand Up @@ -752,7 +756,7 @@ def package_deb(name, arch, codename, VERSION) {
}

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

def package_rpm(bits, relno, arch, mock, VERSION) {
dir("ws_${name}${bits}_v${relno}/build") {
dir("ws_${name}${relno}-${bits}/build") {
sh("""
sudo mock --rebuild -r ${mock} --resultdir="libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}" --old-chroot \
--verbose libcouchbase-${VERSION.tar()}_${name}${relno}_srpm/libcouchbase-${VERSION.version()}-${VERSION.rpmRel()}.el${relno}.src.rpm
Expand Down
12 changes: 8 additions & 4 deletions libcouchbase/lcb-scripted-build-pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,15 @@ pipeline {
booleanParam(name: "USE_TLS", defaultValue: false)
booleanParam(name: "USE_CERT_AUTH", defaultValue: false)
}
post {
always {
cleanWs(cleanWhenNotBuilt: false, deleteDirs: true, disableDeferredWipeout: true)
}
}
stages {
stage('prepare and validate') {
agent { label 'centos7 || centos6' }
steps {
cleanWs()
script {
if (IS_GERRIT_TRIGGER.toBoolean()) {
currentBuild.displayName = "cv-${BUILD_NUMBER}"
Expand Down Expand Up @@ -448,7 +452,7 @@ pipeline {
stages {
stage('c64v7') {
steps {
dir('ws_centos64_v7') {
dir('ws_centos7-64') {
sh("sudo chown couchbase:couchbase -R .")
deleteDir()
unstash 'libcouchbase'
Expand Down Expand Up @@ -606,7 +610,7 @@ def package_deb(name, arch, codename, VERSION) {
}

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

def package_rpm(bits, relno, arch, mock, VERSION) {
dir("ws_${name}${bits}_v${relno}/build") {
dir("ws_${name}${relno}-${bits}/build") {
sh("""
sudo mock --rebuild -r ${mock} --resultdir="libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}" --old-chroot \
--verbose libcouchbase-${VERSION.tar()}_${name}${relno}_srpm/libcouchbase-${VERSION.version()}-${VERSION.rpmRel()}.el${relno}.src.rpm
Expand Down
6 changes: 5 additions & 1 deletion libcouchbase/lcb-win-scripted-build-pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,15 @@ pipeline {
booleanParam(name: "USE_TLS", defaultValue: false)
booleanParam(name: "USE_CERT_AUTH", defaultValue: false)
}
post {
always {
cleanWs(cleanWhenNotBuilt: false, deleteDirs: true, disableDeferredWipeout: true)
}
}
stages {
stage('prepare and validate') {
agent { label 'centos7 || centos6' }
steps {
cleanWs()
script {
if (IS_GERRIT_TRIGGER.toBoolean()) {
currentBuild.displayName = "cv-${BUILD_NUMBER}"
Expand Down

0 comments on commit d31c69b

Please sign in to comment.