Use custom Java 17 image for Azure Function Adapter sample

Resolves #853
This commit is contained in:
Chris Bono
2022-04-10 23:10:54 -05:00
committed by Oleg Zhurakousky
parent 16d81d7d64
commit d3c96fbb60
4 changed files with 313 additions and 89 deletions

View File

@@ -19,14 +19,18 @@
</parent>
<properties>
<functionAppName>function-sample-azure</functionAppName>
<functionAppName>spring-cloud-function-samples</functionAppName>
<functionAppRegion>westus</functionAppRegion>
<functionResourceGroup>java-function-group</functionResourceGroup>
<functionResourceGroup>java-functions-group</functionResourceGroup>
<functionAppServicePlanName>java-functions-app-service-plan</functionAppServicePlanName>
<functionDockerImageName>onobc/function-sample-azure-java17:1.0.0</functionDockerImageName>
<stagingDirectory>${project.build.directory}/azure-functions/${functionAppName}</stagingDirectory>
<start-class>example.Config</start-class>
<azure.functions.maven.plugin.version>1.12.0</azure.functions.maven.plugin.version>
<azure.functions.java.library.version>1.3.0</azure.functions.java.library.version>
<azure.functions.maven.plugin.version>1.16.0</azure.functions.maven.plugin.version>
<azure.functions.java.library.version>1.4.2</azure.functions.java.library.version>
<wrapper.version>1.0.27.RELEASE</wrapper.version>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
@@ -39,8 +43,6 @@
<artifactId>spring-cloud-starter-function-web</artifactId>
<scope>provided</scope>
</dependency>
<!-- Test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
@@ -125,6 +127,16 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-functions-maven-plugin</artifactId>
@@ -132,20 +144,19 @@
<resourceGroup>${functionResourceGroup}</resourceGroup>
<appName>${functionAppName}</appName>
<region>${functionAppRegion}</region>
<appServicePlanName>${functionAppServicePlanName}</appServicePlanName>
<pricingTier>EP1</pricingTier>
<runtime>
<os>docker</os>
<image>${functionDockerImageName}</image>
<serverId></serverId>
<registryUrl></registryUrl>
</runtime>
<appSettings>
<!-- Run Azure Function from package file by default -->
<property>
<name>WEBSITE_RUN_FROM_PACKAGE</name>
<value>1</value>
</property>
<property>
<name>FUNCTIONS_EXTENSION_VERSION</name>
<value>~2</value>
</property>
<property>
<name>FUNCTIONS_WORKER_RUNTIME</name>
<value>java</value>
</property>
<property>
<name>FUNCTIONS_EXTENSION_VERSION</name>
<value>~4</value>
</property>
</appSettings>
</configuration>
<executions>