Skip to content

Commit 001ade3

Browse files
committed
libcouchbase: try to build for debian11
1 parent bdc62ab commit 001ade3

File tree

4 files changed

+116
-2
lines changed

4 files changed

+116
-2
lines changed

libcouchbase/Jenkinsfile.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ elsif ENV['LINUX_ONLY']
5858
# ['stretch', 'i386', 'debian9', 32],
5959
['buster', 'amd64', 'debian10', 64],
6060
# ['buster', 'i386', 'debian10', 32],
61+
['bullseye', 'amd64', 'debian11', 64],
6162
]
6263
end
6364

libcouchbase/Jenkinsfile.repo.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<% # vim: ft=eruby et ts=4 sw=4 sts=4
22
%>
3-
// DO NOT EDIT: this file was generated from Jenkinsfile.signing.erb
3+
// DO NOT EDIT: this file was generated from Jenkinsfile.repo.erb
44

55
<%
66
selector = "specific('199')"
@@ -71,6 +71,7 @@ gpgkey = <%= key_url %>
7171
<% end %>
7272
<%
7373
apt_distros = [
74+
['bullseye', 'debian11'],
7475
['focal', 'ubuntu2004'],
7576
['buster', 'debian10'],
7677
['bionic', 'ubuntu1804'],

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

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,81 @@ pipeline {
802802
}
803803
}
804804
}
805+
stage('debian11 amd64') {
806+
agent { label 'cowbuilder' }
807+
stages {
808+
stage('d64v11') {
809+
steps {
810+
dir('ws_debian11_amd64') {
811+
sh("sudo chown couchbase:couchbase -R .")
812+
deleteDir()
813+
unstash 'libcouchbase'
814+
}
815+
}
816+
}
817+
stage('cow1') {
818+
when {
819+
expression {
820+
!fileExists("/var/cache/pbuilder/bullseye-amd64.cow/etc/os-release")
821+
}
822+
}
823+
steps {
824+
sh("""
825+
sudo apt-get install cowbuilder && \
826+
sudo cowbuilder --create \
827+
--basepath /var/cache/pbuilder/bullseye-amd64.cow \
828+
--distribution bullseye \
829+
--debootstrapopts --arch=amd64 \
830+
--components 'main'
831+
""".stripIndent())
832+
}
833+
}
834+
stage('cow2') {
835+
when {
836+
expression {
837+
fileExists("/var/cache/pbuilder/bullseye-amd64.cow/etc/os-release")
838+
}
839+
}
840+
steps {
841+
sh('sudo cowbuilder --update --basepath /var/cache/pbuilder/bullseye-amd64.cow')
842+
}
843+
}
844+
stage('src') {
845+
steps {
846+
dir('ws_debian11_amd64/build') {
847+
unstash 'tarball'
848+
sh("ln -s ${VERSION.tarName()}.tar.gz libcouchbase_${VERSION.deb()}.orig.tar.gz")
849+
sh("tar -xf ${VERSION.tarName()}.tar.gz")
850+
sh("cp -a ../libcouchbase/packaging/deb ${VERSION.tarName()}/debian")
851+
dir(VERSION.tarName()) {
852+
sh("""
853+
dch --no-auto-nmu --package libcouchbase --newversion ${VERSION.deb()}-1 \
854+
--create "Release package for libcouchbase ${VERSION.deb()}-1"
855+
""".stripIndent())
856+
sh("dpkg-buildpackage -rfakeroot -d -S -sa")
857+
}
858+
}
859+
}
860+
}
861+
stage('deb') {
862+
steps {
863+
dir('ws_debian11_amd64/build') {
864+
sh("""
865+
sudo cowbuilder --build \
866+
--basepath /var/cache/pbuilder/bullseye-amd64.cow \
867+
--buildresult libcouchbase-${VERSION.deb()}_debian11_bullseye_amd64 \
868+
--debbuildopts -j8 \
869+
--debbuildopts "-us -uc" \
870+
libcouchbase_${VERSION.deb()}-1.dsc
871+
""".stripIndent())
872+
sh("sudo chown couchbase:couchbase -R libcouchbase-${VERSION.deb()}_debian11_bullseye_amd64")
873+
sh("tar cf libcouchbase-${VERSION.tar()}_debian11_bullseye_amd64.tar libcouchbase-${VERSION.deb()}_debian11_bullseye_amd64")
874+
archiveArtifacts(artifacts: "libcouchbase-${VERSION.tar()}_debian11_bullseye_amd64.tar", fingerprint: true)
875+
}
876+
}
877+
}
878+
}
879+
}
805880
}
806881
}
807882
stage('amzn2') {

libcouchbase/lcb-repo-pipeline.groovy

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
// DO NOT EDIT: this file was generated from Jenkinsfile.signing.erb
2+
// DO NOT EDIT: this file was generated from Jenkinsfile.repo.erb
33

44

55

@@ -139,6 +139,43 @@ gpgkey = https://sdk-snapshots.couchbase.com/libcouchbase/couchbase.key
139139
}
140140
}
141141

142+
stage('debian11') {
143+
144+
agent { label 'debian10-signing' }
145+
steps {
146+
cleanWs()
147+
copyArtifacts(projectName: 'lcb-lnx-scripted-build-pipeline', selector: upstream(), filter: 'libcouchbase-*bullseye*.tar')
148+
sh('mkdir -p repo/debian11/conf')
149+
writeFile(file: "repo/debian11/conf/distributions", text: """
150+
Origin: couchbase
151+
SignWith: ${GPG_NAME}
152+
Suite: bullseye
153+
Codename: bullseye
154+
Version: debian11
155+
Components: bullseye/main
156+
Architectures: amd64 i386
157+
Description: libcouchbase package repository for bullseye debian11
158+
""")
159+
sh("for p in libcouchbase-*.tar; do tar xf \$p; done")
160+
dir('repo') {
161+
sh("gpg --export --armor ${GPG_NAME} > couchbase.key")
162+
writeFile(file: 'libcouchbase-debian11.list', text: """
163+
# curl https://sdk-snapshots.couchbase.com/libcouchbase/couchbase.key | sudo apt-key add -
164+
deb https://sdk-snapshots.couchbase.com/libcouchbase/debian11 bullseye bullseye/main
165+
""")
166+
}
167+
sh("for p in \$(find . -name '*.changes'); do reprepro -T deb --ignore=wrongdistribution -b repo/debian11 include bullseye \$p; done")
168+
sh("tar cf repo-${BUILD_NUMBER}-debian11.tar repo")
169+
archiveArtifacts(artifacts: "repo-${BUILD_NUMBER}-debian11.tar", fingerprint: true)
170+
withAWS(credentials: 'aws-sdk', region: 'us-east-1') {
171+
s3Upload(
172+
bucket: 'sdk-snapshots.couchbase.com',
173+
file: 'repo/',
174+
path: 'libcouchbase/'
175+
)
176+
}
177+
}
178+
}
142179
stage('ubuntu2004') {
143180

144181
agent { label 'debian10-signing' }

0 commit comments

Comments
 (0)