GithubHelp home page GithubHelp logo

schunduea / azure-function-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jenkinsci/azure-function-plugin

0.0 0.0 0.0 1.14 MB

A Jenkins plugin to deploy to Azure Functions

License: MIT License

Java 95.76% HTML 1.94% C# 0.73% F# 1.04% JavaScript 0.53%

azure-function-plugin's Introduction

Azure Function Plugin

A Jenkins plugin to deploy an Azure Function.

How to Install

You can install/update this plugin in Jenkins update center (Manage Jenkins -> Manage Plugins, search Azure Function Plugin).

You can also manually install the plugin if you want to try the latest feature before it's officially released. To manually install the plugin:

  1. Clone the repo and build:
    mvn package
    
  2. Open your Jenkins dashboard, go to Manage Jenkins -> Manage Plugins.
  3. Go to Advanced tab, under Upload Plugin section, click Choose File.
  4. Select azure-function.hpi in target folder of your repo, click Upload.
  5. Restart your Jenkins instance after install is completed.

Deploy to Azure Function

Prerequisites

To use this plugin to deploy to Azure Function, first you need to have an Azure Service Principal in your Jenkins instance.

  1. Create an Azure Service Principal through Azure CLI or Azure portal.
  2. Open Jenkins dashboard, go to Credentials, add a new Microsoft Azure Service Principal with the credential information you just created.

Then create a Function in Azure portal or through Azure CLI.

Deploy

You can deploy your project to Azure Function by uploading your build artifacts using Git or FTP.

  1. Create a new freestyle project in Jenkins, add necessary build steps to build your code.
  2. Add a post-build action 'Publish an Azure Function'.
  3. Select your Azure credential in Azure Profile Configuration section.
  4. In App Configuration section, choose the resource group and function app in your subscription, and also fill in the files you want to deploy (for example, a jar package if you're using Java).
  5. There are two optional parameters Source Directory and Target Directory that allows you to specify source and target folders when uploading files.
  6. Save the project and build it, your function app will be deployed to Azure when build is completed.

Deploy using Pipeline

You can also use this plugin in pipeline (Jenkinsfile). Here are some samples to use the plugin in pipeline script:

To deploy a NodeJS function app:

azureFunctionAppPublish azureCredentialsId: '<credential_id>',
                   resourceGroup: '<resource_group_name>', appName: '<app_name>',
                   filePath: '**/*.js,**/*.json'

For advanced options, you can use Jenkins Pipeline Syntax tool to generate a sample script.

Data/Telemetry

Azure Function Plugin collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more.

You can turn off usage data collection in Manage Jenkins -> Configure System -> Azure -> Help make Azure Jenkins plugins better by sending anonymous usage statistics to Azure Application Insights.

Reporting bugs and feature requests

We use Jenkins JIRA to record all bugs and feature requests. Please follow below steps to create your own issues.

  1. Search in Jira to see if the issue was existed already.
  2. Create a new issue with the component azure-function-plugin .

You can refer to Jira doc for detailed instructions about creating an issue.

azure-function-plugin's People

Contributors

allxiao avatar archangelsdy avatar chenkennt avatar gavinfish avatar lgdoor avatar microsoftopensource avatar msftgits avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.