Skip to content

Commit d9dd356

Browse files
committed
libcouchbase: update packages
1 parent 455469f commit d9dd356

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

libcouchbase/Jenkinsfile.repo.erb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ pipeline {
1515
<%
1616
yum_distros = [
1717
['centos7', 'el7', 'x86_64'],
18-
# Error: Failed to download metadata for repo 'baseos': Cannot prepare internal mirrorlist: No URLs in mirrorlist
19-
# ['centos8', 'el8', 'x86_64'],
18+
['rhel8', 'el8', 'x86_64'],
2019
['amzn2', 'amzn2', 'x86_64'],
2120
['amzn2', 'amzn2', 'aarch64'],
2221
]

libcouchbase/lcb-repo-pipeline.groovy

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,49 @@ gpgkey = https://sdk-snapshots.couchbase.com/libcouchbase/couchbase.key
5353
}
5454
}
5555

56+
stage('rhel8 x86_64') {
57+
agent { label 'centos7-signing' }
58+
steps {
59+
cleanWs()
60+
copyArtifacts(projectName: 'lcb-lnx-scripted-build-pipeline', selector: upstream(), filter: 'libcouchbase-*rhel8*.tar')
61+
writeFile(file: "rpmsign-wrapper.expect", text: """
62+
set pkgName [lrange \$argv 0 0]
63+
spawn rpm --addsign -D "_signature gpg" -D "_gpg_name ${GPG_NAME}" \$pkgName
64+
expect -exact "Enter pass phrase: "
65+
send -- "\\r"
66+
expect eof
67+
wait
68+
""")
69+
sh("tar xf libcouchbase-*x86_64.tar")
70+
sh('mkdir -p repo/el8/x86_64')
71+
dir('repo') {
72+
sh("gpg --export --armor ${GPG_NAME} > couchbase.key")
73+
writeFile(file: 'libcouchbase-rhel8-x86_64.repo', text: """
74+
[couchbase]
75+
enabled = 1
76+
name = libcouchbase package for rhel8 x86_64
77+
baseurl = https://sdk-snapshots.couchbase.com/libcouchbase/el8/x86_64
78+
gpgcheck = 1
79+
gpgkey = https://sdk-snapshots.couchbase.com/libcouchbase/couchbase.key
80+
""")
81+
}
82+
sh('cp -a libcouchbase-*x86_64/*rpm repo/el8/x86_64')
83+
sh('for p in repo/el8/x86_64/*.rpm; do expect rpmsign-wrapper.expect \$p; done')
84+
sh('createrepo --checksum sha repo/el8/x86_64')
85+
sh("gpg --batch --yes --local-user ${GPG_NAME} --detach-sign --armor repo/el8/x86_64/repodata/repomd.xml")
86+
sh("rm -rf repo/el8/x86_64@tmp")
87+
sh("tar cf repo-${BUILD_NUMBER}-rhel8-x86_64.tar repo")
88+
archiveArtifacts(artifacts: "repo-${BUILD_NUMBER}-rhel8-x86_64.tar", fingerprint: true)
89+
withAWS(credentials: 'aws-sdk', region: 'us-east-1') {
90+
s3Upload(
91+
bucket: 'sdk-snapshots.couchbase.com',
92+
file: 'repo/',
93+
path: 'libcouchbase/',
94+
)
95+
}
96+
}
97+
}
98+
5699
stage('amzn2 x86_64') {
57100
agent { label 'centos7-signing' }
58101
steps {

0 commit comments

Comments
 (0)