Extension bundles provide a way for non-.NET function apps to reference and use Azure Function extension packages written in C#. It bundles several of the Azure Function extensions into a single package which can then be referenced extension via the host.json
file. Below is a sample configuration:
{ "version": "2.0", "extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle", "version": "[4.*, 5.0.0)" } }Branch Status main Local Build and Packaging
Before building locally, you need to obtain the latest template artifacts and place them in the templatesArtifacts
directory at the repository root.
Required template files (example versions):
ExtensionBundle.Preview.v3.Templates.3.0.5130.zip
ExtensionBundle.Preview.v4.Templates.4.0.5130.zip
ExtensionBundle.v1.Templates.1.0.5130.zip
ExtensionBundle.v2.Templates.1.0.5130.zip
ExtensionBundle.v3.Templates.1.0.5130.zip
ExtensionBundle.v4.Templates.1.0.5130.zip
How to obtain template artifacts:
# Set environment variables $env:BUILD_REPOSITORY_LOCALPATH = "<ExtensionBundleRepoPath>" $env:TEMPLATES_ARTIFACTS_DIRECTORY = "templatesArtifacts" # Navigate to build directory and run cd build dotnet run skip:GenerateVulnerabilityReport,PackageNetCoreV3BundlesLinux,CreateCDNStoragePackageLinux,BuildBundleBinariesForLinux
# Set environment variables export BUILD_REPOSITORY_LOCALPATH="<ExtensionBundleRepoPath>" export TEMPLATES_ARTIFACTS_DIRECTORY="templatesArtifacts" # Navigate to build directory and run cd build dotnet run skip:GenerateVulnerabilityReport,PackageNetCoreV3BundlesWindows,CreateRUPackage,CreateCDNStoragePackage,CreateCDNStoragePackageWindows,BuildBundleBinariesForWindows
Note: Replace <ExtensionBundleRepoPath>
with the actual path to your extension bundle repository.
Identify the bundle version you want to update and checkout the corresponding branch
Add the following details to extensions.json file
{ "id": "Microsoft.Azure.WebJobs.Extensions.Kafka", // Nuget package id for the extension "majorVersion": "3", // Major version of the extension "name": "Kafka", // This should match the name proprerty from bin/extensions.json in the generated output // Easiest way to find out this is to perform the following steps. // 1. Install the extension package to pre-compiled function app // 2. Build the function app // 3. Look at the bin/extension.json file in the output "bindings": [ // binding attributes supported by the extension. "kafkatrigger", "kafka" ] }
Build and test the extension bundle
To add a change or fix an issue that spans across multiple branches, try submitting the same set of commit hashes using cherry-pick
in a pull request.
Follow the steps mentioned at the link below to add a template to extension bundle.
Also follow the steps mentioned at the link below to test templates added to extension bundle
build/Build.sln
file in Visual Studiodotnet run
, i.e. "skip:XXX,YYY,..."
)build
directoryartifacts\Microsoft.Azure.Functions.ExtensionBundle.{version}_any-any.zip
file.func init . --worker-runtime node
func GetExtensionBundlePath
to find the path to the bundle being used.
%userprofile%\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle\2.8.4
For comprehensive testing including Preview bundles and integration scenarios, see the emulator test framework at:
tests/emulator_tests/README.md
tests/emulator_tests/
The emulator tests run automatically in CI for all PR builds and main branch builds, providing:
bundleConfig.json
The project uses Azure DevOps pipelines with multiple stages:
RunUnitTests
stage): Runs .NET unit testsBuild
stage): Builds extension bundles for multiple platformsEmulatorTests
stage): Runs Python-based emulator tests on LinuxPipeline Configuration:
eng/public-build.yml
- Runs for PRs and main brancheng/official-build.yml
- Runs for internal build/testeng/ci/templates/jobs/emulator-tests.yml
Emulator Test CI Features:
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4