Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groowin-Groovy DSL won't give back control of script #84

Open
rsghotra opened this issue Mar 31, 2017 · 0 comments
Open

Groowin-Groovy DSL won't give back control of script #84

rsghotra opened this issue Mar 31, 2017 · 0 comments

Comments

@rsghotra
Copy link

Hi there!

First of all, I would like to thank you for writing groowin plugin for Gradle. I had made my life pretty easy as build engineer. We are now using it in our production pipeline runs.

Today, I thought to try groowin-groovy DSL to expand its applications. When I run my groovy script in GroovyConsole then the script runs fine and give me back control. But when I try to execute the same script through command line, it does not give back control.

Also, suppose I have code writtern after remoteManagement{} block then my script finishes execution of rest of the script. I can see all log lines etc. After that it just stuck there.

I feel that there is session still left which is not allowing it close the connection with remote machine.

I have tried running the script in both administrator and non-administrator mode. I am using Windows 7. Groovy 2.4.5.

Following is simple code snippet(orginally I have to copy around 20 files):

@grab('com.aestasit.infrastructure.groowin:groowin:0.1.10')

import static com.aestasit.infrastructure.winrm.DefaultWinRM.*

def user = 'DEVLAB2k\admin'
def pwd = 'password'
def host = 'tas-op-01-01'
def port = '5985'

remoteManagement("${user}:${pwd}@${host}:${port}") {
cp {
from {remoteFile 'c:\Program Files\temp\UEM\common-settings\DB.properties'}
into {localDir 'rob-fix'}
}
}

I am only able to get my control back if I write System.exit(0) at the end. Please let me know if you would like to have more information and I would provide you guys with screenshots.

Thank You!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant