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

Warn if there are comment strings in declarative pipeline when opened in editor

    Details

    • Similar Issues:

      Description

      I understand the BlueOcean Pipeline editor will rearrange Jenkinsfile contents as it sees fit, but where possible it should not result in data loss, this includes comments. One of the advantages of Pipeline as code over Jenkins Freestyle jobs is the ability to add helpful comments.

        Attachments

          Issue Links

            Activity

            Hide
            jamesdumay James Dumay added a comment -

            Liam Newman a reasonable ask but I believe technically hard to do (ask Andrew Bayer). Declarative has an API that exposes the Jenkinsfile model to us and allows us to roundtrip - this is a declarative ask.

            Show
            jamesdumay James Dumay added a comment - Liam Newman a reasonable ask but I believe technically hard to do (ask Andrew Bayer ). Declarative has an API that exposes the Jenkinsfile model to us and allows us to roundtrip - this is a declarative ask.
            Hide
            abayer Andrew Bayer added a comment -

            See JENKINS-38864 - it's just not possible on the Declarative side. We don't have access to code comments in the parsing process, so we can't include them in any roundtripping from Jenkinsfile to JSON.

            Show
            abayer Andrew Bayer added a comment - See  JENKINS-38864 - it's just not possible on the Declarative side. We don't have access to code comments in the parsing process, so we can't include them in any roundtripping from Jenkinsfile to JSON.
            Hide
            bitwiseman Liam Newman added a comment -

            Then the editor needs to warn users that comments will be stripped if they are encountered.

            Show
            bitwiseman Liam Newman added a comment - Then the editor needs to warn users that comments will be stripped if they are encountered.
            Hide
            michaelneale Michael Neale added a comment -

            If comments can't be round tripped, yes I think a warning - on load perhaps? 

            Show
            michaelneale Michael Neale added a comment - If comments can't be round tripped, yes I think a warning - on load perhaps? 

              People

              • Assignee:
                Unassigned
                Reporter:
                bitwiseman Liam Newman
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: