Re: Jenkins + git + windows
Hey Mark, I am trying to configure my windows slave for Mingw. I have the slave up using jnlp. Can you please advise? Thanks, Rakhee On Friday, April 8, 2011 5:43:50 AM UTC-7, Mark Waite wrote: We use msys git for our configuration. We run many builds on many machines with git as SCM. Mark Waite -- *From:* Jon Schewe jpsc...@mtu.net javascript: *To:* Jenkins Users jenkins...@googlegroups.com javascript: *Sent:* Fri, April 8, 2011 6:40:26 AM *Subject:* Jenkins + git + windows I have 2 jobs that need to run on Windows. I currently have my Jenkins slave setup using ssh access via cygwin. However there appears to be a bug in ssh or git under cygwin such that clones keep failing with index-pack filed. There are reports that mingw works and msysgit work. What are others in the community using for such a setup? One of the jobs needs to run under cygwin, the other is a Qt build that I use mingw to build and then execute native windows executables. Jon -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Jenkins, Git, Windows and Line Feeds
All, This has been frustrating me for a while. I need to both build Windows code and publish Linux code during a single build. The only way I've been able to get this to build is to run completely on a Windows slave. If I try to run on a linux slave as well it always complains that MSBuild cannot be found. So I force it onto my windows slave and use GIT to check out the code, build with MSBuild, then push out to both Windows and Linux without error. Now my issue is that the code pushed to my Linux box has been converted to Windows' CR/LF method so none of my executables work on Linux. Short of doing a dos2unix on every single file I push out, is there a way to fix this? I tried adding * text=binary to my gitattributes but to no avail. I think it may be ignoring that attributes file because jgit is used instead of git? Any and all help greatly appreciated. Thanks -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Jenkins, Git, Windows and Line Feeds
Could you split your build into two parts, running the part which involves Linux components on a Linux machine, and the part which requires MSBuild (and Windows) on your Windows machine, with one of those jobs publishing its build results as an artifact which the next build takes and includes in the build? The artifact should be transmitted in binary and would not require that you perform any line transformations. Mark Waite From: David Brossard dbross...@gmail.com To: jenkinsci-users@googlegroups.com Sent: Wednesday, March 27, 2013 12:24 PM Subject: Jenkins, Git, Windows and Line Feeds All, This has been frustrating me for a while. I need to both build Windows code and publish Linux code during a single build. The only way I've been able to get this to build is to run completely on a Windows slave. If I try to run on a linux slave as well it always complains that MSBuild cannot be found. So I force it onto my windows slave and use GIT to check out the code, build with MSBuild, then push out to both Windows and Linux without error. Now my issue is that the code pushed to my Linux box has been converted to Windows' CR/LF method so none of my executables work on Linux. Short of doing a dos2unix on every single file I push out, is there a way to fix this? I tried adding * text=binary to my gitattributes but to no avail. I think it may be ignoring that attributes file because jgit is used instead of git? Any and all help greatly appreciated. Thanks -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
RE: Jenkins, Git, Windows and Line Feeds
I can't tell if you are talking about files created during the build or files checked out for the build but if it is files checked out for the build perhaps your git line endings are set wrong. If the git repo is for windows and git then you need it set to use linux line endings. Check out this page: https://help.github.com/articles/dealing-with-line-endings Will From: jenkinsci-users@googlegroups.com [jenkinsci-users@googlegroups.com] on behalf of David Brossard [dbross...@gmail.com] Sent: Wednesday, March 27, 2013 1:24 PM To: jenkinsci-users@googlegroups.com Subject: Jenkins, Git, Windows and Line Feeds All, This has been frustrating me for a while. I need to both build Windows code and publish Linux code during a single build. The only way I've been able to get this to build is to run completely on a Windows slave. If I try to run on a linux slave as well it always complains that MSBuild cannot be found. So I force it onto my windows slave and use GIT to check out the code, build with MSBuild, then push out to both Windows and Linux without error. Now my issue is that the code pushed to my Linux box has been converted to Windows' CR/LF method so none of my executables work on Linux. Short of doing a dos2unix on every single file I push out, is there a way to fix this? I tried adding * text=binary to my gitattributes but to no avail. I think it may be ignoring that attributes file because jgit is used instead of git? Any and all help greatly appreciated. Thanks -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Jenkins, Git, Windows and Line Feeds
I found an answer to my own question. - Set the Jenkins Slave service to run as a specific user on the local system. - login as that user and run in a command prompt git config --global core.autocrlf input - Clear out the Jenkins workspace on that slave so it will do a full git clone again core.autocrlf input means don't monkey with the EOL stuff. If it was checked in as Linux EOL or Windows EOL it will keep it that way. Thanks On Wednesday, March 27, 2013 11:24:25 AM UTC-7, David Brossard wrote: All, This has been frustrating me for a while. I need to both build Windows code and publish Linux code during a single build. The only way I've been able to get this to build is to run completely on a Windows slave. If I try to run on a linux slave as well it always complains that MSBuild cannot be found. So I force it onto my windows slave and use GIT to check out the code, build with MSBuild, then push out to both Windows and Linux without error. Now my issue is that the code pushed to my Linux box has been converted to Windows' CR/LF method so none of my executables work on Linux. Short of doing a dos2unix on every single file I push out, is there a way to fix this? I tried adding * text=binary to my gitattributes but to no avail. I think it may be ignoring that attributes file because jgit is used instead of git? Any and all help greatly appreciated. Thanks -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Jenkins, Git, Windows and Line Feeds
William, just saw your post. That is exactly what I had to figure out. Mark, I would definitely like to have different steps in my build run on different machines, however I still haven't solved the problem that if I have an MSBuild step anywhere in my config, it tries to find that on my linux slaves as well and fails. If you have any links to instructions on making that work I would love to see them. That was my original plan before forcing the entire job onto the Windows slave. Thanks On Wednesday, March 27, 2013 11:54:49 AM UTC-7, David Brossard wrote: I found an answer to my own question. - Set the Jenkins Slave service to run as a specific user on the local system. - login as that user and run in a command prompt git config --global core.autocrlf input - Clear out the Jenkins workspace on that slave so it will do a full git clone again core.autocrlf input means don't monkey with the EOL stuff. If it was checked in as Linux EOL or Windows EOL it will keep it that way. Thanks On Wednesday, March 27, 2013 11:24:25 AM UTC-7, David Brossard wrote: All, This has been frustrating me for a while. I need to both build Windows code and publish Linux code during a single build. The only way I've been able to get this to build is to run completely on a Windows slave. If I try to run on a linux slave as well it always complains that MSBuild cannot be found. So I force it onto my windows slave and use GIT to check out the code, build with MSBuild, then push out to both Windows and Linux without error. Now my issue is that the code pushed to my Linux box has been converted to Windows' CR/LF method so none of my executables work on Linux. Short of doing a dos2unix on every single file I push out, is there a way to fix this? I tried adding * text=binary to my gitattributes but to no avail. I think it may be ignoring that attributes file because jgit is used instead of git? Any and all help greatly appreciated. Thanks -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Jenkins, Git, Windows and Line Feeds
You need to assign labels ('windows', 'linux', etc.) to your slaves and then indicate in your jobs what labels are required for that job to run. - Original Message - From: jenkinsci-users@googlegroups.com To: jenkinsci-users@googlegroups.com At: Mar 27 2013 15:07:36 William, just saw your post. That is exactly what I had to figure out. Mark, I would definitely like to have different steps in my build run on different machines, however I still haven't solved the problem that if I have an MSBuild step anywhere in my config, it tries to find that on my linux slaves as well and fails. If you have any links to instructions on making that work I would love to see them. That was my original plan before forcing the entire job onto the Windows slave. Thanks On Wednesday, March 27, 2013 11:54:49 AM UTC-7, David Brossard wrote: I found an answer to my own question. - Set the Jenkins Slave service to run as a specific user on the local system. - login as that user and run in a command prompt git config --global core.autocrlf input - Clear out the Jenkins workspace on that slave so it will do a full git clone again core.autocrlf input means don't monkey with the EOL stuff. If it was checked in as Linux EOL or Windows EOL it will keep it that way. Thanks On Wednesday, March 27, 2013 11:24:25 AM UTC-7, David Brossard wrote: All, This has been frustrating me for a while. I need to both build Windows code and publish Linux code during a single build. The only way I've been able to get this to build is to run completely on a Windows slave. If I try to run on a linux slave as well it always complains that MSBuild cannot be found. So I force it onto my windows slave and use GIT to check out the code, build with MSBuild, then push out to both Windows and Linux without error. Now my issue is that the code pushed to my Linux box has been converted to Windows' CR/LF method so none of my executables work on Linux. Short of doing a dos2unix on every single file I push out, is there a way to fix this? I tried adding * text=binary to my gitattributes but to no avail. I think it may be ignoring that attributes file because jgit is used instead of git? Any and all help greatly appreciated. Thanks -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Jenkins, Git, Windows and Line Feeds
You would need to configure two different build jobs, with a different set of build steps in each job. The Linux build job would be configured to never call MSBuild. The Windows build job would be configured to never call the Linux specific portions of the build. If the Windows job is the first job, then the Linux build job would be configured to copy the artifacts from the Windows build job and include those artifacts in the final build result. If the Linux job is the first job, then the Windows job would be configured to copy the artifacts from the Linux job and include those artifacts in the final build result. Mark Waite From: David Brossard dbross...@gmail.com To: jenkinsci-users@googlegroups.com Sent: Wednesday, March 27, 2013 1:06 PM Subject: Re: Jenkins, Git, Windows and Line Feeds William, just saw your post. That is exactly what I had to figure out. Mark, I would definitely like to have different steps in my build run on different machines, however I still haven't solved the problem that if I have an MSBuild step anywhere in my config, it tries to find that on my linux slaves as well and fails. If you have any links to instructions on making that work I would love to see them. That was my original plan before forcing the entire job onto the Windows slave. Thanks On Wednesday, March 27, 2013 11:54:49 AM UTC-7, David Brossard wrote: I found an answer to my own question. * Set the Jenkins Slave service to run as a specific user on the local system. * login as that user and run in a command prompt git config --global core.autocrlf input * Clear out the Jenkins workspace on that slave so it will do a full git clone againcore.autocrlf input means don't monkey with the EOL stuff. If it was checked in as Linux EOL or Windows EOL it will keep it that way. Thanks On Wednesday, March 27, 2013 11:24:25 AM UTC-7, David Brossard wrote: All, This has been frustrating me for a while. I need to both build Windows code and publish Linux code during a single build. The only way I've been able to get this to build is to run completely on a Windows slave. If I try to run on a linux slave as well it always complains that MSBuild cannot be found. So I force it onto my windows slave and use GIT to check out the code, build with MSBuild, then push out to both Windows and Linux without error. Now my issue is that the code pushed to my Linux box has been converted to Windows' CR/LF method so none of my executables work on Linux. Short of doing a dos2unix on every single file I push out, is there a way to fix this? I tried adding * text=binary to my gitattributes but to no avail. I think it may be ignoring that attributes file because jgit is used instead of git? Any and all help greatly appreciated. Thanks -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Jenkins, Git, Windows and Line Feeds
We are getting off topic so I will start another one if I need to continue, but when I tried something similar to what you say previously, the Linux build had no clue about the windows build artifacts and vice-versa since they were separate jobs in separate workspaces and on different servers. On Wednesday, March 27, 2013 3:35:34 PM UTC-7, Mark Waite wrote: You would need to configure two different build jobs, with a different set of build steps in each job. The Linux build job would be configured to never call MSBuild. The Windows build job would be configured to never call the Linux specific portions of the build. If the Windows job is the first job, then the Linux build job would be configured to copy the artifacts from the Windows build job and include those artifacts in the final build result. If the Linux job is the first job, then the Windows job would be configured to copy the artifacts from the Linux job and include those artifacts in the final build result. Mark Waite -- *From:* David Brossard dbro...@gmail.com javascript: *To:* jenkins...@googlegroups.com javascript: *Sent:* Wednesday, March 27, 2013 1:06 PM *Subject:* Re: Jenkins, Git, Windows and Line Feeds William, just saw your post. That is exactly what I had to figure out. Mark, I would definitely like to have different steps in my build run on different machines, however I still haven't solved the problem that if I have an MSBuild step anywhere in my config, it tries to find that on my linux slaves as well and fails. If you have any links to instructions on making that work I would love to see them. That was my original plan before forcing the entire job onto the Windows slave. Thanks On Wednesday, March 27, 2013 11:54:49 AM UTC-7, David Brossard wrote: I found an answer to my own question. - Set the Jenkins Slave service to run as a specific user on the local system. - login as that user and run in a command prompt git config --global core.autocrlf input - Clear out the Jenkins workspace on that slave so it will do a full git clone again core.autocrlf input means don't monkey with the EOL stuff. If it was checked in as Linux EOL or Windows EOL it will keep it that way. Thanks On Wednesday, March 27, 2013 11:24:25 AM UTC-7, David Brossard wrote: All, This has been frustrating me for a while. I need to both build Windows code and publish Linux code during a single build. The only way I've been able to get this to build is to run completely on a Windows slave. If I try to run on a linux slave as well it always complains that MSBuild cannot be found. So I force it onto my windows slave and use GIT to check out the code, build with MSBuild, then push out to both Windows and Linux without error. Now my issue is that the code pushed to my Linux box has been converted to Windows' CR/LF method so none of my executables work on Linux. Short of doing a dos2unix on every single file I push out, is there a way to fix this? I tried adding * text=binary to my gitattributes but to no avail. I think it may be ignoring that attributes file because jgit is used instead of git? Any and all help greatly appreciated. Thanks -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.