将Spring Boot应用程序从bitbucket管道部署到azure?

时间:2017-02-08 11:45:50

标签: azure spring-boot bitbucket bitbucket-pipelines

我有一个标准的Spring启动应用程序托管在Bitbucket repo上,它使用bitbucket-pipeline.yml文件来运行maven构建

image: maven:3.3.3

pipelines:
  default:
    - step:
        script: # Modify the commands below to build your repository.
          - mvn clean install

从上传自定义Java Web应用程序到Azure - https://docs.microsoft.com/en-us/azure/app-service-web/web-sites-java-custom-upload Azure文档,它指出我的春季启动应用程序需要此文件

Springboot
In order to get a Springboot application running you need to upload your JAR or WAR file and add the following web.config file. The web.config file goes into the wwwroot folder. In the web.config adjust the arguments to point to your JAR file, in the following example the JAR file is located in the wwwroot folder as well.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
    </handlers>
    <httpPlatform processPath="%JAVA_HOME%\bin\java.exe"
        arguments="-Djava.net.preferIPv4Stack=true -Dserver.port=%HTTP_PLATFORM_PORT% -jar &quot;%HOME%\site\wwwroot\my-web-project.jar&quot;">
    </httpPlatform>
  </system.webServer>
</configuration>

我有两个问题。我应该在哪里将此文件添加到现有的项目目录struture?然后应该将哪些命令添加到管道文件以进行FTP部署?

0 个答案:

没有答案