Function和BitBucket构建管道

Function和BitBucket构建管道

本文介绍了Azure Function和BitBucket构建管道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是第一次使用Azure.

This is the first time using Azure.

我使用Visual Studio创建了一个非常简单的HTTP触发函数,最初在本地进行测试,然后与VS一起部署到Azure并正常工作.

I have created a very simple HTTP triggered function using Visual Studio, initially tested locally, then deployed with VS to Azure and worked correctly.

我现在试图做的是设置BitBucket管道,以便在提交更改后可以运行管道以将其部署到FAT,UAT和生产环境.我希望保留在本地进行开发和测试的能力,并尽可能保留通过VS发布的能力.

What I am now attempting to do is set up BitBucket Pipelines so upon commit of changes it is possible to run the pipeline for deployment to FAT, UAT and Production environments. I would like to retain the ability to develop and test locally and if possible by publishing from VS.

不幸的是,很难找到关于此的信息,因为99%的结果都是针对Azure管道的.

Unfortunately finding information on this is proving hard because 99% of the results are for Azure pipelines.

汤姆

推荐答案

您看过此存储库吗?

https://bitbucket.org/microsoft/azure-functions-部署/src/master/

自述文件看起来非常有用,它指定了使用BitBucket管道将功能代码部署到Azure所需的Yaml:

The readme looks quite informative, it specifies the required yaml to deploy the function code to Azure using a BitBucket pipeline:

script:
  - pipe: microsoft/azure-functions-deploy:1.0.2
    variables:
      AZURE_APP_ID: $AZURE_APP_ID
      AZURE_PASSWORD: $AZURE_PASSWORD
      AZURE_TENANT_ID: $AZURE_TENANT_ID
      FUNCTION_APP_NAME: '<string>'
      ZIP_FILE: '<string>'

它还包括用于创建必需的Azure资源的Azure CLI命令.

It also includes the Azure CLI commands to create the required Azure resources.

这篇关于Azure Function和BitBucket构建管道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 02:06