Skip to content

Commit

Permalink
Java environment variable for Entry Point Azure functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabrina Juarez Garcia committed Jan 9, 2025
1 parent ed5c548 commit dbb5326
Showing 1 changed file with 7 additions and 5 deletions.
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

0 comments on commit dbb5326

Please sign in to comment.