Skip to content

Commit 506cfa2

Browse files
ahmedmuhsinAzureFunctionsJava
andauthored
Update Java Worker Version to 2.19.1 (#822)
* Update Java Worker Version to 2.19.1 * add global.json file to prevent azdo from breaking pipeline * improve pipeline efficiency * update core tools installation process and remove test stage dependencies to increase pipeline efficiency * Revert "add global.json file to prevent azdo from breaking pipeline" This reverts commit 4457c9e. * Revert "improve pipeline efficiency" This reverts commit d3cb63b. * update core tools installation process and remove test stage dependencies to increase pipeline efficiency * add swapnil-nagar to CODEOWNERS --------- Co-authored-by: AzureFunctionsJava <[email protected]>
1 parent 7419318 commit 506cfa2

File tree

4 files changed

+21
-34
lines changed

4 files changed

+21
-34
lines changed

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
# AZURE FUNCTIONS TEAM
1010
# For all file changes, github would automatically include the following people in the PRs.
1111
#
12-
* @vrdmr @gavin-aguiar @hallvictoria @ahmedmuhsin
12+
* @vrdmr @gavin-aguiar @hallvictoria @ahmedmuhsin @swapnil-nagar

eng/ci/official-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ extends:
5151
- template: /eng/ci/templates/official/jobs/build-artifacts.yml@self
5252

5353
- stage: TestWindows
54-
dependsOn: Build
54+
dependsOn: []
5555
jobs:
5656
- template: /eng/ci/templates/jobs/run-emulated-tests-windows.yml@self
5757
parameters:
5858
poolName: 1es-pool-azfunc
5959

6060
- stage: TestLinux
61-
dependsOn: Build
61+
dependsOn: []
6262
jobs:
6363
- template: /eng/ci/templates/jobs/run-emulated-tests-linux.yml@self
6464
parameters:

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>com.microsoft.azure.functions</groupId>
44
<artifactId>azure-functions-java-worker</artifactId>
5-
<version>2.19.0</version>
5+
<version>2.19.1</version>
66
<packaging>jar</packaging>
77
<name>Azure Functions Java Worker</name>
88
<description>This package contains the Java Language Worker used by Azure functions host to execute java functions</description>
@@ -421,4 +421,4 @@
421421
</build>
422422
</profile>
423423
</profiles>
424-
</project>
424+
</project>

setup-tests-pipeline.ps1

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,31 @@
44
#
55
param
66
(
7-
[Switch]
8-
$UseCoreToolsBuildFromIntegrationTests
7+
[Switch]$UseCoreToolsBuildFromIntegrationTests
98
)
109

11-
$FUNC_RUNTIME_VERSION = '4'
12-
$arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant()
13-
$os = if ($IsWindows) { "win" } else { if ($IsMacOS) { "osx" } else { "linux" } }
10+
$FUNC_RUNTIME_VERSION = 'latest'
1411

15-
$env:CORE_TOOLS_URL = $null
16-
$coreToolsUrl = $null
17-
if ($UseCoreToolsBuildFromIntegrationTests.IsPresent)
18-
{
19-
Write-Host "Install the Core Tools for Integration Tests..."
20-
$env:CORE_TOOLS_URL = "https://functionsintegclibuilds.blob.core.windows.net/builds/$FUNC_RUNTIME_VERSION/latest/Azure.Functions.Cli.$os-$arch.zip"
21-
$coreToolsUrl = "https://functionsintegclibuilds.blob.core.windows.net/builds/$FUNC_RUNTIME_VERSION/latest"
22-
}
23-
else
24-
{
25-
Write-Host "Install the Core Tools..."
26-
$env:CORE_TOOLS_URL = "https://functionsclibuilds.blob.core.windows.net/builds/$FUNC_RUNTIME_VERSION/latest/Azure.Functions.Cli.$os-$arch.zip"
27-
$coreToolsUrl = "https://functionsclibuilds.blob.core.windows.net/builds/$FUNC_RUNTIME_VERSION/latest"
28-
}
12+
Write-Host "Installing Core Tools globlally using npm, version: $FUNC_RUNTIME_VERSION ..."
2913

3014
$FUNC_CLI_DIRECTORY = Join-Path $PSScriptRoot 'Azure.Functions.Cli'
15+
$InstallDir = $FUNC_CLI_DIRECTORY
16+
17+
# 1. Clean previous install
18+
Remove-Item -Recurse -Force $InstallDir -ErrorAction Ignore
19+
New-Item -ItemType Directory -Path $InstallDir -ErrorAction Ignore
3120

32-
Write-Host 'Deleting the Core Tools if exists...'
33-
Remove-Item -Force "$FUNC_CLI_DIRECTORY.zip" -ErrorAction Ignore
34-
Remove-Item -Recurse -Force $FUNC_CLI_DIRECTORY -ErrorAction Ignore
21+
# 2. Locate the global prefix and module root that npm just used
22+
$globalPrefix = (npm prefix -g | Out-String).Trim() # e.g. /usr/local or C:\Users\<user>\AppData\Roaming\npm
23+
$globalNode = (npm root -g | Out-String).Trim() # e.g. /usr/local/lib/node_modules
24+
$moduleRoot = Join-Path $globalNode 'azure-functions-core-tools'
3525

36-
$version = Invoke-RestMethod -Uri "$coreToolsUrl/version.txt"
37-
Write-Host "Downloading the Core Tools (Version: $version)..."
26+
# 3. npm install → temp folder
27+
npm install -g azure-functions-core-tools@$FUNC_RUNTIME_VERSION --unsafe-perm true --foreground-scripts --loglevel verbose
3828

39-
$output = "$FUNC_CLI_DIRECTORY.zip"
40-
Write-Host "Downloading the Core Tools from url: $env:CORE_TOOLS_URL"
41-
Invoke-RestMethod -Uri $env:CORE_TOOLS_URL -OutFile $output
29+
# 4. Copy CLI payload into the layout required by your tests
30+
Copy-Item "$moduleRoot\bin\*" $InstallDir -Recurse -Force
4231

43-
Write-Host 'Extracting Core Tools...'
44-
Expand-Archive $output -DestinationPath $FUNC_CLI_DIRECTORY
4532

4633
if (-not $UseCoreToolsBuildFromIntegrationTests.IsPresent)
4734
{

0 commit comments

Comments
 (0)