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

Fix createSlave for RestartableJenkinsRule

    Details

    • Similar Issues:

      Description

      If you use JenkinsRule.createSlave (or createOnlineSlave) from a test based on RestartableJenkinsRule, it seems to work during the first session. But then the whole slave directory gets quietly deleted during the restart.

      Either this deletion should be suppressed, or there should be an alternate method to create a slave that actually survives the restart intact.

      See WorkflowTest.buildShellScriptAcrossRestart and BindingStepTest.cleanupAfterRestart.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            The workaround is to add a DumbSlave manually.

            Show
            jglick Jesse Glick added a comment - The workaround is to add a DumbSlave manually.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/test/java/org/jenkinsci/plugins/credentialsbinding/impl/BindingStepTest.java
            http://jenkins-ci.org/commit/credentials-binding-plugin/615c102baa4942f96e1bef415b67d628329060ce
            Log:
            Found workaround for JENKINS-26398, which was the key to getting this test to pass.

            Compare: https://github.com/jenkinsci/credentials-binding-plugin/compare/4640f27f13e4...615c102baa49

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/test/java/org/jenkinsci/plugins/credentialsbinding/impl/BindingStepTest.java http://jenkins-ci.org/commit/credentials-binding-plugin/615c102baa4942f96e1bef415b67d628329060ce Log: Found workaround for JENKINS-26398 , which was the key to getting this test to pass. Compare: https://github.com/jenkinsci/credentials-binding-plugin/compare/4640f27f13e4...615c102baa49
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowTest.java
            http://jenkins-ci.org/commit/workflow-plugin/73d09e62b8b094f2865d1aab32044cf402965108
            Log:
            JENKINS-26398 Linking to a filed issue.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowTest.java http://jenkins-ci.org/commit/workflow-plugin/73d09e62b8b094f2865d1aab32044cf402965108 Log: JENKINS-26398 Linking to a filed issue.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowTest.java
            http://jenkins-ci.org/commit/workflow-plugin/dd5eaf7aa09cc509fb98f46816fad2b2b337b5ea
            Log:
            Merge pull request #34 from jenkinsci/JENKINS-26398-comment

            Linking to a filed issue

            Compare: https://github.com/jenkinsci/workflow-plugin/compare/375c1db37f91...dd5eaf7aa09c

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowTest.java http://jenkins-ci.org/commit/workflow-plugin/dd5eaf7aa09cc509fb98f46816fad2b2b337b5ea Log: Merge pull request #34 from jenkinsci/ JENKINS-26398 -comment Linking to a filed issue Compare: https://github.com/jenkinsci/workflow-plugin/compare/375c1db37f91...dd5eaf7aa09c
            Hide
            jglick Jesse Glick added a comment -

            Could do that, but some of the tests also seem to require use of a JNLP slave, which is rather more complicated to model. Punting for the moment.

            Show
            jglick Jesse Glick added a comment - Could do that, but some of the tests also seem to require use of a JNLP slave, which is rather more complicated to model. Punting for the moment.
            Hide
            integer Kanstantsin Shautsou added a comment -

            Maybe split slave creation into KillableSlaveRule for example and bind it where required to JenkinsRule?

            Show
            integer Kanstantsin Shautsou added a comment - Maybe split slave creation into KillableSlaveRule for example and bind it where required to JenkinsRule?
            Hide
            jglick Jesse Glick added a comment -

            I think would suffice to add methods to JenkinsRule.

            Show
            jglick Jesse Glick added a comment - I think would suffice to add methods to JenkinsRule .
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowTest.java
            http://jenkins-ci.org/commit/workflow-cps-plugin/ec779e6d6937e5d7777e11a03d415f76a11bff74
            Log:
            JENKINS-26398 Linking to a filed issue.
            Originally-Committed-As: 73d09e62b8b094f2865d1aab32044cf402965108

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowTest.java http://jenkins-ci.org/commit/workflow-cps-plugin/ec779e6d6937e5d7777e11a03d415f76a11bff74 Log: JENKINS-26398 Linking to a filed issue. Originally-Committed-As: 73d09e62b8b094f2865d1aab32044cf402965108

              People

              • Assignee:
                Unassigned
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: