[JIRA] (JENKINS-59385) Pipeline script bat command hanging in Windows 10 agent

5 views
Skip to first unread message

t.krisztian95@gmail.com (JIRA)

unread,
Sep 16, 2019, 3:58:02 AM9/16/19
to jenkinsc...@googlegroups.com
Krisztián Gyula Tóth created an issue
 
Jenkins / Bug JENKINS-59385
Pipeline script bat command hanging in Windows 10 agent
Issue Type: Bug Bug
Assignee: Kohsuke Kawaguchi
Components: batch-task-plugin, pipeline
Created: 2019-09-16 07:57
Environment: Jenkins ver. 2.189, Windows 10 Pro ver. 1903, Linux master and Windows slave
Labels: jenkins pipeline bat Windows hanging
Priority: Minor Minor
Reporter: Krisztián Gyula Tóth

When I run the pipeline stage to execute 'electron-packager .' command, it hangs forever.

My stage:

 

 stage("Electron package"){
            steps{
                script{
                    echo "Electron package"
                    timeout(time: 10, unit: 'MINUTES') { // timeout 
                    //sh '''
                    //    cat <<EOF > packager.bat
                    //    @echo off 
                    //    electron-packager . 
                    //    '''
                    //bat returnStdout: true, returnStatus: false, script: 'electron-packager . &'
                    //powershell "npm run package-win"
                    bat "electron-packager ."
                //bat returnStatus: true, script: 'electron-packager ./'
                    //bat 'cmd.exe /c packager.bat'
                //bat "electron-packager ./release-builds electron-app --platform=win32 --arch=x64 --overwrite --version-string.ProductName=\"MY Electron App\""
                    }
                }
            }

As you can see the commented lines I tried several ways but it always just hangs.

  • Powershell
  • Execute bat file 

 

No output or result about in the logs to see what happens and what is it waiting for. For me, it looks like a permission issue. So, I disabled UAC and the Jenkins agent is running as a Service. In earlier stages I also used 'bat' steps and it's all working fine.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

t.krisztian95@gmail.com (JIRA)

unread,
Sep 16, 2019, 4:43:02 AM9/16/19
to jenkinsc...@googlegroups.com
Krisztián Gyula Tóth updated an issue
Change By: Krisztián Gyula Tóth
Attachment: image-2019-09-16-10-42-50-509.png

t.krisztian95@gmail.com (JIRA)

unread,
Sep 16, 2019, 4:45:02 AM9/16/19
to jenkinsc...@googlegroups.com
Krisztián Gyula Tóth commented on Bug JENKINS-59385
 
Re: Pipeline script bat command hanging in Windows 10 agent

As I thought the issue was related to some permission settings. I changed the Jenkins agent service Log on property from 'Local System account' to 'This account' option and I selected the same account what I use to log in the machine. The 'electron-packager .' command now executes and not hanging anymore.

 

Reply all
Reply to author
Forward
0 new messages