Skip to content

work libs removed #454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion azure-pipelines-e2e-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ steps:
AzureWebJobsEventGridOutputBindingTopicKeyString: $(AzureWebJobsEventGridOutputBindingTopicKeyString)
displayName: 'Build & Run tests for java 8'
continueOnError: false

- task: DotNetCoreCLI@2
inputs:
command: 'test'
Expand Down
289 changes: 147 additions & 142 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,158 +2,163 @@
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:

pool:
vmImage: 'windows-2019'

trigger:
tags:
include:
- '*'
branches:
include:
- dev
- master
- v4
- v3.x
- release/3.x
- release/main
pr:
branches:
include:
- dev
- v4
- v3.x
- release/3.x
- release/main


jobs:
- job: "Build_And_Test_Java_Worker_Windows"
pool:
vmImage: 'windows-2019'

steps:
- task: NuGetToolInstaller@1
inputs:
checkLatest: true
- pwsh: |
Get-Command mvn
displayName: 'Check Maven is installed'
- pwsh: |
$buildNumber = 0
if($env:APPVEYOR_REPO_TAG -eq "true") {
$buildNumber = $(Build.SourceBranchName)
Write-Host "Found git tag."
}
else {
$buildNumber = "1.8.2-$(Build.BuildId)"
Write-Host "git tag not found. Setting package suffix to '$buildNumber'"
}
.\package-pipeline.ps1 -buildNumber $buildNumber
displayName: 'Executing build script'
- task: CopyFiles@2
inputs:
SourceFolder: '$(Build.Repository.LocalPath)/pkg'
Contents: '*.nupkg'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
CleanTargetFolder: true
displayName: 'Copying files for artifacts'
- pwsh: |
.\setup-tests-pipeline.ps1
displayName: 'Setup test environment -- Install the Core Tools'
variables:
${{ if contains(variables['Build.SourceBranch'], '/tags/' ) }}:
isTagTemp: true
isTag: $[variables.isTagTemp]

- pwsh: |
$currDir = Get-Location
$Env:Path = $Env:Path+";$currDir\Azure.Functions.Cli"
ls $currDir\Azure.Functions.Cli
func --version
cd ./endtoendtests
mvn clean package `-Dmaven`.javadoc`.skip=true `-Dmaven`.test`.skip `-Dorg`.slf4j`.simpleLogger`.log`.org`.apache`.maven`.cli`.transfer`.Slf4jMavenTransferListener=warn `-B
Copy-Item "confluent_cloud_cacert.pem" ".\target\azure-functions\azure-functions-java-endtoendtests"
displayName: 'Package Java for E2E'
- task: DotNetCoreCLI@2
inputs:
command: 'test'
projects: |
endtoendtests\Azure.Functions.Java.Tests.E2E\Azure.Functions.Java.Tests.E2E\Azure.Functions.Java.Tests.E2E.csproj
env:
AzureWebJobsStorage: $(AzureWebJobsStorage)
AzureWebJobsCosmosDBConnectionString: $(AzureWebJobsCosmosDBConnectionString)
AzureWebJobsServiceBus: $(AzureWebJobsServiceBus)
AzureWebJobsEventHubReceiver: $(AzureWebJobsEventHubReceiver)
AzureWebJobsEventHubSender_2: $(AzureWebJobsEventHubSender_2)
AzureWebJobsEventHubSender: $(AzureWebJobsEventHubSender)
AzureWebJobsEventHubPath: $(AzureWebJobsEventHubPath)
SBTopicName: $(SBTopicName)
SBTopicSubName: $(SBTopicSubName)
CosmosDBDatabaseName: $(CosmosDBDatabaseName)
SBQueueName: $(SBQueueName)
BrokerList": $(BrokerList)
ConfluentCloudUsername: $(ConfluentCloudUsername)
ConfluentCloudPassword: $(ConfluentCloudPassword)
AzureWebJobsEventGridOutputBindingTopicUriString: $(AzureWebJobsEventGridOutputBindingTopicUriString)
AzureWebJobsEventGridOutputBindingTopicKeyString: $(AzureWebJobsEventGridOutputBindingTopicKeyString)
displayName: 'Build & Run tests for java 8'
continueOnError: false
steps:
- task: NuGetToolInstaller@1
inputs:
checkLatest: true
- pwsh: |
Get-Command mvn
displayName: 'Check Maven is installed'
- pwsh: |
if ("$(isTag)"){
$buildNumber="$(Build.SourceBranchName)"
Write-Host "Found git tag."
}
else {
$buildNumber="1.8.2-$(Build.BuildNumber)"
Write-Host "git tag not found. Setting package suffix to '$buildNumber'"
}
.\package-pipeline.ps1 -buildNumber $buildNumber
displayName: 'Executing build script'
- task: CopyFiles@2
inputs:
SourceFolder: '$(Build.Repository.LocalPath)/pkg'
Contents: '*.nupkg'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
CleanTargetFolder: true
displayName: 'Copying files for artifacts'
- pwsh: |
.\setup-tests-pipeline.ps1
displayName: 'Setup test environment -- Install the Core Tools'
- pwsh: |
$currDir = Get-Location
$Env:Path = $Env:Path+";$currDir\Azure.Functions.Cli"
ls $currDir\Azure.Functions.Cli
func --version
cd ./endtoendtests
mvn clean package `-Dmaven`.javadoc`.skip=true `-Dmaven`.test`.skip `-Dorg`.slf4j`.simpleLogger`.log`.org`.apache`.maven`.cli`.transfer`.Slf4jMavenTransferListener=warn `-B
Copy-Item "confluent_cloud_cacert.pem" ".\target\azure-functions\azure-functions-java-endtoendtests"
displayName: 'Package Java for E2E'
- task: DotNetCoreCLI@2
inputs:
command: 'test'
projects: |
endtoendtests\Azure.Functions.Java.Tests.E2E\Azure.Functions.Java.Tests.E2E\Azure.Functions.Java.Tests.E2E.csproj
env:
AzureWebJobsStorage: $(AzureWebJobsStorage)
AzureWebJobsCosmosDBConnectionString: $(AzureWebJobsCosmosDBConnectionString)
AzureWebJobsServiceBus: $(AzureWebJobsServiceBus)
AzureWebJobsEventHubReceiver: $(AzureWebJobsEventHubReceiver)
AzureWebJobsEventHubSender_2: $(AzureWebJobsEventHubSender_2)
AzureWebJobsEventHubSender: $(AzureWebJobsEventHubSender)
AzureWebJobsEventHubPath: $(AzureWebJobsEventHubPath)
SBTopicName: $(SBTopicName)
SBTopicSubName: $(SBTopicSubName)
CosmosDBDatabaseName: $(CosmosDBDatabaseName)
SBQueueName: $(SBQueueName)
BrokerList": $(BrokerList)
ConfluentCloudUsername: $(ConfluentCloudUsername)
ConfluentCloudPassword: $(ConfluentCloudPassword)
AzureWebJobsEventGridOutputBindingTopicUriString: $(AzureWebJobsEventGridOutputBindingTopicUriString)
AzureWebJobsEventGridOutputBindingTopicKeyString: $(AzureWebJobsEventGridOutputBindingTopicKeyString)
displayName: 'Build & Run tests for java 8'
continueOnError: false

- task: DotNetCoreCLI@2
inputs:
command: 'test'
projects: |
endtoendtests\Azure.Functions.Java.Tests.E2E\Azure.Functions.Java.Tests.E2E\Azure.Functions.Java.Tests.E2E.csproj
env:
FUNCTIONS_WORKER_JAVA_LOAD_APP_LIBS: 'True'
AzureWebJobsStorage: $(AzureWebJobsStorage)
AzureWebJobsCosmosDBConnectionString: $(AzureWebJobsCosmosDBConnectionString)
AzureWebJobsServiceBus: $(AzureWebJobsServiceBus)
AzureWebJobsEventHubSender_2: $(AzureWebJobsEventHubSender_2)
AzureWebJobsEventHubReceiver: $(AzureWebJobsEventHubReceiver)
AzureWebJobsEventHubSender: $(AzureWebJobsEventHubSender)
AzureWebJobsEventHubPath: $(AzureWebJobsEventHubPath)
SBTopicName: $(SBTopicName)
SBTopicSubName: $(SBTopicSubName)
CosmosDBDatabaseName: $(CosmosDBDatabaseName)
SBQueueName: $(SBQueueName)
BrokerList": $(BrokerList)
ConfluentCloudUsername: $(ConfluentCloudUsername)
ConfluentCloudPassword: $(ConfluentCloudPassword)
AzureWebJobsEventGridOutputBindingTopicUriString: $(AzureWebJobsEventGridOutputBindingTopicUriString)
AzureWebJobsEventGridOutputBindingTopicKeyString: $(AzureWebJobsEventGridOutputBindingTopicKeyString)
displayName: 'Build & Run tests for java 8 Customer jar loaded first'
continueOnError: false
- pwsh: |
$JAVA_VERSION="zulu11.33.15-ca-jdk11.0.4-win_x64"
Invoke-WebRequest "https://cdn.azul.com/zulu/bin/$JAVA_VERSION.zip" -O "$JAVA_VERSION.zip"
Expand-Archive -Force "$JAVA_VERSION.zip" .
cd $JAVA_VERSION
$current = get-location | select -ExpandProperty Path
cd ..
Write-Host "##vso[task.setvariable variable=Java11Home;]$current"
displayName: 'Setup Java 11 SDK'
continueOnError: false
- task: DotNetCoreCLI@2
inputs:
command: 'test'
projects: |
endtoendtests\Azure.Functions.Java.Tests.E2E\Azure.Functions.Java.Tests.E2E\Azure.Functions.Java.Tests.E2E.csproj
env:
FUNCTIONS_WORKER_JAVA_LOAD_APP_LIBS: 'True'
AzureWebJobsStorage: $(AzureWebJobsStorage)
AzureWebJobsCosmosDBConnectionString: $(AzureWebJobsCosmosDBConnectionString)
AzureWebJobsServiceBus: $(AzureWebJobsServiceBus)
AzureWebJobsEventHubSender_2: $(AzureWebJobsEventHubSender_2)
AzureWebJobsEventHubReceiver: $(AzureWebJobsEventHubReceiver)
AzureWebJobsEventHubSender: $(AzureWebJobsEventHubSender)
AzureWebJobsEventHubPath: $(AzureWebJobsEventHubPath)
SBTopicName: $(SBTopicName)
SBTopicSubName: $(SBTopicSubName)
CosmosDBDatabaseName: $(CosmosDBDatabaseName)
SBQueueName: $(SBQueueName)
BrokerList": $(BrokerList)
ConfluentCloudUsername: $(ConfluentCloudUsername)
ConfluentCloudPassword: $(ConfluentCloudPassword)
AzureWebJobsEventGridOutputBindingTopicUriString: $(AzureWebJobsEventGridOutputBindingTopicUriString)
AzureWebJobsEventGridOutputBindingTopicKeyString: $(AzureWebJobsEventGridOutputBindingTopicKeyString)
displayName: 'Build & Run tests for java 8 Customer jar loaded first'
continueOnError: false

- task: DotNetCoreCLI@2
inputs:
command: 'test'
projects: |
endtoendtests\Azure.Functions.Java.Tests.E2E\Azure.Functions.Java.Tests.E2E\Azure.Functions.Java.Tests.E2E.csproj
env:
JAVA_HOME: $(Java11Home)
AzureWebJobsStorage: $(AzureWebJobsStorage)
AzureWebJobsCosmosDBConnectionString: $(AzureWebJobsCosmosDBConnectionString)
AzureWebJobsServiceBus: $(AzureWebJobsServiceBus)
AzureWebJobsEventHubSender_2: $(AzureWebJobsEventHubSender_2)
AzureWebJobsEventHubReceiver: $(AzureWebJobsEventHubReceiver)
AzureWebJobsEventHubSender: $(AzureWebJobsEventHubSender)
AzureWebJobsEventHubPath: $(AzureWebJobsEventHubPath)
SBTopicName: $(SBTopicName)
SBTopicSubName: $(SBTopicSubName)
CosmosDBDatabaseName: $(CosmosDBDatabaseName)
SBQueueName: $(SBQueueName)
BrokerList": $(BrokerList)
ConfluentCloudUsername: $(ConfluentCloudUsername)
ConfluentCloudPassword: $(ConfluentCloudPassword)
AzureWebJobsEventGridOutputBindingTopicUriString: $(AzureWebJobsEventGridOutputBindingTopicUriString)
AzureWebJobsEventGridOutputBindingTopicKeyString: $(AzureWebJobsEventGridOutputBindingTopicKeyString)
displayName: 'Build & Run tests for java 11'
continueOnError: false
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
displayName: 'Publishing build artifacts'
- pwsh: |
$JAVA_VERSION="zulu11.33.15-ca-jdk11.0.4-win_x64"
Invoke-WebRequest "https://cdn.azul.com/zulu/bin/$JAVA_VERSION.zip" -O "$JAVA_VERSION.zip"
Expand-Archive -Force "$JAVA_VERSION.zip" .
cd $JAVA_VERSION
$current = get-location | select -ExpandProperty Path
cd ..
Write-Host "##vso[task.setvariable variable=Java11Home;]$current"
displayName: 'Setup Java 11 SDK'
continueOnError: false

- task: NuGetCommand@2
condition: eq(variables['UPLOADPACKAGETOPRERELEASEFEED'], 'True')
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: 'e6a70c92-4128-439f-8012-382fe78d6396/f37f760c-aebd-443e-9714-ce725cd427df'
allowPackageConflicts: true
displayName: 'Push NuGet package to the AzureFunctionsPreRelease feed'
- task: DotNetCoreCLI@2
inputs:
command: 'test'
projects: |
endtoendtests\Azure.Functions.Java.Tests.E2E\Azure.Functions.Java.Tests.E2E\Azure.Functions.Java.Tests.E2E.csproj
env:
JAVA_HOME: $(Java11Home)
AzureWebJobsStorage: $(AzureWebJobsStorage)
AzureWebJobsCosmosDBConnectionString: $(AzureWebJobsCosmosDBConnectionString)
AzureWebJobsServiceBus: $(AzureWebJobsServiceBus)
AzureWebJobsEventHubSender_2: $(AzureWebJobsEventHubSender_2)
AzureWebJobsEventHubReceiver: $(AzureWebJobsEventHubReceiver)
AzureWebJobsEventHubSender: $(AzureWebJobsEventHubSender)
AzureWebJobsEventHubPath: $(AzureWebJobsEventHubPath)
SBTopicName: $(SBTopicName)
SBTopicSubName: $(SBTopicSubName)
CosmosDBDatabaseName: $(CosmosDBDatabaseName)
SBQueueName: $(SBQueueName)
BrokerList": $(BrokerList)
ConfluentCloudUsername: $(ConfluentCloudUsername)
ConfluentCloudPassword: $(ConfluentCloudPassword)
AzureWebJobsEventGridOutputBindingTopicUriString: $(AzureWebJobsEventGridOutputBindingTopicUriString)
AzureWebJobsEventGridOutputBindingTopicKeyString: $(AzureWebJobsEventGridOutputBindingTopicKeyString)
displayName: 'Build & Run tests for java 11'
continueOnError: false
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
displayName: 'Publishing build artifacts'
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,9 @@ public async Task HttpTrigger_ReturnsCustomCode()
[Fact]
public async Task HttpTriggerJavaClassLoader()
{
// The e2e project has newer jars than the one we use in the worker.
// The purpose of this test will be called for three scenarios:
// 1. Java 11 -- Client code takes presence. -- works fine.
// 2. Java 8 with no Application settings, worker lib jars takes presence -- throw exception
// 3. Java 8 with with Application settings, worker lib jars takes presence -- works fine.

String value = Environment.GetEnvironmentVariable("FUNCTIONS_WORKER_JAVA_LOAD_APP_LIBS");
String java_home = Environment.GetEnvironmentVariable("JAVA_HOME");
if (java_home.Contains("zulu11") || (value != null && value.ToLower().Equals("true")))
{
Assert.True(await Utilities.InvokeHttpTrigger("HttpTriggerJavaClassLoader", "?&name=Test", HttpStatusCode.OK, "Test"));
}
else
{
Assert.True(await Utilities.InvokeHttpTrigger("HttpTriggerJavaClassLoader", "?&name=Test", HttpStatusCode.InternalServerError, ""));
}

Assert.True(await Utilities.InvokeHttpTrigger("HttpTriggerJavaClassLoader", "?&name=Test", HttpStatusCode.OK, "Test"));

}
}
}
Binary file not shown.
Binary file removed lib_worker_1.6.2/annotations-4.1.1.4.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/checker-qual-2.5.2.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/commons-cli-1.4.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/commons-lang3-3.9.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/error_prone_annotations-2.3.2.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/grpc-context-1.20.0.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/grpc-core-1.20.0.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/grpc-netty-1.20.0.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/grpc-protobuf-1.20.0.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/grpc-protobuf-lite-1.20.0.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/grpc-stub-1.20.0.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/gson-2.8.5.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/guava-26.0-jre.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/j2objc-annotations-1.1.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/javax.annotation-api-1.3.2.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/jna-5.3.0.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/jna-platform-5.3.0.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/jsr305-3.0.2.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/netty-buffer-4.1.34.Final.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/netty-codec-4.1.34.Final.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed lib_worker_1.6.2/netty-common-4.1.34.Final.jar
Binary file not shown.
Binary file removed lib_worker_1.6.2/netty-handler-4.1.30.Final.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed lib_worker_1.6.2/opencensus-api-0.19.2.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed lib_worker_1.6.2/protobuf-java-3.7.1.jar
Binary file not shown.
Loading