I have bitbucket on a GCP vm instance and bamboo on another. I've linked the two applications together and added the appropriate bitbucket repo to bamboo. When trying to deploy a tomcat server using the war file from the bitbucket repo, I get an error indicating the WAR file couldn't be found. Here's the message:
simple 20-Mar-2018 00:57:26 Build test_project - test_name - Default Job #6 (TPR-TNM-JOB1-6) started building on agent Default Agent
simple 20-Mar-2018 00:57:26
simple 20-Mar-2018 00:57:26 Build working directory is /var/atlassian/application/bamboo/xml-data/build-dir/TPR-TNM-JOB1
simple 20-Mar-2018 00:57:26 Executing build test_project - test_name - Default Job #6 (TPR-TNM-JOB1-6)
simple 20-Mar-2018 00:57:26 Running pre-build action: VCS Version Collector
simple 20-Mar-2018 00:57:26 Starting task 'Test Description' of type 'com.atlassian.bamboo.plugins.tomcat.bamboo-tomcat-plugin:deployAppTask'
error 20-Mar-2018 00:57:26 Could not find war file at /var/atlassian/application/bamboo/xml-data/build-dir/TPR-TNM-JOB1/target/gulc.war. The application could not be deployed.
simple 20-Mar-2018 00:57:26 Finished task 'Test Description' with result: Error
simple 20-Mar-2018 00:57:26 Running post build plugin 'NCover Results Collector'
simple 20-Mar-2018 00:57:26 Running post build plugin 'Artifact Copier'
simple 20-Mar-2018 00:57:26 Running post build plugin 'npm Cache Cleanup'
simple 20-Mar-2018 00:57:26 Running post build plugin 'Clover Results Collector'
simple 20-Mar-2018 00:57:26 Running post build plugin 'Docker Container Cleanup'
simple 20-Mar-2018 00:57:26 Finalising the build...
simple 20-Mar-2018 00:57:26 Stopping timer.
simple 20-Mar-2018 00:57:26 Build TPR-TNM-JOB1-6 completed.
simple 20-Mar-2018 00:57:26 Running on server: post build plugin 'NCover Results Collector'
simple 20-Mar-2018 00:57:26 Running on server: post build plugin 'Build Hanging Detection Configuration'
simple 20-Mar-2018 00:57:26 Running on server: post build plugin 'Clover Delta Calculator'
simple 20-Mar-2018 00:57:26 Running on server: post build plugin 'Maven Dependencies Postprocessor'
simple 20-Mar-2018 00:57:26 All post build plugins have finished
simple 20-Mar-2018 00:57:26 Generating build results summary...
simple 20-Mar-2018 00:57:26 Saving build results to disk...
simple 20-Mar-2018 00:57:26 Logging substituted variables...
simple 20-Mar-2018 00:57:26 Indexing build results...
simple 20-Mar-2018 00:57:26 Finished building TPR-TNM-JOB1-6.
It looks like bamboo is trying to search for the WAR file in its own directory vs the bitbucket repo. Any suggestions?
Hey Christian,
I think you'll just need to pop target/gulc.war into the Tomcat Task WAR File field as it requires the directory path and filename, relative to the working directory.
Hope this helps :)
Hey Christian,
Bamboo's Tomcat deployment task requires the WAR file to be in the working directory of the build. You'll need to add a Source-code checkout task (before the Tomcat deployment task) to check it out from the repository into the working directory first.
Hope this helps. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Greetings, I'm running into the same issue. I've added the Source Code Checkout task and ensured the correct repo was configured. I also left the Checkout Directory blank. I used this as reference.
In the Deploy Tomcat task, I specified the /target/ directory in the WAR file field. But I get the follow message:
simple 21-Apr-2018 11:16:21 Build test_project - test_name - Default Job #11 (TPR-TNM-JOB1-11) started building on agent Default Agent
simple 21-Apr-2018 11:16:21
simple 21-Apr-2018 11:16:21 Build working directory is /var/atlassian/application/bamboo/xml-data/build-dir/TPR-TNM-JOB1
simple 21-Apr-2018 11:16:21 Executing build test_project - test_name - Default Job #11 (TPR-TNM-JOB1-11)
simple 21-Apr-2018 11:16:21 Starting task 'check_out_dev_master_test' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout'
simple 21-Apr-2018 11:16:21 Checking out into /var/atlassian/application/bamboo/xml-data/build-dir/TPR-TNM-JOB1
simple 21-Apr-2018 11:16:21 Updating source code to revision: 4446ce40168943b701870b360179925fccbdf1a6
simple 21-Apr-2018 11:16:22 Git: Updating references
simple 21-Apr-2018 11:16:22 Git:
simple 21-Apr-2018 11:16:22 Fetching '+refs/heads/classroom_01_dev_master:refs/heads/classroom_01_dev_master' from 'ssh://git@[IP]:7999/gul/classroom_base.git'.
simple 21-Apr-2018 11:16:22 Checking out revision 4446ce40168943b701870b360179925fccbdf1a6.
simple 21-Apr-2018 11:16:22 Updated source code to revision: 4446ce40168943b701870b360179925fccbdf1a6
simple 21-Apr-2018 11:16:22 Finished task 'check_out_dev_master_test' with result: Success
simple 21-Apr-2018 11:16:22 Running pre-build action: VCS Version Collector
simple 21-Apr-2018 11:16:22 Starting task 'Test Description' of type 'com.atlassian.bamboo.plugins.tomcat.bamboo-tomcat-plugin:deployAppTask'
error 21-Apr-2018 11:16:22 Could not find war file at /var/atlassian/application/bamboo/xml-data/build-dir/TPR-TNM-JOB1/target. The application could not be deployed.
simple 21-Apr-2018 11:16:22 Finished task 'Test Description' with result: Error
simple 21-Apr-2018 11:16:22 Running post build plugin 'NCover Results Collector'
simple 21-Apr-2018 11:16:22 Running post build plugin 'Artifact Copier'
simple 21-Apr-2018 11:16:22 Running post build plugin 'npm Cache Cleanup'
simple 21-Apr-2018 11:16:22 Running post build plugin 'Clover Results Collector'
simple 21-Apr-2018 11:16:22 Running post build plugin 'Docker Container Cleanup'
simple 21-Apr-2018 11:16:22 Finalising the build...
simple 21-Apr-2018 11:16:22 Stopping timer.
simple 21-Apr-2018 11:16:22 Build TPR-TNM-JOB1-11 completed.
simple 21-Apr-2018 11:16:22 Running on server: post build plugin 'NCover Results Collector'
simple 21-Apr-2018 11:16:22 Running on server: post build plugin 'Build Hanging Detection Configuration'
simple 21-Apr-2018 11:16:22 Running on server: post build plugin 'Clover Delta Calculator'
simple 21-Apr-2018 11:16:22 Running on server: post build plugin 'Maven Dependencies Postprocessor'
simple 21-Apr-2018 11:16:22 All post build plugins have finished
simple 21-Apr-2018 11:16:22 Generating build results summary...
simple 21-Apr-2018 11:16:22 Saving build results to disk...
simple 21-Apr-2018 11:16:22 Logging substituted variables...
simple 21-Apr-2018 11:16:22 Indexing build results...
simple 21-Apr-2018 11:16:22 Finished building TPR-TNM-JOB1-11.
-------------------
You'll see that the git checkout was successful but, strangely, the war file still can't be found in the correct directory :
error 21-Apr-2018 11:16:22 Could not find war file at /var/atlassian/application/bamboo/xml-data/build-dir/TPR-TNM-JOB1/target. The application could not be deployed.
However, I ssh'd into my vm and found the war file in the target folder:
[root@bamboo-03 target]# pwd
/var/atlassian/application/bamboo/xml-data/build-dir/TPR-TNM-JOB1/target
[root@bamboo-03 target]# ls
gulc gulc.war m2e-wtp maven-archiver
What else could be wrong? Thank you for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.