Deploy Spring boot app in server

Hi Guys,

  I need to deploy spring boot maven application to the remote server. I would like to know how this can be acheived it?

 

 

Thanks,

Kishore

1 answer

Hi Kishore,

If your question is just about how to upload files from Bamboo directly to a remote server as part of a Bamboo job, just use the SCP task in Bamboo.

Hope that helps.

Hi,

  I got different problem. The bamboo server running with Java7 and i have few projects build in 7 and few in 8.

I tried using JDK capability for java 8 projects but bamboo not picking the right JDK.Please find the log below:

command 14-Aug-2017 14:59:29 Beginning to execute external process for build 'webservice-client - its-api-provider - Build #6 (WEBSERVICECLIENTS-ITSAPI-BUIL-6)'\n ... running command line: \n/usr/local/six/maven/bin/mvn --batch-mode -Djava.io.tmpdir=/usr/local/bamboo/temp/WEBSERVICECLIENTS-ITSAPI-BUIL clean package\n ... in: /usr/local/atlassian-bamboo-data/xml-data/build-dir/WEBSERVICECLIENTS-ITSAPI-BUIL\n ... using extra environment variables: \nbamboo_deploy_target_devwas8=LPI-DEV-WAS8\nbamboo_scm_base_url=http://srv-qs-svn:18080/svn\nJAVA_HOME=/tmp/jdk8\nbamboo_deploy_target_prod=LPI-PROD-SYD\nuseMavenReturnCode=false\nbamboo_deploy_target_qa=LPI-QA-SYD\nbamboo_repository_url_snapshots=http://srv-qs-nex:8081/nexus/content/repositories/snapshots\nbamboo_websphere_sharedlib_hibernate_path=/six-hibernate\nbamboo_scm_bds_portlets_url=/portlet-applications/portlets\nbamboo_deploy_target_qa2=LPI-QA-BHS\nbamboo_scm_bds_portlet_common_url=/portlet-applications/portlet-common\nbamboo_websphere_sharedlib_dbclient_path=/six-dbclient\nbamboo_scm_portlets_url=/portlets\nbamboo_websphere_sharedlib_common_path=/six-common\nbamboo_maven_global_flags=\nMAVEN2_HOME=/usr/local/six/maven\nbamboo_websphere_sharedlib_base_path=/usr/local/WebSphere/shared-lib\nbamboo_repository_url_releases=http://srv-qs-nex:8081/nexus/content/repositories/releases\nbamboo_deploy_target_dev=LPI-DEV\nbamboo_scm_wsclient_url=/webservice-clients\nMAVEN_OPTS=-Xms512m -Xmx1024m -XX:MaxPermSize=512m -XX:PermSize=512m\nbamboo_scm_services_url=/services\nM2_HOME=/usr/local/six/maven\nbamboo_deploy_target_prod1=LPI-PROD-SYD\nbamboo_deploy_target_prod2=LPI-PROD-BHS\nbamboo_websphere_sharedlib_wsclient_path=/six-wsclient\nbamboo_websphere_sharedlib_filter_path=/six-filters\nbamboo_snapshots_build_command=clean deploy ${bamboo.maven.global.flags}\nbamboo_scm_common_url=/portlet-common\nbamboo_deploy_target_auth=LPI-PROD-AUTH\nbamboo_scm_servicescommon_url=/services-common\nPATH=/tmp/jdk8/bin:/sbin:/usr/sbin:/bin:/usr/bin\n
error 14-Aug-2017 14:59:29 Error: JAVA_HOME is not defined correctly.
error 14-Aug-2017 14:59:29   We cannot execute /tmp/jdk8/bin/java
simple 14-Aug-2017 14:59:29 Failing task since return code of [/usr/local/six/maven/bin/mvn --batch-mode -Djava.io.tmpdir=/usr/local/bamboo/temp/WEBSERVICECLIENTS-ITSAPI-BUIL clean package] was 1 while expected 0
simple 14-Aug-2017 14:59:29 Finished task 'Clean and package the source code to jar file'
simple 14-Aug-2017 14:59:29 Running post build plugin 'NCover Results Collector'
simple 14-Aug-2017 14:59:29 Running post build plugin 'Clover Results Collector'
simple 14-Aug-2017 14:59:29 Running post build plugin 'Artifact Copier'
simple 14-Aug-2017 14:59:29 Publishing an artifact: its api provider
error 14-Aug-2017 14:59:29 Unable to publish artifact [its api provider]: the source directory /usr/local/atlassian-bamboo-data/xml-data/build-dir/WEBSERVICECLIENTS-ITSAPI-BUIL/target does not exist.
simple 14-Aug-2017 14:59:29 Finished publishing of artifact Shared artifact: [its api provider], pattern: [**/*.jar] anchored at: [target] in 0s

Are you sure that you have defined the Java capability on your agent? Defining a new JDK capability 

I defined but still didnt work due to access restrictions on servers. I changed to Java 7 project and things are working fine.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,826 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you