How can CruiseControl.NET realize that it can control remote pc to execute automation test and monitor the status? - cruisecontrol.net

I want to realize that CCNET can control remote pc to execute a bat file which is in file server and monitor the status,stop or finished.
the bat file is CodeUI automation test.

Your question is a little vague but what I am assuming that you are trying to do is to have CruiseControl execute a shell command.
Check out
http://www.cruisecontrolnet.org/projects/ccnet/wiki/Executable_Task
So something like this in your script
<exec executable="\\server\c$\projects\myproject\build.bat" />
If however that bat file must be run from the computer the script is located try looking in psexec.exe.
http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
https://superuser.com/questions/781796/run-a-batch-file-on-a-remote-computer-as-administrator

Related

Launch terminal window from go lang program?

I want to have a functionality in which i will create an go program running on linux system. When that program is running it will download a zip folder from server & extract it to user HOME directory. That extracted folder will have a shell script file eg. Update.sh.
Now i want once that file is extracted i want to open the terminal & run the shell script automatically which resides inside extracted folder. Kindly gudie me can i do that ?
Have you looked at the Go standard library? Your best bet is os/exec. I don't know how feasible it would be to open another terminal and launch the script in it, but you can pipe the output of the command launched by os/exec to the stdout of the terminal in which the go program was launched.
From your question, it sounds like the go program downloading and running the script is already being run by the user on the local machine. If this is not the case, then the above will not work.

Jenkins with linux machine for selenium script

I have created selenium testng.xml file and make windows batch file for my local window machine and Jenkins build now function perfectly working
But now client expectation is run jenkins projects for same selenium script in Linux server machine.
I m not aware about how can i start for my testng file for linux server?
You created batch file while working with testng.xml on Windows. You would create an equivalent shell file while working with testng.xml on Linux.
Once done, Go to Jenkins Job configuration build section and select Execute Shell option.
Put you shell script in command window or execute shell file directly from command window itself.
To execute shell file, use below syntax:
./<file>

How to remotely control Trace32 via Terminal

I have an automated Linux agent (CentOS) with Bamboo to aid in building and deployment of new software onto a board. I want to be able to run .cmm files via Trace32 and a Lauterbach onto my locally located board using the remote Bamboo agent to trigger daily builds and deployment.
I am aware of the terminal command option: ./trace32 -s file.cmm to avoid using the GUI.
Is there anyway I can use this kind of thing for remote deployment, perhaps utilising ssh?
There is no SSH server in TRACE32. However you can control TRACE32 remotely via the TRACE32 remote API. See the document "api_remote.pdf" in the PDF folder of your TRACE32 installation.
To launch some scripts or execute some simple commands from a bash shell, you can use the command line tool t32rem from the <t32>/bin/linux folder.
This tool uses the TRACE32 remote API to send TRACE32 commands to open TRACE32 GUIs.
Do the following:
Enable the TRACE32 remote API to add the following two lines to your TRACE32 configuration file (usually "config.t32")RCL=NETASSIST
PORT=20000 You have to ensure that there is an empty line before and after these lines in your configuration file.
Launch TRACE32 and send a command to it with t32rem like that: t32rem localhost port=20000 <command> For <command> you can choose any TRACE32 command like DO file.cmm to execute your mentioned PRACTICE script.
For more complex remote control of TRACE32 (e.g. from a Python script) you should have a look at the previously mentioned "api_remote.pdf" and the examples at <t32>/demo/api.
When you already have a command to run, how about using a Script task in your plan, so that you can execute the command you wanted?

Command Not Found CentOS | .bat File

Im trying to run a .bat file on my server through php popen command, ive struggled and finally got to the point where all the permissions are set correctly and now i can actually execute the file but i have a problem. In my server logs it displays
foo.bat: line 1: mstsc: command not found, referer: http://dev.example.com
The full code in the file is mstsc /v:192.168.1.1 I know this means that it doesn't recognise the command on centos but im not sure what to do to fix the problem.
The aim of this code is to open RDP for the user who requested it. Bear in mind that this code works perfectly locally on my windows OS using xampp but when i upload it to the server running CENTOS it doesnt work.
My question is
How do i fix this error and allow CENTOS to execute a command that opens an RDP window for the user
MSTSC is a Windows RDP client which is why it works on Windows.
It's not available to run on CentOS, let alone call by executing a Windows batch file! You'll need to use an alternative solution like FreeRDP and use a script like this one if you want to do this from CentOS: https://www.server-world.info/en/note?os=CentOS_7&p=x&f=5
I feel like this is exactly what you're after
http://www.jjclements.co.uk/2010/02/21/rdp-hyperlink/
It allows you run a bat file that opens windows RDP without needing to write a single line of server code. Take a look its pretty good!

How to make a shell script run automatically daily?

My operating system is windows xp and my server is Linux. I have developed a code in perl(saved in shell file).
I want to connect to Linux machine from Windows using your script only and then run a script on linux and this should be done on daily basis and automatically also.
Is it possible to do that?
Shell file under windows? that's called a batch file
Here is an example how you can set up a scheduled task on windows
If your remote machine is on linux, you can read here how you can set them.
You have several options to run the script on remote machine:
copy the file on the remote machine in the same location with the same file name (with ftp or ssh you can do this with another script) and set the linux machine's cron job to execute that same file daily
install a (web) server on the linux machine and create a web page through which's interface to upload and execute the script (this way you don't have to set up a cron job on linux)
create a script on the linux machine which to connect to another service (like a ftp location), download the needed script (the one which you want to execute) and execute it. Put the downloading script in your cron to execute whenever you want
use Net::SSH::Perl in your script to run commands on the linux machine (for this, you need ssh access to that machine, obviuosly)
Yes. Create a Scheduled Task which runs the PERL.exe with the script file name as an argument.

Resources