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

git isn't run inside build container

    Details

    • Similar Issues:

      Description

      Using docker-slaves, the checkout build phase is ran with commands inside the remoting container (which by change has git) not inside the configured build container.

      This is due to git-client to create it's own LocalLauncher vs using the Node's one.

        Attachments

          Issue Links

            Activity

            Hide
            ndeloof Nicolas De Loof added a comment -

            git-client plugin do not rely on Launcher/FilePath abstraction but sends the whole GitClient implementation class to remote, making it just impossible to rely on a Launcher from caller. Would need to fully refactor GitClient implementation to run on master.

            Show
            ndeloof Nicolas De Loof added a comment - git-client plugin do not rely on Launcher/FilePath abstraction but sends the whole GitClient implementation class to remote, making it just impossible to rely on a Launcher from caller. Would need to fully refactor GitClient implementation to run on master.
            Show
            ndeloof Nicolas De Loof added a comment - see https://github.com/jenkinsci/git-client-plugin/pull/211
            Hide
            jglick Jesse Glick added a comment -

            Affects docker-workflow as well from what I can tell: if Jenkins is configured with only a CLI Git tool (the default), and an agent lacks a Git executable,

            docker.image('cloudbees/java-build-tools').inside {git '…'}
            

            will fail on the git command with an error indicating that the command was not found—because it is being run in the agent’s namespace, not the container’s.

            Show
            jglick Jesse Glick added a comment - Affects docker-workflow as well from what I can tell: if Jenkins is configured with only a CLI Git tool (the default), and an agent lacks a Git executable, docker.image( 'cloudbees/java-build-tools' ).inside {git '…' } will fail on the git command with an error indicating that the command was not found—because it is being run in the agent’s namespace, not the container’s.

              People

              • Assignee:
                Unassigned
                Reporter:
                ndeloof Nicolas De Loof
              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: