Azure Function Apps and Web Jobs
The Azure plugin supports deploying Azure Function Apps in three modes—ZIP package, code file, or Docker container—along with deployment slots and Web Jobs.
Prerequisites
Before you begin, ensure you have:
- Set up an Azure Cloud connection.
- A Resource Group and Storage Account provisioned in your environment CI.
Deploy a Function App (ZIP Package)
Use azure.FunctionApp to create a Function App and deploy application code as a ZIP archive. This is the standard deployment mode for most language runtimes.
-
In the side navigation bar, click Explorer.
-
Under Applications, expand your application and deployment package.
-
Click
, then select New > azure > FunctionAppZip.
-
Specify the following properties:
Property Required Description App Name No Name of the Function App. Defaults to the CI name. Service Plan Name Yes Name of the App Service Plan to use. Location Yes Azure region (for example, westus).Storage Account Yes Storage account name for this Function App. OS Type No Windows(default) orLinux.Linux Fx Version No Required for Linux OS. Framework and version (for example, `JAVA Functions Worker Runtime No Runtime language (for example, java,python,node,dotnet).Functions Extension Version No Azure Functions host version. Default: ~1.Allowed Origins No List of CORS allowed origins. If set, replaces the Azure defaults. App Settings No Application settings as key-value pairs. Is HTTPS Only No Set to trueto redirect all HTTP traffic to HTTPS. Default:false.Function App URL No Output: Base URL for all functions in this app. -
Attach the ZIP archive artifact to the CI.
-
Click Save and close and deploy.
Deploy a Function App (Code File)
Use azure.FunctionAppCode to deploy a single file artifact to a Function App, optionally targeting a specific deployment slot.
-
Under your application package, click
, then select New > azure > FunctionAppCodeSpec.
-
Specify the following properties:
Property Required Description App Name No Name of the Function App. Defaults to the CI name. Service Plan Name Yes Name of the App Service Plan to use. Location Yes Azure region. Storage Account Yes Storage account name for this Function App. Deployment Slot No Name of a deployment slot to target. OS Type No Windows(default) orLinux.Linux Fx Version No Required for Linux. Framework and version (for example, `JAVA Functions Worker Runtime No Runtime language (for example, java,python,node).Functions Extension Version No Azure Functions host version. Default: ~1.Allowed Origins No CORS allowed origins list. App Settings No Application settings key-value pairs. Is HTTPS Only No Redirect HTTP to HTTPS. Default: false.Deployment Slot URL No Output: URL of the targeted deployment slot under the Function App. -
Attach the file artifact to the CI.
-
Click Save and close and deploy.
Deploy a Function App as a Container
Use azure.FunctionAppContainer to create a Function App running a custom Docker container image. The App Service Plan must already exist before deploying.
-
Under your provisioning package, click
, then select New > azure > FunctionAppContainerSpec.
-
Specify the following properties:
Property Required Description App Name No Name of the Function App. Defaults to the CI name. Service Plan Name Yes Name of an existing App Service Plan. Location Yes Azure region. Storage Account Yes Storage account name. OS Type No Linux(default).Docker Custom Image Name Yes Docker image name and tag (for example, myregistry.azurecr.io/myfunc:latest).Docker Registry URL Yes Container registry URL. Docker Registry Username No Registry username. Docker Registry Password No Registry password. Allowed Origins No CORS allowed origins list. App Settings No Application settings key-value pairs. Is HTTPS Only No Redirect HTTP to HTTPS. Default: false.Function App URL No Output: Base URL for all functions in this app. -
Click Save and close and deploy.
Create a Function App Deployment Slot
Use azure.FunctionAppSlot to add a deployment slot to an existing Function App for staged deployments.
-
Under your provisioning package, click
, then select New > azure > FunctionAppSlotSpec.
-
Specify the following properties:
Property Required Description Function App Name Yes Name of the Function App to add the slot to. Slot Name Yes Name of the new deployment slot to create. -
Click Save and close and deploy.
Create a Triggered Web Job
Use azure.TriggeredWebJob to deploy a Web Job that runs on demand or according to a CRON schedule.
-
Under your application package, click
, then select New > azure > TriggeredWebJobSpec.
-
Specify the following properties:
Property Required Description Web App Name Yes Name of the Web App to bind the job to. Web Job Name No Name of the Web Job. Defaults to the CI name. Executable File Name Yes Name of the file inside the Web Job ZIP that must be executed. Schedule No CRON expression with 6 fields (second, minute, hour, day, month, day-of-week). If not provided, the job can only be triggered manually. -
Attach the Web Job ZIP artifact to the CI.
-
Click Save and close and deploy.
Create a Continuous Web Job
Use azure.ContinuousWebJob to deploy a Web Job that runs continuously in the background.
-
Under your application package, click
, then select New > azure > ContinuousWebJobSpec.
-
Specify the following properties:
Property Required Description Web App Name Yes Name of the Web App to bind the job to. Web Job Name No Name of the Web Job. Defaults to the CI name. Executable File Name Yes Name of the file inside the Web Job ZIP that must be executed. Is Singleton No If true, the job runs only on a single instance instead of all instances. Default:false. -
Attach the Web Job ZIP artifact to the CI.
-
Click Save and close and deploy.