Uploaded image for project: 'IT: Release Engineering'
  1. IT: Release Engineering
  2. RELENG-2640

Jenkins job ci-management-jenkins-sandbox-cleanup fails broken pipe

Issue XMLXMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Normal Normal
    • Q4 2019 Tech Debt
    • None
    • Global JJB
    • None

      Jenkins job ci-management-jenkins-sandbox-cleanup fails with broken pipe when the sandbox has zero jobs defined

      For example see this failed job https://jenkins.acumos.org/view/ci-management/job/ci-management-jenkins-sandbox-cleanup/58/console and the output:

      ---> jenkins-sandbox-cleanup.sh
      lf-activate-venv(): INFO: Creating 'python3' venv (/tmp/venv-KzWy)
      lf-activate-venv(): INFO: Installing: jenkins-job-builder==2.2.1 
      lf-activate-venv(): INFO: Adding /tmp/venv-KzWy/bin to PATH
      Sure you want to delete *ALL* jobs AND views from Jenkins server?
      (including those not managed by Jenkins Job Builder) (Y/N): INFO:jenkins_jobs.cli.subcommand.delete_all:Deleting all jobs
      INFO:jenkins_jobs.builder:Number of jobs to delete:  0
      INFO:jenkins_jobs.cli.subcommand.delete_all:Deleting all views
      INFO:jenkins_jobs.builder:Number of views to delete:  0
      yes: standard output: Broken pipe
      yes: write error
      Build step 'Execute shell' marked build as failure
      

      The script was almost certainly broken by this commit:

      commit f13d7760a7d4f99368359d89f75d8188063b8a36
      Author: Tim Johnson <tijohnson@linuxfoundation.org>
      Date:   Wed Nov 27 08:37:38 2019 -0800
      
          Remove user venv from sandbox cleanup script
          
          No longer use jjb-install.sh & jjb-cleanup.sh
          
          Issue: RELENG-2565
          Change-Id: I08e0bab6fe31a48d933c8375b75f4c9264df7a08
          Signed-off-by: Tim Johnson <tijohnson@linuxfoundation.org>
      

      I note that previously the job worked. You can see a past success here: https://jenkins.acumos.org/view/ci-management/job/ci-management-jenkins-sandbox-cleanup/5/console and there the shell script used "yes || true" which probably avoided the problem:

      bash -c "/usr/bin/yes 2>/dev/null || true" | jenkins-jobs -s sandbox delete-all
      

      Maybe you should assign this to @Tim Johnson since he broke it

      Thanks for listening

              tijohnson Tim Johnson
              cl778h Chris Lott
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: