-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Sabrina Juarez Garcia <[email protected]>
- Loading branch information
Showing
7 changed files
with
375 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"version": "2.0", | ||
"extensionBundle": { | ||
"id": "Microsoft.Azure.Functions.ExtensionBundle", | ||
"version": "[4.*, 5.0.0)" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/AzureFunctions/services.deployment.azure-serverless.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
dependencies { | ||
genexusConfiguration ("com.genexus:gxazureserverless:${genexusVersion}") { | ||
exclude group: 'com.genexus', module: 'gxclassR' | ||
exclude group: 'com.genexus', module: 'gxwrapperjavax' | ||
exclude group: 'com.genexus', module: 'gxwrappercommon' | ||
} | ||
} |
89 changes: 89 additions & 0 deletions
89
src/Common/Azure/azurefunctions-create-Javapackage.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="CreateJavaPackage" ToolsVersion="4.0"> | ||
<PropertyGroup> | ||
<ApplicationType Condition="'$(AZURE_FUNCTIONS_TRIGGER_TYPE)' == 'http'">Web</ApplicationType> | ||
<ApplicationType Condition="'$(AZURE_FUNCTIONS_TRIGGER_TYPE)' != 'http'">Function</ApplicationType> | ||
</PropertyGroup> | ||
<Target Name="CreateJavaPackage" DependsOnTargets="PreValidate;ValidatePackaging;CreateAzureJavaPackage;ValidateResultsPackage;" Condition="'$(GENERATOR)' == 'Java'" /> | ||
|
||
<Target Name="PreValidate" Condition="'$(GENERATOR)' == 'Java'"> | ||
<Message Text="Start Create Package for $(ApplicationType)" Importance="high"/> | ||
<PropertyGroup> | ||
<!-- ApplicationType Web or Function --> | ||
<AzureTemporalDir>$(DeployFullPath)/azuredeploy</AzureTemporalDir> | ||
<ClassesDir Condition="'$(ApplicationType)' == 'Web'">$(DeployFullPath)/WEB-INF/classes</ClassesDir> | ||
<ClassesDir Condition="'$(ApplicationType)' != 'Web'">$(DeployFullPath)/classes</ClassesDir> | ||
</PropertyGroup> | ||
|
||
<Error Text="'ApplicationType' is invalid: '$(ApplicationType)'. 'Web' or 'Function' must be specified." Condition="'$(ApplicationType)' == ''"/> | ||
<Error Text="Class directory is invalid: $(ClassesDir)" Condition="!Exists('$(ClassesDir)')"/> | ||
|
||
</Target> | ||
|
||
<Target Name="CreateAzureJavaPackage" DependsOnTargets="PrepareAzurePackageJava;JavaPackageZipDeploy" Condition="'$(GENERATOR)' == 'Java'"/> | ||
|
||
<Target Name="PrepareAzurePackageJava" DependsOnTargets="GenerateConfigs" Condition="'$(GENERATOR)' == 'Java'"> | ||
<Message Text="Adding required files to the package...(this may take a while)" Importance="high"/> | ||
<ItemGroup> | ||
|
||
<MetadataFiles Include="$(DeployFullPath)/Metadata/**/*"></MetadataFiles> | ||
|
||
<ConfigFiles Include="$(DeployFullPath)/**/*.txt"/> | ||
<ConfigFiles Include="$(DeployFullPath)/**/*.key"/> | ||
<ConfigFiles Include="$(DeployFullPath)/**/*.config"/> | ||
<ConfigFiles Include="$(DeployFullPath)/**/*.cfg"/> | ||
<ConfigFiles Include="$(DeployFullPath)/**/log4j2.xml"/> | ||
<ConfigFiles Include="$(DeployFullPath)/**/*.services"/> | ||
<ConfigFiles Include="$(DeployFullPath)/**/*.gam"/> | ||
<ConfigFiles Include="$(DeployFullPath)/**/*.ini"/> | ||
<ConfigFiles Include="$(ClassesDir)/*.*"/> | ||
|
||
<GAMConfigFiles Include="$(DeployFullPath)/**/*.gam"/> | ||
</ItemGroup> | ||
|
||
<CreateItem Include="$(DeployFullPath)/**/*.jar;"> | ||
<Output TaskParameter="Include" ItemName="LibFiles"/> | ||
</CreateItem> | ||
|
||
<Copy SourceFiles="@(LibFiles)" | ||
DestinationFiles="@(LibFiles -> '$(AzureTemporalDir)/lib/%(Filename)%(Extension)')"/> | ||
|
||
<Copy SourceFiles="@(ConfigFiles)" | ||
DestinationFiles="@(ConfigFiles -> '$(AzureTemporalDir)/%(Filename)%(Extension)')"/> | ||
|
||
<Copy SourceFiles="@(GAMConfigFiles)" | ||
DestinationFiles="@(GAMConfigFiles -> '$(AzureTemporalDir)/WEB-INF/%(Filename)%(Extension)')"/> | ||
|
||
<Copy SourceFiles="@(MetadataFiles)" | ||
DestinationFolder="$(AzureTemporalDir)/Metadata/%(RecursiveDir)"/> | ||
|
||
<!--Copy application JAR to lib directory if it's not WEB --> | ||
<Copy SourceFiles="$(DeployFileFullPath)/$(ProjectName).jar" DestinationFolder="$(AzureTemporalDir)/lib" Condition ="'$(ApplicationType)' == 'Function' AND Exists('$(DeployFileFullPath)/$(ProjectName).jar')" /> | ||
|
||
<!--Copy Azure Functions handler to the root directory --> | ||
<ItemGroup> | ||
<HandlerJarFile Include="$(DeployFullPath)/gxazureserverless*.jar" /> | ||
</ItemGroup> | ||
|
||
<Copy SourceFiles="@(HandlerJarFile)" DestinationFiles="$(AzureTemporalDir)/gx-azure-serverless.jar" /> | ||
|
||
<!--Create a directory for the Azure Function --> | ||
<Copy SourceFiles="$(DeployFullPath)/function.json" DestinationFolder="$(AzureTemporalDir)/$(AZURE_FUNCTIONS_FUNCTION_NAME)" Condition ="Exists('$(DeployFullPath)/function.json') AND '$(AZURE_FUNCTIONS_FUNCTION_NAME)' != ''" /> | ||
|
||
<!-- Copy host.json file --> | ||
<Copy SourceFiles="$(GX_PROGRAM_DIR)/DeploymentTargets/AzureFunctions/Templates/Java/host.json" DestinationFolder="$(AzureTemporalDir)" /> | ||
</Target> | ||
|
||
<Target Name="ValidateResultsPackage" Condition="'$(GENERATOR)' == 'Java'"> | ||
<Error Text="Azure Functions Package could not be created" Condition="!Exists('$(DeployFileFullPath)/$(ProjectName)_$(AZURE_FUNCTIONS_FUNCTION_NAME).zip')" Importance="high"/> | ||
<Message Text="Application successfully Packaged to be uploaded to Azure : $(DeployFileFullPath)/$(ProjectName)_$(AZURE_FUNCTIONS_FUNCTION_NAME).zip" Condition="Exists('$(DeployFileFullPath)/$(ProjectName)_$(AZURE_FUNCTIONS_FUNCTION_NAME).zip')" Importance="high"/> | ||
</Target> | ||
|
||
|
||
<Target Name="JavaPackageZipDeploy" Condition="'$(GENERATOR)' == 'Java'"> | ||
<CreateItem Include="$(AzureTemporalDir)/**/*.*" > | ||
<Output ItemName="ZipFiles" TaskParameter="Include"/> | ||
</CreateItem> | ||
<Zip ZipFileName="$(DeployFileFullPath)/$(ProjectName)_$(AZURE_FUNCTIONS_FUNCTION_NAME).zip" WorkingDirectory="$(AzureTemporalDir)" Files="@(ZipFiles)" /> | ||
|
||
</Target> | ||
</Project> |
Oops, something went wrong.