SubWCRev.exe in msbuild to find local modifications - msbuild

i want to execute SubWCRev.exe in msbuild to check for local modifications .if local modifications found then i want to display message on command prompt.
please tell me how can i use this.
thanks

Using MSBuild Exec task you can't get the output, so you'll have to write an MSBuild custom task to do that (Or an inline task if you are using MSBuild v4).
In that task you'll execute SubWCRev.exe, parse the result and set it to an output property.

Related

Post build task not working [Jenkins]

Can someone please help. I am trying to trigger a post-build action using the post-build action plugin. The log text that I inputted is returning false, hence not performing a post-build action. When I don't enter any text, it returns true.
This is a simple freestyle project that should print test if it matches the text
Post build setting
This is the console output returning false
Console output returning false
This is the output with no text
Output with no text
Any help will be appreciated. All I want to do is perform a post-build action depending on if my build fails or passes. Alternate solution is welcomed
Thanks
The root cause is your job has no any log out in Job Build Stage, please see Post build task plugin's help, this plugin will search job build log to find the text you specified in plugin.
A quick way to re-try is add a Build Step to print out something:
1. Execture shell (if job executed on Linux machine)
2. Execute windows batch (if job execute on Window machine)
A Job configure example:

How do I access a variable from Bamboo in a Gradle script?

I am creating a deployment in Bamboo. I have some variables set up under the deployment plan. How can I access these from a Gradle script? There is an arguments input (that I guess I would use something like variable=${bamboo.variable} in there, but I cant work out how to get them to go through to the script (at the moment just doing something like prinln varible to get them out). How can I do this?
As far as I know, Bamboo exports all it's variable into the build environment. In that case, you can get any variable within the script as follows:
System.getenv('bamboo.variable')
Alternatively, you may pass it into the build as build script parameter, like so:
-Pvariable=${bamboo.variable}
and then you can get it within a script as a project property:
println variable

MSBuild task silent execution

I have msbuild script that perfectly working. But when it runs when build task executed I'm seeing all output of building progress.
Is there a way to just write :
Building project ... OK.
instead of 1000 rows of text?
Use verbosity parameter to set log to the level you'd like, e.g.:
msbuild myScript.proj /verbosity:quiet
UPD:
Sorry, that was not clear from the original question, but (from the comments) it looks like you want to have different verbosity levels for different Tasks. I don't think this is supported out-of-the box. You could try 2 solutions:
Run your task using Exec task (see this question for details)
Implement a custom logger and filter messages by task name.

Execute Multiple PowerShell Files using a SSIS Package

I have multiple PowerShell script files that I need to execute in a sequential flow(one after other). Can someone please help me how to schedule multiple PowerShell files to be executed using a SSIS Package. And I need to build a fault tolerant model were I need to re-execute a powershell script in case of failure.
Running PowerShell
There isn't a built-in Execute PowerShell task (pity) so you'll need to use an Execute Process Task with the path to powershell.exe
Something that you will need to take into consideration is that the default execution policy for PowerShell is Restricted which cannot run a script. Further complicating matters is the account that runs the SSIS package will also need to have its execution policy modified to be able to fire off those scripts. It's a simple matter of Set-ExecutionPolicy RemoteSigned or whatever level you feel is appropriate but you'll need to do this from within the account.
Fault Tolerance
The simple approach is to ignore the return code in the Execute Process Task. Alternatively, if the desire is to keep running the PS1 until it doesn't fail, then you'd wrap a For Loop Container around the Execute Process Task and only set the terminal condition once the task returns a success value. Things might still go sideways depending on what the failure is.

How to get MSBuild to print command output in post-build task?

I have a Visual Studio 2005 solution/vcproj which has a post-build task that runs unit tests. I want to build it using msbuild.exe.
However, when the tests fail, I do not see any output logged to the console (I've verified that output is logged when executed at the command line.) I can see the output if I use the /v:detailed parameter. Is there a better way to do this? Ideally, I only want to see the output if a test fails.
Thanks.
To answer my own question, the best way I've found is to call msbuild and pass parameters down to vcbuild:
msbuild ... /p:VCBuildAdditionalOptions="/M /logfile:logfile.log" || type logfile.log
So if the build fails, the errors that were logged will be output at the end of the build which is sufficient for me.