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

failOnError parameter to most steps being ignored

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • ssh-steps-plugin
    • None
    • Source: Windows
      Remote: Linux

      When running commands such as 

      sshGet remote: remoteServerConfig, from: "${remoteDir}/folder_name", into: './', filterRegex: /.*/, override: true, failOnError: false

      if folder_name is a none-existent folder if fails, but it also fails the whole pipeline, even though failOnError is false

          [JENKINS-73848] failOnError parameter to most steps being ignored

          Ilya Pyatizbyantsev added a comment - - edited

          To perform various actions via ssh, the ssh-steps-plugin uses the functionality of the Groovy SSH tool (can it be called a library?) version 2.10.1. According to the Groovy SSH tool 2.10.1 documentation only the execute, executeSudo and shell operations have the ignoreError flag.

          I created a small groovy project (UPD: The repository has been deleted, the source code can be found in the attachments JENKINS-73848-main.zip ) that directly uses the Groovy SSH tool functionality, without the Jenkins ssh-steps-plugin. I wanted to exclude ssh-steps-plugin from this "call chain" to localize the problem on the Groovy SSH tool side and I succeeded. In the example project in

          src/main/groovy/SSHFileDownloader.groovy
          

          on lines #34-35 the effect of the flag set on line #28 is shown.

          Colleagues, please read my research and help with further steps =)
          Judging by the user-guide documentation, the latest version of Groovy SSH tool - 2.11.2 has not changed in the ignoreError-flag part. Perhaps I should try to raise the version of Groovy SSH tool in my test project and look at the behavior. But I don't think it will have any effect.

          I believe there are no problems on the ssh-steps-plugin side, and a corresponding issue for consultation should be opened in the Groovy SSH tool repository.

          Ilya Pyatizbyantsev added a comment - - edited To perform various actions via ssh, the ssh-steps-plugin uses the functionality of the Groovy SSH tool (can it be called a library?) version 2.10.1. According to the Groovy SSH tool 2.10.1 documentation only the execute , executeSudo and shell operations have the ignoreError flag. I created a small groovy project (UPD: The repository has been deleted, the source code can be found in the attachments JENKINS-73848-main.zip ) that directly uses the Groovy SSH tool functionality, without the Jenkins ssh-steps-plugin. I wanted to exclude ssh-steps-plugin from this "call chain" to localize the problem on the Groovy SSH tool side and I succeeded. In the example project in src/main/groovy/SSHFileDownloader.groovy on lines #34-35 the effect of the flag set on line #28 is shown. Colleagues, please read my research and help with further steps =) Judging by the user-guide documentation, the latest version of Groovy SSH tool - 2.11.2 has not changed in the ignoreError-flag part. Perhaps I should try to raise the version of Groovy SSH tool in my test project and look at the behavior. But I don't think it will have any effect. I believe there are no problems on the ssh-steps-plugin side, and a corresponding issue for consultation should be opened in the Groovy SSH tool repository.

          markewaite, jetersen
          Colleagues, I am asking you for help, since you are active contributors. And among all the contributors in the corresponding repository, I only know your profiles)

          Ilya Pyatizbyantsev added a comment - markewaite , jetersen Colleagues, I am asking you for help, since you are active contributors. And among all the contributors in the corresponding repository, I only know your profiles)

          Mark Waite added a comment -

          pyatizbyantsevia I am not involved in the ssh-steps plugin. https://plugins.jenkins.io/ssh-steps/ lists the maintainers

          I recommend that you switch from using the ssh-steps plugin and use the sh step to perform the same operation using calls to either ssh or scp. That provides greater control for you and avoids any issues in the ssh-steps plugin.

          Mark Waite added a comment - pyatizbyantsevia I am not involved in the ssh-steps plugin. https://plugins.jenkins.io/ssh-steps/ lists the maintainers I recommend that you switch from using the ssh-steps plugin and use the sh step to perform the same operation using calls to either ssh or scp . That provides greater control for you and avoids any issues in the ssh-steps plugin.

            nrayapati Naresh Rayapati
            daveq_work David
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: