Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-71021

Lint failures do not print proper error message in local builds (regression in 2.359)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core

      See discussion in https://github.com/jenkinsci/jenkins/pull/6948. When you have introduced a lint failure, a local build will report

      Failed to run task: 'yarn lint:ci' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2)
      

      rather than giving you an informative error message. This degrades the local development experience and creates confusion. A local Maven build should not be using lint:ci; something named lint:ci should only be invoked from CI, where the lint results would be visible via the Jenkins UI. Local runs should not be using lint:ci and should print the results on the terminal.

      This was caused by https://github.com/jenkinsci/jenkins/pull/6817. Per a comment in the abovementioned thread:

      It could conditionally swap between lint:ci and lint by using a profile activated by existence of the CI environment variable

      CC NotMyFault

            Unassigned Unassigned
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: