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

Need to rm /home/tomcat/tomcat/webapps/{app name} during deployment #1

Open
wayne-t opened this issue Feb 22, 2017 · 3 comments
Open

Comments

@wayne-t
Copy link

wayne-t commented Feb 22, 2017

Otherwise, even the .war file is copied to here: /home/tomcat/tomcat/webapps/ , /home/tomcat/tomcat/webapps/{app name} directory will be empty after tomcat started. .war is not exploded since {app name} direction exists already.

Also tested on 'tds deploy rollback'. It has the same problem.

@Stelminator
Copy link
Contributor

sounds like you're missing a file declaration (for the directory) in your rpm definition (spec file or fpm argument to generate the same).

@Stelminator
Copy link
Contributor

if you're using fpm, --rpm-auto-add-directories might just do the trick. otherwise: either %dir (spec file), or --directories (fpm, but explicit).

@wayne-t
Copy link
Author

wayne-t commented Feb 23, 2017

Thanks @Stelminator, I will try that later.
More background: the problem was found with a rpm generated by a sbt jenkins job. All rpms generated by maven jobs do not have this problem 'cuz mappings were done on exploded .war files instead of .war file itself. The quick fix we figured out yesterday was having this line in packaging.scala file:
rpmPost := Option("sudo rm -r /home/tomcat/tomcat/webapps/{app directory name}")

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

2 participants