Skip to content

Commit eb289ec

Browse files
committed
libcouchbase: fix amazon linux packages
1 parent d9dd356 commit eb289ec

File tree

3 files changed

+72
-1
lines changed

3 files changed

+72
-1
lines changed

libcouchbase/Jenkinsfile.erb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ def package_srpm(name, bits, relno, arch, mock, VERSION) {
270270
sudo mock --buildsrpm -r ${mock} --spec libcouchbase.spec --sources ${pwd()} --old-chroot \
271271
--resultdir="libcouchbase-${VERSION.tar()}_${name}${relno}_srpm"
272272
""".stripIndent())
273+
if (name == 'centos' && relno == 7 && arch == 'x86_64') {
274+
stash(includes: "libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}/*.src.rpm", name: "${name}${relno}-srpm")
275+
}
273276
}
274277
}
275278

@@ -698,7 +701,7 @@ pipeline {
698701
<% end %>
699702
}
700703
}
701-
<% if centos_dists.any? {|(relno, arch, bits, mock)| relno == 7 && arch = 'x86_64' } %>
704+
<% if centos_dists.any? {|(name, relno, arch, bits, mock)| relno == 7 && arch = 'x86_64' } %>
702705
stage('amzn2') {
703706
when {
704707
expression {

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ def package_srpm(name, bits, relno, arch, mock, VERSION) {
201201
sudo mock --buildsrpm -r ${mock} --spec libcouchbase.spec --sources ${pwd()} --old-chroot \
202202
--resultdir="libcouchbase-${VERSION.tar()}_${name}${relno}_srpm"
203203
""".stripIndent())
204+
if (name == 'centos' && relno == 7 && arch == 'x86_64') {
205+
stash(includes: "libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}/*.src.rpm", name: "${name}${relno}-srpm")
206+
}
204207
}
205208
}
206209

@@ -772,6 +775,37 @@ pipeline {
772775
}
773776
}
774777
}
778+
stage('amzn2') {
779+
when {
780+
expression {
781+
return !IS_GERRIT_TRIGGER.toBoolean()
782+
}
783+
}
784+
matrix {
785+
axes {
786+
axis {
787+
name 'PLATFORM'
788+
values 'x86_64', 'aarch64'
789+
}
790+
}
791+
agent { label PLATFORM == 'x86_64' ? 'amzn2' : 'qe-grav2-amzn2' }
792+
stages {
793+
stage('rpm') {
794+
steps {
795+
sh('sudo yum erase -y openssl-devel; sudo yum install -y openssl11-devel rpm-build yum-utils; cat /etc/os-release')
796+
unstash('centos7-srpm')
797+
sh('sudo yum-builddep -y libcouchbase-*/*.src.rpm')
798+
sh('rpmbuild --rebuild libcouchbase-*/*.src.rpm -D "_rpmdir output"')
799+
dir('output') {
800+
sh("mv ${PLATFORM} libcouchbase-${VERSION.tar()}_amzn2_${PLATFORM}")
801+
sh("tar cf libcouchbase-${VERSION.tar()}_amzn2_${PLATFORM}.tar libcouchbase-${VERSION.tar()}_amzn2_${PLATFORM}")
802+
archiveArtifacts(artifacts: "libcouchbase-${VERSION.tar()}_amzn2_${PLATFORM}.tar", fingerprint: true)
803+
}
804+
}
805+
}
806+
}
807+
}
808+
}
775809
stage('repositories') {
776810
when {
777811
expression {

libcouchbase/lcb-scripted-build-pipeline.groovy

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ def package_srpm(name, bits, relno, arch, mock, VERSION) {
201201
sudo mock --buildsrpm -r ${mock} --spec libcouchbase.spec --sources ${pwd()} --old-chroot \
202202
--resultdir="libcouchbase-${VERSION.tar()}_${name}${relno}_srpm"
203203
""".stripIndent())
204+
if (name == 'centos' && relno == 7 && arch == 'x86_64') {
205+
stash(includes: "libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}/*.src.rpm", name: "${name}${relno}-srpm")
206+
}
204207
}
205208
}
206209

@@ -637,5 +640,36 @@ pipeline {
637640
}
638641
}
639642
}
643+
stage('amzn2') {
644+
when {
645+
expression {
646+
return !IS_GERRIT_TRIGGER.toBoolean()
647+
}
648+
}
649+
matrix {
650+
axes {
651+
axis {
652+
name 'PLATFORM'
653+
values 'x86_64', 'aarch64'
654+
}
655+
}
656+
agent { label PLATFORM == 'x86_64' ? 'amzn2' : 'qe-grav2-amzn2' }
657+
stages {
658+
stage('rpm') {
659+
steps {
660+
sh('sudo yum erase -y openssl-devel; sudo yum install -y openssl11-devel rpm-build yum-utils; cat /etc/os-release')
661+
unstash('centos7-srpm')
662+
sh('sudo yum-builddep -y libcouchbase-*/*.src.rpm')
663+
sh('rpmbuild --rebuild libcouchbase-*/*.src.rpm -D "_rpmdir output"')
664+
dir('output') {
665+
sh("mv ${PLATFORM} libcouchbase-${VERSION.tar()}_amzn2_${PLATFORM}")
666+
sh("tar cf libcouchbase-${VERSION.tar()}_amzn2_${PLATFORM}.tar libcouchbase-${VERSION.tar()}_amzn2_${PLATFORM}")
667+
archiveArtifacts(artifacts: "libcouchbase-${VERSION.tar()}_amzn2_${PLATFORM}.tar", fingerprint: true)
668+
}
669+
}
670+
}
671+
}
672+
}
673+
}
640674
}
641675
}

0 commit comments

Comments
 (0)