Skip to content

Commit 83d01cc

Browse files
committed
libcouchbase: fix stage name for rhel
1 parent de4e274 commit 83d01cc

File tree

3 files changed

+375
-375
lines changed

3 files changed

+375
-375
lines changed

libcouchbase/Jenkinsfile.erb

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -550,10 +550,10 @@ pipeline {
550550
}
551551
parallel {
552552
<% centos_dists.each do |(name, relno, arch, bits, mock)| %>
553-
stage('<%= name %><%= relno %> <%= arch %>') {
553+
stage('<%= name %><%= relno %> <%= arch %>') {
554554
agent { label 'mock' }
555555
stages {
556-
stage('c<%= bits %>v<%= relno %>') {
556+
stage('<%= name[0] %><%= bits %>v<%= relno %>') {
557557
steps {
558558
dir('ws_<%= name %><%= bits %>_v<%= relno %>') {
559559
sh("sudo chown couchbase:couchbase -R .")
@@ -576,57 +576,57 @@ pipeline {
576576
}
577577
<% end %>
578578
<% ubuntu_dists.each do |(codename, arch, name, bits)| %>
579-
stage('<%= name %> <%= arch %>') {
580-
agent { label 'cowbuilder' }
581-
stages {
582-
stage('<%= name[0] %><%= bits %>v<%= name[/(\d{1,2})/, 1] %>') {
583-
steps {
584-
dir('ws_<%= name %>_<%= arch %>') {
585-
sh("sudo chown couchbase:couchbase -R .")
586-
deleteDir()
587-
unstash 'libcouchbase'
588-
}
579+
stage('<%= name %> <%= arch %>') {
580+
agent { label 'cowbuilder' }
581+
stages {
582+
stage('<%= name[0] %><%= bits %>v<%= name[/(\d{1,2})/, 1] %>') {
583+
steps {
584+
dir('ws_<%= name %>_<%= arch %>') {
585+
sh("sudo chown couchbase:couchbase -R .")
586+
deleteDir()
587+
unstash 'libcouchbase'
589588
}
590589
}
591-
stage('cow1') {
592-
when {
593-
expression {
594-
!fileExists("/var/cache/pbuilder/<%= codename %>-<%= arch %>.cow/etc/os-release")
595-
}
596-
}
597-
steps {
598-
sh("""
599-
sudo apt-get install cowbuilder && \
600-
sudo cowbuilder --create \
601-
--basepath /var/cache/pbuilder/<%= codename %>-<%= arch %>.cow \
602-
--distribution <%= codename %> \
603-
--debootstrapopts --arch=<%= arch %> \
604-
<% if name =~ /ubuntu/ %>--components 'main universe' --mirror http://ftp.ubuntu.com/ubuntu --debootstrapopts --keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg<% else %> --components 'main'<% end %>
605-
""".stripIndent())
590+
}
591+
stage('cow1') {
592+
when {
593+
expression {
594+
!fileExists("/var/cache/pbuilder/<%= codename %>-<%= arch %>.cow/etc/os-release")
606595
}
607596
}
608-
stage('cow2') {
609-
when {
610-
expression {
611-
fileExists("/var/cache/pbuilder/<%= codename %>-<%= arch %>.cow/etc/os-release")
612-
}
613-
}
614-
steps {
615-
sh('sudo cowbuilder --update --basepath /var/cache/pbuilder/<%= codename %>-<%= arch %>.cow')
616-
}
597+
steps {
598+
sh("""
599+
sudo apt-get install cowbuilder && \
600+
sudo cowbuilder --create \
601+
--basepath /var/cache/pbuilder/<%= codename %>-<%= arch %>.cow \
602+
--distribution <%= codename %> \
603+
--debootstrapopts --arch=<%= arch %> \
604+
<% if name =~ /ubuntu/ %>--components 'main universe' --mirror http://ftp.ubuntu.com/ubuntu --debootstrapopts --keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg<% else %> --components 'main'<% end %>
605+
""".stripIndent())
617606
}
618-
stage('src') {
619-
steps {
620-
package_src("<%= name %>", "<%= arch %>", VERSION)
607+
}
608+
stage('cow2') {
609+
when {
610+
expression {
611+
fileExists("/var/cache/pbuilder/<%= codename %>-<%= arch %>.cow/etc/os-release")
621612
}
622613
}
623-
stage('deb') {
624-
steps {
625-
package_deb("<%= name %>", "<%= arch %>", "<%= codename %>", VERSION)
626-
}
614+
steps {
615+
sh('sudo cowbuilder --update --basepath /var/cache/pbuilder/<%= codename %>-<%= arch %>.cow')
616+
}
617+
}
618+
stage('src') {
619+
steps {
620+
package_src("<%= name %>", "<%= arch %>", VERSION)
621+
}
622+
}
623+
stage('deb') {
624+
steps {
625+
package_deb("<%= name %>", "<%= arch %>", "<%= codename %>", VERSION)
627626
}
628627
}
629628
}
629+
}
630630
<% end %>
631631
}
632632
}

0 commit comments

Comments
 (0)