Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-13407

Undeploy Tomcat tasks should allow for failure to be ignored

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Tomcat tasks
    • 3
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      What needs to be improved?

      I wanted to make a request for the Tomcat Undeploy task to have an optional "Ignore Undeploy Failure" feature so that if the webapp fails to undeploy it won't fail the build.

      This would be immensely helpful in situations where you're deploying to a Tomcat server for the first time, or the last deployment failed for some reason and you want to re-run the deployment job without having to remember to go in and disable the Undeploy task.

      An alternative would be a totally new task called something like, "Conditionally Undeploy" which only undeploys if there's a web app deployed at the given context root.

            [BAM-13407] Undeploy Tomcat tasks should allow for failure to be ignored

            For what it's worth, I came up with the workaround below. In our setup I needed to undeploy the application so that I could restart Tomcat without the application loading on Tomcat start.

            • I created a basic web application that does nothing. It's the maven web-application archtype without any changes. I called it noop
            • I generated the war file and placed this on our Bamboo server
            • Instead of undeploying the main application, which may fail if it's not running due to a crash, I deploy noop.war on the context path for the application I'm trying to undeploy
            • * Minor note: The Tomcat Deploy task refused to take an absolute file path, it always assumes a relative one. For our version anyways
            • Depending on your needs, you can now undeploy noop.war that's surely running

            It's kind of a hack, but it works for us for now.

            Ricardo van den Broek added a comment - For what it's worth, I came up with the workaround below. In our setup I needed to undeploy the application so that I could restart Tomcat without the application loading on Tomcat start. I created a basic web application that does nothing. It's the maven web-application archtype without any changes. I called it noop I generated the war file and placed this on our Bamboo server Instead of undeploying the main application, which may fail if it's not running due to a crash, I deploy noop.war on the context path for the application I'm trying to undeploy * Minor note: The Tomcat Deploy task refused to take an absolute file path, it always assumes a relative one. For our version anyways Depending on your needs, you can now undeploy noop.war that's surely running It's kind of a hack, but it works for us for now.

            I think that, more in general, Bamboo should allow for any task (e.g. cleanup before deployment) to fail without considering the whole plan as failed, if the user considers that task as optional

            Antonio Anzivino added a comment - I think that, more in general, Bamboo should allow for any task (e.g. cleanup before deployment) to fail without considering the whole plan as failed, if the user considers that task as optional

              Unassigned Unassigned
              5b5e5f44da5f Andre Bickford
              Votes:
              10 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated: