You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2022/01/18 15:24:21 UTC

[couchdb] 01/05: No need for indirection because these are only invoked once

This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a commit to branch jenkins-dynamic-matrix
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit e6e99843af52c6b1a3eeeb2491e5efcca0bec75a
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Tue Jan 18 09:39:21 2022 -0500

    No need for indirection because these are only invoked once
---
 build-aux/Jenkinsfile.full | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/build-aux/Jenkinsfile.full b/build-aux/Jenkinsfile.full
index 3734107..8efe74b 100644
--- a/build-aux/Jenkinsfile.full
+++ b/build-aux/Jenkinsfile.full
@@ -13,21 +13,6 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-make_packages = '''
-mkdir -p ${PLATFORM}/couchdb
-tar -xf apache-couchdb-*.tar.gz -C ${PLATFORM}/couchdb
-cd ${PLATFORM}
-git clone https://github.com/apache/couchdb-pkg
-cd couchdb-pkg
-make
-'''
-
-cleanup_and_save = '''
-rm -rf pkgs/${PLATFORM}
-mkdir -p pkgs/${PLATFORM}
-mv ${PLATFORM}/rpmbuild/RPMS/$(arch)/*rpm pkgs/${PLATFORM} || true
-mv ${PLATFORM}/couchdb/*.deb pkgs/${PLATFORM} || true
-'''
 
 update_qemu = '''
 docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
@@ -217,8 +202,20 @@ def generateContainerStage(platform) {
                 stage("${meta[platform].name} - package") {
                   try {
                     unstash 'tarball'
-                    sh( script: make_packages, label: 'Build packages' )
-                    sh( script: cleanup_and_save, label: 'Stage package artifacts for archival' )
+                    sh( label: 'Build packages', script='''
+                      mkdir -p ${PLATFORM}/couchdb
+                      tar -xf apache-couchdb-*.tar.gz -C ${PLATFORM}/couchdb
+                      cd ${PLATFORM}
+                      git clone https://github.com/apache/couchdb-pkg
+                      cd couchdb-pkg
+                      make
+                    ''' )
+                    sh( label: 'Stage package artifacts for archival', script='''
+                      rm -rf pkgs/${PLATFORM}
+                      mkdir -p pkgs/${PLATFORM}
+                      mv ${PLATFORM}/rpmbuild/RPMS/$(arch)/*rpm pkgs/${PLATFORM} || true
+                      mv ${PLATFORM}/couchdb/*.deb pkgs/${PLATFORM} || true
+                    ''' )
                     archiveArtifacts artifacts: 'pkgs/**', fingerprint: true, onlyIfSuccessful: true
                   }
                   catch (err) {