Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeployClient Unable to overwrite existing file #90

Open
reteid opened this issue Oct 21, 2021 · 6 comments
Open

DeployClient Unable to overwrite existing file #90

reteid opened this issue Oct 21, 2021 · 6 comments

Comments

@reteid
Copy link

reteid commented Oct 21, 2021

Hi There, Im modifying our Azure Dev Ops release pipeline to deploy modules onto the Staging slot (with the Poly Deploy task) , then do an azure Slot Swap , then Deploy again (with Poly Deploy) to the Prod slot - so that there is no downtime.

However, on the second deployment the Poly Deploy task fails with this error :

##[error]Unhandled: Failed cp: cp: dest file already exists: D:\a\1\s\ModuleName_Install.zip

Here's some additional logging if it helps.

C:\hostedtoolcache\windows\DeployClient.exe\0.9.3\x64\DeployClient.exe --target-uri https://website.net --api-key 123 --encryption-key xyz --no-prompt --installation-status-timeout 60

@mitchelsellers
Copy link
Collaborator

Are you using a hosted runner? Or your own?

@reteid
Copy link
Author

reteid commented Oct 22, 2021

yeah its cloud hosted , Azure Devops the Agent used is "vs2017-win2016"

@bdukes
Copy link
Contributor

bdukes commented Oct 22, 2021

The deploy client copies the packages to the directory with the deploy client (see https://github.com/EngageSoftware/cantarus-polydeploy-client/blob/5eb6c49c1eb384760bf3f2a3dac4e1abc11bc0d6/cantarus-polydeploy-client/index.js#L11-L14). Doing this twice is causing the exception, and I don't see a way around it other than fixing the deploy client. I guess, ideally, we'd be copying the files into independent folders, rather than the root, since they could be a different selection of packages for different runs.

@bdukes
Copy link
Contributor

bdukes commented Oct 22, 2021

I've created an issue tracking this at EngageSoftware/cantarus-polydeploy-client#42

@reteid
Copy link
Author

reteid commented Oct 22, 2021

Thanks Brian. my work-around was to rename the package to something random in-between deployments. but this causes there to be multiple packages (of the same module) that get deployed on the second deployment.

@bdukes
Copy link
Contributor

bdukes commented Oct 22, 2021

This fix is included in version 1.1.3 (currently being verified and deployed to https://marketplace.visualstudio.com/items?itemName=engage-software.cantarus-polydeploy-client)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants