Skip to content
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

Java environment variable for Entry Point Azure functions #127

Merged
merged 1 commit into from
Jan 9, 2025
Merged
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
12 changes: 7 additions & 5 deletions src/AzureFunctions/deploy.msbuild
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@

<Target Name="InitializeMappingVars" Inputs="@(SelectedObject)" Outputs="%(SelectedObject.Identity)" >
<PropertyGroup>
<EntryPointClassName Condition="'$(GENERATOR)' == 'Java'">$(Namespace).%(SelectedObject.QualifiedName)</EntryPointClassName>

<EntryPointClassName Condition = "'$(GENERATOR)' == 'Java' AND '%(SelectedObject.Module)' != '' AND $(Namespace) != ''">$(Namespace).%(SelectedObject.Module).a%(SelectedObject.Identity)</EntryPointClassName>
<EntryPointClassName Condition = "'$(GENERATOR)' == 'Java' AND '%(SelectedObject.Module)' == '' AND $(Namespace) != ''">$(Namespace).a%(SelectedObject.Identity)</EntryPointClassName>
<EntryPointClassName Condition = "'$(GENERATOR)' == 'Java' AND '%(SelectedObject.Module)' != '' AND $(Namespace) == ''">%(SelectedObject.Module).a%(SelectedObject.Identity)</EntryPointClassName>
<EntryPointClassName Condition = "'$(GENERATOR)' == 'Java' AND '%(SelectedObject.Module)' == '' AND $(Namespace) == ''">a%(SelectedObject.Identity)</EntryPointClassName>

<EntryPointClassName Condition = "('$(GENERATOR)' == '.NET Core' or '$(GENERATOR)' == '.NET') AND '%(SelectedObject.Module)' != ''">%(SelectedObject.Module).a%(SelectedObject.Identity)</EntryPointClassName>
<EntryPointClassName Condition = "('$(GENERATOR)' == '.NET Core' or '$(GENERATOR)' == '.NET') AND '%(SelectedObject.Module)' == ''">a%(SelectedObject.Identity)</EntryPointClassName>
<EntryPointClassName>$(EntryPointClassName.ToLower())</EntryPointClassName>

<UpperFunctionName>$(AZURE_FUNCTIONS_FUNCTION_NAME.ToUpperInvariant())</UpperFunctionName>
<EnvVarName>GX_AZURE_$(UpperFunctionName)_CLASS</EnvVarName>
</PropertyGroup>
Expand Down Expand Up @@ -77,10 +83,6 @@
<Output TaskParameter="ExitCode" PropertyName="PUSHQUEUESETTINGS_EXIT_CODE"/>
</Exec>

<Exec Command="az functionapp config appsettings set --name $(AZURE_FUNCTIONS_FUNCTION_APP) --resource-group $(AZURE_FUNCTIONS_RESOURCE_GROUP) --settings &quot;queue_name=$(AZURE_FUNCTIONS_QUEUE_NAME)&quot;" EchoOff="true" ContinueOnError="true" Condition="'$(AZURE_FUNCTIONS_TRIGGER_TYPE)' == 'Queue' AND '$(AZURE_FUNCTIONS_QUEUE_NAME)' != '' AND '$(GENERATOR)' == 'Java' AND '$(SuccessfullOperation)' == 'true'">
<Output TaskParameter="ExitCode" PropertyName="PUSHQUEUEJAVASETTINGS_EXIT_CODE"/>
</Exec>

<!-- Service Bus -->
<Exec Command="az functionapp config appsettings set --name $(AZURE_FUNCTIONS_FUNCTION_APP) --resource-group $(AZURE_FUNCTIONS_RESOURCE_GROUP) --settings &quot;$(AZURE_FUNCTIONS_SERVICEBUS_CONNECTION)=$(AZURE_FUNCTIONS_SERVICEBUS_CONNECTION_APPSETTINGVALUE)&quot;" EchoOff="true" ContinueOnError="true" Condition="'$(AZURE_FUNCTIONS_TRIGGER_TYPE)' == 'servicebus' AND '$(AZURE_FUNCTIONS_SERVICEBUS_CONNECTION)' != '' AND '$(AZURE_FUNCTIONS_SERVICEBUS_CONNECTION_APPSETTINGVALUE)' != '' AND '$(SuccessfullOperation)' == 'true'">
<Output TaskParameter="ExitCode" PropertyName="PUSHSBSETTINGS_EXIT_CODE"/>
Expand Down
Loading