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

CLI command for Declarative linter

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We need a command-line linter - the Jenkins CLI is right there, so let's take advantage of it!

        Attachments

          Issue Links

            Activity

            Show
            abayer Andrew Bayer added a comment - Initial PR up at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/58
            Hide
            abayer Andrew Bayer added a comment -

            Still debating also adding a shell script that you can download and run without needing to have CLI SSH port access to the master. Haven't decided yet.

            Show
            abayer Andrew Bayer added a comment - Still debating also adding a shell script that you can download and run without needing to have CLI SSH port access to the master. Haven't decided yet.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/DeclarativeLinterCommand.java
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/Messages.properties
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/ad5731247cfbb3f83597e9c122d04825f17d6068
            Log:
            [FIXED JENKINS-39923] Add a CLI endpoint for the linter

            Can be used like:

            ```
            ssh -p [sshd port on master] localhost declarative-linter < Jenkinsfile
            ```

            Tweaks still needed for permissions (right now, it's anyone with read
            access, which, I think, is OK) and possibly reading the file reading
            than just taking it from stdin.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/DeclarativeLinterCommand.java pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/Messages.properties http://jenkins-ci.org/commit/pipeline-model-definition-plugin/ad5731247cfbb3f83597e9c122d04825f17d6068 Log: [FIXED JENKINS-39923] Add a CLI endpoint for the linter Can be used like: ``` ssh -p [sshd port on master] localhost declarative-linter < Jenkinsfile ``` Tweaks still needed for permissions (right now, it's anyone with read access, which, I think, is OK) and possibly reading the file reading than just taking it from stdin.
            Hide
            bhenderson Brian Henderson added a comment -

            Hi, I'm having trouble finding the CLI. I'm using docker.

            $ cat Dockerfile.pipeline 
            FROM jenkins:2.46.1-alpine
            
            RUN /usr/local/bin/install-plugins.sh \
                    pipeline-model-definition
            

            When I run the image, I can't find declarative-linter anywhere. Am I missing an install step?

            thanks,

            Show
            bhenderson Brian Henderson added a comment - Hi, I'm having trouble finding the CLI. I'm using docker. $ cat Dockerfile.pipeline FROM jenkins:2.46.1-alpine RUN /usr/local/bin/install-plugins.sh \ pipeline-model-definition When I run the image, I can't find declarative-linter anywhere. Am I missing an install step? thanks,

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                abayer Andrew Bayer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: