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

Multibranch Pipeline and MercurialSCM and Windows node and subrepos

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • mercurial-plugin
    • None

      Summary:

      Checking out source with MercurialSCM on Windows Node, results in Error by checking out the sub-repositories.
      The main repository is correctly checked out on the windows machine, it only failed on the sub-repos.

      The error message received:
      subrepo merge 000000000000+ 8331f24993aa 000000000000+
      subrepo subprojects/mySubRepo: remote added, get ssh://hg@myhost/myrepo:[myhash]:hg
      running ssh -i c:\Jenkins\jenkins-mercurial*********.sshkey -l hg "hg@myhost" "hg -R myrepo serve --stdio"
      sending hello command
      sending between command
      remote: 'ssh' is not recognized as an internal or external command

      Detailed description

      I created a multi-branche pipeline, running on Jenkins master in Linux.

      Jenkins Pipeline script:

       

      ....
      stage('Checkout') {
         agent {label 'windows64&&build2013'}
         steps {
         echo "start checkout"
      
        checkout changelog: false, poll: false, scm: [
        $class: 'MercurialSCM',
                        clean: true, credentials_id: 'hg_ssh2_key',
                        disableChangeLog: true,
                        installation: 'MercurialWindows)']
      
         echo "end checkout ... start stashing the source"
        stash excludes: '.hg', name: 'src'
      
      }
      ...
      

       

      Mercurial Installations:

      I am using two installations of Mercurial ( Manage Jenkins -> Global Tool Configurations: Mercurial -> Mercurial Installations:

      • Mercurial: The linux configuration (used by the master to check modifications).
      • MercurialWindows: The Windows configuration, configuring TortoiseHg

      Windows node:

      myjenkinsmaster.nl/computer/Windows_node/systemInfo:

      In the environment variables, the path contains the path of the Tortoise application (C:\program files\TortoiseHg).

      Pageant is active, with the ssh-key activated.

      mercurial.ini is created in c:\Users\john

       

      Error message:

      Running on
      Windows_node
      in c:\Jenkins\workspace\mydir[Pipeline] {[Pipeline] checkout[......] $ hg --config ******** showconfig paths.default
      Acquired master cache lock.
      [....] $ hg --debug --config ******** pull
      pulling from ssh://hg@myhost/myrepo
      running ssh -i /var/jenkins_home/jenkins-mercurial******.sshkey -l hg 'hg@myhost' 'hg -R myrepo serve --stdio'
      sending hello command
      sending between command
      ........
      ... checking out all files:

      checking out the first subrep:
      subrepo merge 000000000000+ 8331f24993aa 000000000000+
      subrepo subprojects/mysubrepo: remote added, get ssh://hg@myhost/mysubrepo:*****:hg
      running ssh -i c:\Jenkins\jenkins-mercurial******.sshkey -l hg "hg@myhost" "hg -R mysubrepo serve --stdio"
      sending hello command
      sending between command
      remote: 'ssh' is not recognized as an internal or external command,
      remote: operable program or batch file.
      abort: no suitable response from remote hg!
      ERROR: Failed to update
       

      The strange thing is that in the console log, the main repository is checked out with the same ssh-command, but then with the ssh-key as linux-style:

      ssh -i /var/jenkins_home/jenkins-mercurial*********.sshkey -l hg "hg@myhost" "hg -R myrepo serve --stdio"

       

            Unassigned Unassigned
            nlwillem Willem d J
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: