-
Notifications
You must be signed in to change notification settings - Fork 96
Description
Should actually be for `durable-task-lib` (https://github.com/jenkinsci/lib-durable-task) but that did not come up as a possible component
Stand up a controller and create a permanent windows agent. I used the following system properties:
JENKINS_OPTIONS="-Dorg.jenkinsci.plugins.durabletask.WindowsBatchScript.USE_BINARY_WRAPPER=true -Dorg.jenkinsci.plugins.durabletask.PowershellScript.USE_BINARY_WRAPPER=true -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.USE_BINARY_WRAPPER=true -Dorg.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep.USE_WATCHING=true -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=30"
Create a job like this:
pipeline {
agent {
label 'seco'
}
stages {
stage('Long Running Process') {
steps {
echo "Starting long-running process on Windows node"
// Use a single command with ping to create a long-running process
// Ping 127.0.0.1 1800 times with 1 second interval = 30 minutes
//bat 'ping 127.0.0.1 -n 1800 > null'
bat 'ping 127.0.0.1 -n 1800'
//bat 'c:\test.bat'
echo "After long-running process"
}
}
}
}
now execute this job. After it starts to run, kill the agent process in windows. Observe that the wrapper and its child ping process both exit immediately.
Originally reported by mikecirioli, imported from: durable-task-lib binary wrapper not correctly spawning independent processes on windows agents
- status: Open
- priority: Minor
- component(s): durable-task-plugin
- resolution: Unresolved
- votes: 0
- watchers: 1
- imported: 2025-12-09
Raw content of original issue
Should actually be for `durable-task-lib` (https://github.com/jenkinsci/lib-durable-task) but that did not come up as a possible component
Stand up a controller and create a permanent windows agent. I used the following system properties:
JENKINS_OPTIONS="-Dorg.jenkinsci.plugins.durabletask.WindowsBatchScript.USE_BINARY_WRAPPER=true -Dorg.jenkinsci.plugins.durabletask.PowershellScript.USE_BINARY_WRAPPER=true -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.USE_BINARY_WRAPPER=true -Dorg.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep.USE_WATCHING=true -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=30"Create a job like this:
pipeline { agent { label 'seco' }stages { stage(<span class="code-quote">'<span class="code-object">Long</span> Running <span class="code-object">Process</span>'</span>) { steps { echo <span class="code-quote">"Starting <span class="code-object">long</span>-running process on Windows node"</span> <span class="code-comment">// Use a single command with ping to create a <span class="code-object">long</span>-running process// Ping 127.0.0.1 1800 times with 1 second interval = 30 minutes
//bat 'ping 127.0.0.1 -n 1800 > null'
bat 'ping 127.0.0.1 -n 1800'
//bat 'c:\test.bat'
echo "After long-running process"
}
}
}
}
now execute this job. After it starts to run, kill the agent process in windows. Observe that the wrapper and its child ping process both exit immediately.
- environment:
using latest jenkins and a windows VM to host the permanent agent. OpenSSH installed on VM and agent connection is via SSH