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

GIT .gitattributes - line feed configuration not work

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We have the following problem after the jenkins update from Version 1.629 to 2.7.

      Now our Build failed because of a JUnit-Test needs some files with the line feeds CRLF instead of LF. In the .gitattributes file of the git repository is this configured. But the git plugin in the jenkins job ignored this configuration. The .DAT files are with the line feed LF in the workspace.

      This is the content of the .gitattributes file:

      * text=lf
      
      *.DAT text eol=crlf
      

      Why is now the .gitattributes file ignored by checking out the git repository?

      Could this be fixed?

        Attachments

          Activity

          Hide
          wearymango Gavin Kingsley added a comment -

          An observation on priority: if I can't get my source code (in the form I need) I can't build my product. I would have thought this issue was core to the mission of Jenkins.

          Show
          wearymango Gavin Kingsley added a comment - An observation on priority: if I can't get my source code (in the form I need) I can't build my product. I would have thought this issue was core to the mission of Jenkins.
          Hide
          jglick Jesse Glick added a comment -

          Are you using JGit or command-line Git? Prefer the latter in all cases.

          Show
          jglick Jesse Glick added a comment - Are you using JGit or command-line Git? Prefer the latter in all cases.
          Hide
          markewaite Mark Waite added a comment - - edited

          I've attempted to duplicate the problem and don't seem to see the issue. Can you provide more details to show the problem, preferably with a public repository?

          The steps I took to try to duplicate the problem included:

          1. Clone, build, and run the docker instance
              $ git lfs clone https://github.com/MarkEWaite/docker-lfs JENKINS-35501
              $ cd JENKINS-35501
              $ git lfs fetch origin origin/lts-with-plugins
              $ git checkout -b lts-with-plugins -t origin/lts-with-plugins
              $ docker build -t jenkins:JENKINS-35501 .
              $ docker run -i --rm --publish 8080:8080 jenkins:JENKINS-35501
            
          2. Connect a web browser to that docker instance (http://localhost:8080)
          3. Open the "Bugs - Pipeline Checks"
          4. Open the "jenkins-bugs" multi-branch pipeline job
          5. Click the "Scan Multibranch Pipeline" link and then the "Run Now" link to start branch indexing
          6. Review the JENKINS-35501 job results, confirm file contents remain as expected on Windows and Linux
          7. Open the "Bugs - Individual Checks" folder
          8. Open the "JENKINS-35501-*" job, and run it
          9. Confirm that file contents remain as expected on the execution platform

          The JENKINS-35501 branch includes the history of my attempts to duplicate the bug, including some brief notes on puzzling behaviors that I saw on some tests when setting the text attribute.

          Show
          markewaite Mark Waite added a comment - - edited I've attempted to duplicate the problem and don't seem to see the issue. Can you provide more details to show the problem, preferably with a public repository? The steps I took to try to duplicate the problem included: Clone, build, and run the docker instance $ git lfs clone https: //github.com/MarkEWaite/docker-lfs JENKINS-35501 $ cd JENKINS-35501 $ git lfs fetch origin origin/lts-with-plugins $ git checkout -b lts-with-plugins -t origin/lts-with-plugins $ docker build -t jenkins:JENKINS-35501 . $ docker run -i --rm --publish 8080:8080 jenkins:JENKINS-35501 Connect a web browser to that docker instance ( http://localhost:8080 ) Open the "Bugs - Pipeline Checks" Open the "jenkins-bugs" multi-branch pipeline job Click the "Scan Multibranch Pipeline" link and then the "Run Now" link to start branch indexing Review the JENKINS-35501 job results, confirm file contents remain as expected on Windows and Linux Open the "Bugs - Individual Checks" folder Open the " JENKINS-35501 -*" job, and run it Confirm that file contents remain as expected on the execution platform The JENKINS-35501 branch includes the history of my attempts to duplicate the bug, including some brief notes on puzzling behaviors that I saw on some tests when setting the text attribute.
          Hide
          markewaite Mark Waite added a comment -

          Closing 5 months after providing my detailed steps showing that I'm unable to duplicate the problem. Gavin Kingsley or Michael Beumer do you have more detailed steps that can show this bug?

          Show
          markewaite Mark Waite added a comment - Closing 5 months after providing my detailed steps showing that I'm unable to duplicate the problem. Gavin Kingsley or Michael Beumer do you have more detailed steps that can show this bug?

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            beumer Michael Beumer
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: