Skip to content

MSDeploy in Exec block deploys but rake task fails #210

@pavanmishra

Description

@pavanmishra

We are trying to auto deploy a MVC .net project packaged as a zip file. One of the files produced by build script is projectname.deploy.cmd. Using this script directly from the commandline works fine and including the same in exec block, though it deploys, rake reports as fatal error. This is not usable in CI.

Here are the outputs from rake as well as command script

Command Line Output

>Release\web.deploy.cmd /y /p:YadaYada
Info: Using ID '21173728-6296-4c7d-bc3e-21d70dc6923d' for connections to the remote server.
Info: Updating setAcl (Default Web Site/DeltaX.web_deploy).
Info: Updating setAcl (Default Web Site/DeltaX.web_deploy).
Info: Using ID '5783567d-02fe-4db0-bcb9-00ef2310f4fc' for connections to the remote server.
Info: Updating setAcl (Default Web Site/DeltaX.web_deploy).
Info: Updating setAcl (Default Web Site/DeltaX.web_deploy).
Total changes: 4 (0 added, 0 deleted, 4 updated, 0 parameters changed, 0 bytes copied)

Whereas exec block below

desc 'Deploy using Web Deploy'
exec :deploy do |cmd|
    `#{"Release\\web.deploy.cmd /y /p:YadaYada"}`   
#   cmd.command = "Release\web.deploy.cmd /y /p:YadaYada"
end

when invoked via rake produces the following

>rake deploy --trace
Info: Using ID '1ddc0f92-09fa-4a48-9587-fa72d15ae943' for connections to the remote server.
Info: Updating setAcl (Default Web Site/DeltaX.web_deploy).
Info: Updating setAcl (Default Web Site/DeltaX.web_deploy).
Info: Using ID 'e7d33b17-c3bc-4fb0-b911-13add6d10534' for connections to the remote server.
Info: Updating setAcl (Default Web Site/DeltaX.web_deploy).
Info: Updating setAcl (Default Web Site/DeltaX.web_deploy).
Total changes: 4 (0 added, 0 deleted, 4 updated, 0 parameters changed, 0 bytes copied)
F, [2012-05-30T19:50:15.123046 #4364] FATAL -- : Exec Failed. See Build Log For Detail
rake aborted!
Exec Failed. See Build Log For Detail

Tasks: TOP => deploy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions