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

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

      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.

          [JENKINS-43005] Warn if there are comment strings in declarative pipeline when opened in editor

          James Dumay added a comment -

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

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

          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.

          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.

          Liam Newman added a comment -

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

          Liam Newman added a comment - Then the editor needs to warn users that comments will be stripped if they are encountered.

          Michael Neale added a comment -

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

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

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

              Created:
              Updated: