MSDeploy Parameter - msdeploy

I am trying to pass application pool password as a command line argument to msdeploy.exe. Also, I am passing setParameter file as another command line agrument. The overall command line looks like this
msdeploy.exe -verb:sync -source:package=D:\package.zip,encryptPassword="password" dest:auto,computername=mycompuetrname -setParam:name="AppPoolPassword",value="mypassword" -setParamFile="D:\Test.setParameters.xml"
Other things to be noted, Test.setParameters.xml file does NOT have AppPoolPassword param, because I want to pass that as command line as mentioned above.
When I execute the above command, I get an error which says "ApplicationPoolPassword cannot be null". If I do not specify the parameters.xml file but just specify AppPoolIdentity and AppPoolPassword on the command line the command is successful and creates the necessary web site structure.
My question is does setParamFile overrides the -setParam command line paramters? I did google search but did not find anything which confirms that. Anyone who has experienced this, please help.
Thanks

Regarding setParamFile overriding setParam, you've got it backwards. The setParam parameter takes precedence over the setParamFile.
Regarding the error, it looks like your parameter names are off. The error references parameter name "ApplicationPoolPassword". Your command is using the parameter name "AppPoolPassword". Try changing the command to use the name "ApplicationPoolPassword".

Related

Flyway 7.7.3 seems to ignore my "callback"

I am upgrading from Flyway 5.4 to 7.7.3 and ran into some issue.
flyway -teams -url=jdbc:oracle:thin:#localhost:1521/XE "-user=xxx as SYSDBA" -password=xxx -table=flyway_schema_history_app -encoding=utf-8 -baselineOnMigrate=true migrate
(I have the teams edition license)
Flyway gives me the following error message:
**
ERROR: Unable to parse statement in /flyway/sql/incremental/Build_302_Baseline/V302_106__fosprd_INSERT_Master_eg_pocqueue.sql at line 117 col 1. See https://flywaydb.org/documentation/knownparserlimitations for more information: No value provided for variable substitution: &R. Check your configuration. If this is not a SQLPLus variable intended to be substituted (eg. in a string literal), then you will need to add SET DEFINE OFF in the script beforehand.
Caused by: No value provided for variable substitution: &R. Check your configuration. If this is not a SQLPLus variable intended to be substituted (eg. in a string literal), then you will need to add SET DEFINE OFF in the script beforehand.
**
This is caused by a special character "&" in the SQL statement, however, I have made sure the SQL file is using UTF-8 encoding as well as Unix return (LF).
Also, I keep my callbacks under:
bash-5.0$ pwd
/flyway/sql/callbacks
bash-5.0$ ls
afterBaseline.sql afterEachUndo.sql afterMigrateError.sql afterUndo.sql beforeEachUndo.sql
afterBaselineError.sql afterEachUndoError.sql afterRepair.sql afterUndoError.sql beforeMigrate.sql
afterEachMigrate.sql afterMigrate.sql afterRepairError.sql beforeEachMigrate.sql beforeUndo.sql
This used to be able to run on 5.4 with no issue. But it's giving me this error on 7.7.3, anyone can point me to the right direction?
Thanks
This is due to the changes between versions of flyway's SQLPlus support and the fat you have a teams license.
As indicated in the message, this is related to SQLPlus's variable substitution:
https://flywaydb.org/documentation/database/oracle#variable-substitution
If you are not using SQLPlus features, you could try disabling them:
https://flywaydb.org/documentation/configuration/parameters/oracleSqlPlus
but the recommended solution is to place SET DEFINE OFF in the SQL script before the offending ampersand (with the option of reverting that afterwards)

Passing variables to sshexec command resource file in ANT

I have created a large script to be passed to an sshexec commandResource in ant as follows.
<sshexec host="${host.server}"
username="${username}"
password="${oracle.password}"
commandResource="path-to-file/script.txt"
/>
This is working as intended.
There are several lines that will get executed on the server in that script. The contents of the script.txt file is as follows :
/script/compile_objects.sh /path-to-code/ login password
/script/compile_code.sh /path-to-code/ login password
However, I would prefer to not store the login and password as clear text in the script.txt file. Is it possible to pass parameters to each line of the command resource. I'm aware that each line in the command resource file gets executed in its own shell.
I tried string replacement from a property in the Ant script, but it failed with a bad substitution error like so. Is there another way to do this?
<property name="oracle.password" value="thepassword"/>
and then in the script file, alter to:
/script/compile_objects.sh /path-to-code/ login ${oracle.password}
/script/compile_code.sh /path-to-code/ login ${oracle.password}
This type of replacement works when using the command feature, but seems to fail when using commandResource.
Edit :
I am using Apache Ant 1.9.4
and jsch-0.1.54.jar

Publishing test results through command line test runner in VSTS

I'm trying to use vstest.console.exe with the TfsPublisher logger in VSTS (cloud).
There's a URL example shown in the article for TFS onsite, but I'm trying to work out what parameters to use for my VSTS build. The example is:
/logger:TfsPublisher;Collection=http://localhost:8080/tfs/DefaultCollection;TeamProject=MyProject;BuildName=DailyBuild_20121130.1
But I just get an error saying the build cannot be found in the project, e.g.
Error: Build "1234" cannot be found under team project "MyProject".
I believe the problem is the BuildName parameter. My project and build definition have no spaces in the names. I have tried various values, e.g.:
BuildName=%BUILD_BUILDID% (resolves to number, e.g. 1234)
BuildName=%BUILD_DEFINITIONNAME% (resolves to build definition name OK)
BuildName=%BUILD_BUILDURI% (resolves to url, e.g. vstfs:///Build/Build/1234)
The error message confirms that the environment variables seem to be resolving OK, but I can't determine what I should substitute for "DailyBuild_20121130.1" in my case.
Updated: My vstest.console.exe logger parameter currently looks like
/logger:TfsPublisher;Collection=%SYSTEM_TEAMFOUNDATIONCOLLECTIONURI%;TeamProject=%SYSTEM_TEAMPROJECT%;BuildName=%BUILD_BUILDNUMBER%
I effectively got the result I wanted using the Trx logger and one of the "Publish Test Results" build steps:
vstest.console.exe ... /logger:Trx
The build name is generated by "Build number format" under build definition "General" tab. You can get it from "BUILD_BUILDNUMBER" variable.

Getting this error when compiling in theos

This is the error here:
http://i.imgur.com/tDwiXod.jpg
Any ideas? I have no idea what the error means
It seems like your theos tool is either not installed correctly or not in the path it expects it to be or your environment variable that points to it is not set correctly. You are also trying to compile as root which is problematic. You should be compiling as 'mobile' user and only use root while installing theos.
Type "echo $THEOS" (without quotes) to see if that environment variable is even set. It should point to somewhere like /opt/theos

Cant change memory usage in R

I am trying to change the memory usage for R on a windows 7 machine.
I go to the desktop shortcut > properties and try to change the target from
"C:\Program Files\R\R-2.13.0\bin\i386\Rgui.exe" to
"C:\Program Files\R\R-2.13.0\bin\i386\Rgui.exe" --max-mem-size=500M
as per this post https://stat.ethz.ch/pipermail/r-help/2010-June/241154.html
But I get an error message "The name '"C:\Program Files\R\R-2.13.0\bin\i386\Rgui.exe" --max-mem-size=500M' specified in the target box is not valid, make sure the path and file name are valid."
Any suggestions on how to fix this?
I just tried it. It works fine on my machine. Maybe you entered the --max.. in the "execute-in"-field instead of the "target"-field. If this is not the problem try this: create a .bat file and enter yourpath\Rgui.exe --max-..., then create a shortcut to that .bat.

Resources