Is it possible to trigger a force build on a project inside cruisecontrol.net using a batch file?????
You could use a URL Trigger, but as Joseph said, your machine with the batch file would need to modify a web page that the build machine checks. This could be a file on the build machine itself, modified by your batch file.
If your local machine has visibility to the web site that CC.NET run's on the build machine, I would imagine you could write a batch file that would execute the url command on whatever project you want which effectively just presses the "Force Build" button. Just issue whatever request the "Force Build" button does on that page.
I would give you some code, but I don't have my server box up at the moment so I can't see what that would be.
There's no simple URL, the buttons send a form via POST. However, there's a command line utility that will be included in 1.5 to perform such tasks.
Related
I have installed and configured Rundeck but I want to change the logo to my companies logo. Which file do I have to edit or is there a different method all together?
Take a look at this answer (tested successfully on Rundeck 4.7), but if you want to replace the default logo consider this.
Right now doesn't exist an API endpoint to change that without restarting the Rundeck service, so, the procedure is as follows (probably to automate in a bash script): put the files in the user-assets directory, put the parameters on the rundeck-config.properties file (in that specific order) and restart the service.
I have a requirement where I need to write functional test for download a file and testing its contents.
So i can say there are two parts.
1) Ensure clicking on a link downloads a file
2) Reading the file an checking its contents. Its a csv file, so I Can possibly do some manipulation with the content.
There are several issues with doing this. One is that if you're running a browser on a remote system, you'll need a way to get the file back to the system running Intern. The second issue is that you'll need to know where the downloaded file ended up when it was downloaded. A third issue is that some browsers (FF and IE) pop open OS-level dialogs that Selenium can't deal with.
The first question is: do you really need to download a file in the browser? It sounds like you may be testing a service rather than the browser, in which case you may be able to just download the file using Intern and inspect it there.
Assuming you do need to download a file via the browser, you should be able to configure a browser to not open a confirm dialog and to download the file to a known location, which at least handles 2 of the 3 issues mentioned above. Note that I haven't actually tested this.
In Firefox you can setup a test profile and use it when running tests. You'll likely need to configure the following properties:
browser.download.dir: 'path to download folder'
browser.download.folderList: 2
browser.helperApps.neverAsk.saveToDisk: 'text/csv'
browser.download.manager.showWhenStarting: false
For Chrome you'll pass options through the environment descriptor. The specific options should be:
'profile.default_content_settings.popups': 0
'download.default_directory': 'path to download folder'
Once you've setup the browser, your test code would need to click the link, then wait for some indeterminate amount of time (Selenium doesn't provide any sort of download progress data), then grab the file from the Intern test itself (using a network request or local file operation) to inspect it.
I'd like to set up a commit hook that will subsequently upload source files from a Windows environment to a Linux server, which is not the same as Linux server running SVN.
I'm familiar with setting up client side hooks, but not sure what the script should be like.
I'm not really sure the easiest way to go about this. I'm thinking a Windows script that will run a copy command that can do this sort of thing. My entire group would use it so the script would have to be located on a Windows NFS. Ideas?
not sure what the script should be like
Client-side (as server-side) hook is any program, which can be executed on this host. Single difference between these type of hooks is location, where program is executed - clent-side hooks of TortoiseSVN will run on developer's host with Working Copy
Your script must be non-interactive set of operations, which will perform needed operation (ssh or ftp to target host, upload files) - can't see any problem here (except one - FTPing a bundle of /random/ files is always a big headache)
The tasks I do manually for updating my web site:
Stop IIS 7
Copy source files from a folder to the virtual directory of my web site
Start IIS 7
There are many ways to approach this, but here is one way.
I am assuming you don't want every single file in your source repository to exist on your destination server. The best way to reliably extract what you need from your source on a regular basis is through a build file. Two options for achieving this are nant and msbuild.
Once you have the set of files you want to deploy, you now need a way to distribute them to your destination server & to stop and start IIS. Again, there are options, but I would personally recommend powershell (with the IIS snapin) for this.
If you want this to happen regularly, consider a batch file executed by some timer, such as a scheduled task, or even better, a CI solution such as TeamCity.
For a full rundown, there are examples within my PowerUp project that does this.
It depends where you are updating from, but you could have a your virtual directory pointing to a local read-only working copy of your source code and create a task that every day runs a batch file/powershell script/etc. that would update that working copy (via a svn update, git pull etc.)
That supposes that you have a branch that always contains the latest releasable code.
You have to create a batch file with the following content:
Stop WWW publishing service
Delete your old files
Copy the new files
Start WWW publishing service
You can start/stop services like this:
net stop "World Wide Web Publishing Service"
When you have your batch file you can create a task in the Task Scheduler that calls your batch in a regular time interval (e.g. each day).
I have a need to convert any document gets uploaded to Image.
I downloaded the exe (with all the dlls) on my local machine (dont have to install)
export.exe sourcefile.doc destinationfile.gif >> this syntax works from my local dos prompt.
How do I use the same syntax "export.exe exampledoc.doc exampledoc.gif" when an item is added to sharepoint doc library.
and Do I need to put the folder (where the exe and dlls are for this) in the sharepoint frontend server so it's accessible? If yes, where should this folder reside? Does the folder and files need sharepoint service account access?
I am totally new and I would really like if someone can shed some light on this (step by step if possible)?
Thanks
Justin...
In order to do this from a SharePoint event handler, each WFE on the farm would need to have your conversion application available, your event handler code would need to place the uploaded file in a temporary location on disc, invoke the conversion application (look at the .NET Process class for this), cancel the addition of the original, unconverted document, and add the output of your processed file to the library (ensure you use the DisableEventFiring() method of the event handler as to not have the event handler trigger itself during the addition of the new file), and then clean up after itself.
Having said that, this operation seems like something that you really wouldn't want to tax a web server getting any real traffic with doing in real time. You may want to look into batching the jobs to be done daily during traffic lulls by another system, or one dedicated resource on the farm.