Skip to content

Commit 07c6a42

Browse files
committed
pipeline workaround
1 parent 339dfd0 commit 07c6a42

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed

eng/ci/templates/jobs/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
- pwsh: |
1515
java -version
1616
displayName: 'Check default java version'
17+
- pwsh: |
18+
.\installJavaAdditions.ps1
19+
displayName: 'Install java-additions locally'
1720
- pwsh: |
1821
mvn clean package
1922
displayName: 'Build java worker'

eng/ci/templates/jobs/run-emulated-tests-linux.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ jobs:
5757
- pwsh: |
5858
java -version
5959
displayName: 'Check default java version'
60+
- pwsh: |
61+
.\installJavaAdditions.ps1
62+
displayName: 'Install java-additions locally'
6063
- pwsh: |
6164
if ("$(isTag)"){
6265
$buildNumber="$(Build.SourceBranchName)"

eng/ci/templates/jobs/run-emulated-tests-windows.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ jobs:
4747
- pwsh: |
4848
java -version
4949
displayName: 'Check default java version'
50+
- pwsh: |
51+
.\installJavaAdditions.ps1
52+
displayName: 'Install java-additions locally'
5053
- pwsh: |
5154
if ("$(isTag)"){
5255
$buildNumber="$(Build.SourceBranchName)"

installJavaAdditions.ps1

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Variables
2+
$repoUrl = 'https://github.com/ahmedmuhsin/azure-functions-java-additions.git'
3+
$branchName = 'sdk-types'
4+
$repoName = 'azure-functions-java-additions'
5+
6+
# Clone the repository
7+
git clone $repoUrl
8+
9+
# Change directory to the cloned repository
10+
Set-Location $repoName
11+
12+
# Checkout the desired branch
13+
git checkout $branchName
14+
15+
# Detect OS and execute accordingly
16+
if ($IsWindows) {
17+
# Run the batch script (mvnBuild.bat)
18+
& ".\mvnBuild.bat"
19+
} else {
20+
# Extract and explicitly invoke the mvn command from mvnBuild.bat
21+
$mvnCommand = Get-Content "./mvnBuild.bat" | Where-Object { $_ -match '^mvn\s+' }
22+
if ($null -ne $mvnCommand) {
23+
# Execute the extracted mvn command explicitly as a single line
24+
bash -c "$mvnCommand"
25+
} else {
26+
Write-Error "No mvn command found in mvnBuild.bat."
27+
}
28+
}

0 commit comments

Comments
 (0)