From 26be34e948b9c127c254cc174c3a5d9cd4499910 Mon Sep 17 00:00:00 2001 From: sjuarezgx Date: Sun, 15 Dec 2024 09:31:07 -0300 Subject: [PATCH] Cross platform changes of deploy engine (#111) --------- Co-authored-by: Sabrina Juarez Garcia --- src/AWSECS/deploy.msbuild | 2 +- src/AWSLambdaFunctions/createpackage.msbuild | 2 +- src/AWSLambdaFunctions/deploy.msbuild | 4 ++-- src/AWSServerless/createpackage.msbuild | 2 +- src/AWSServerless/deploy.msbuild | 2 +- src/AzureServerless/createpackage.msbuild | 2 +- src/AzureServerless/deploy.msbuild | 4 ++-- src/Docker/deploy.msbuild | 1 + src/HCP/deploy.msbuild | 6 +++--- src/IBMCF/deploy.msbuild | 2 +- src/Local/deploy.msbuild | 2 +- src/SAPCloudFoundry/deploy.msbuild | 8 ++++---- src/StaticFrontEnd/deploy.msbuild | 2 +- src/StaticFrontEnd/deploy/docker.targets | 1 + src/StaticResources/deploy/azureblobstorage.targets | 2 +- 15 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/AWSECS/deploy.msbuild b/src/AWSECS/deploy.msbuild index a444007..eb8adef 100644 --- a/src/AWSECS/deploy.msbuild +++ b/src/AWSECS/deploy.msbuild @@ -2,7 +2,7 @@ ..\.. C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe - $([System.IO.Path]::GetFullPath('$(DEPLOY_PATH)\..\..')) + $([System.IO.Path]::GetFullPath('$(DEPLOY_PATH)/../..')) $([System.DateTime]::Now.ToString("yyyyMMddHHmm")) $(AWSECS_DOCKER_TAG_NAME).$(TIMESTAMP_APPLICATION_VERSION) diff --git a/src/AWSLambdaFunctions/createpackage.msbuild b/src/AWSLambdaFunctions/createpackage.msbuild index b39b5a0..9e5b2fb 100644 --- a/src/AWSLambdaFunctions/createpackage.msbuild +++ b/src/AWSLambdaFunctions/createpackage.msbuild @@ -1,6 +1,6 @@ - $([System.IO.Path]::GetFullPath('$(DeployFullPath)\..\..\..\..\web\$(ProjectName).gxdproj')) + $([System.IO.Path]::GetFullPath('$(DeployFullPath)/../../../../web/$(ProjectName).gxdproj')) Web Function $(DeployFullPath) diff --git a/src/AWSLambdaFunctions/deploy.msbuild b/src/AWSLambdaFunctions/deploy.msbuild index 082892f..04ce2d0 100644 --- a/src/AWSLambdaFunctions/deploy.msbuild +++ b/src/AWSLambdaFunctions/deploy.msbuild @@ -1,11 +1,11 @@ - $([System.IO.Path]::GetFullPath('$(DEPLOY_PATH)\..\$(APPLICATION_NAME)')) + $([System.IO.Path]::GetFullPath('$(DEPLOY_PATH)/../$(APPLICATION_NAME)')) $(AWSLAMBDA_ROLE_NAME) ..\AWSServerless\template\aws-iam-policy.json gx-deploy-$(AWSLAMBDA_DEFAULT_REGION)-$(AWSLAMBDA_ACCESS_KEY_ID)$(AWSLAMBDA_PROFILE_NAME) $(JAVA_PACKAGE_NAME) - $([System.IO.Path]::GetFullPath('$(DeployFullPath)\..\..\..\..\web\$(ProjectName).gxdproj')) + $([System.IO.Path]::GetFullPath('$(DeployFullPath)/../../../../web/$(ProjectName).gxdproj')) $(DEPLOY_PATH)\AWS_Lambda_Package.zip com.genexus.cloud.serverless.aws.handler handleRequest diff --git a/src/AWSServerless/createpackage.msbuild b/src/AWSServerless/createpackage.msbuild index 91d8648..4412a37 100644 --- a/src/AWSServerless/createpackage.msbuild +++ b/src/AWSServerless/createpackage.msbuild @@ -1,6 +1,6 @@ - $([System.IO.Path]::GetFullPath('$(DeployFullPath)\..\..\..\..\web\$(ProjectName).gxdproj')) + $([System.IO.Path]::GetFullPath('$(DeployFullPath)/../../../../web/$(ProjectName).gxdproj')) Web $(DeployFullPath) $(DeployFullPath)\AWS_Lambda_Package.zip diff --git a/src/AWSServerless/deploy.msbuild b/src/AWSServerless/deploy.msbuild index 0dd17a1..782b113 100644 --- a/src/AWSServerless/deploy.msbuild +++ b/src/AWSServerless/deploy.msbuild @@ -1,7 +1,7 @@ $(GX_PROGRAM_DIR)\GeneXus.AWS.targets - $([System.IO.Path]::GetFullPath('$(DeployFullPath)\..\..\..\..\web\$(ProjectName).gxdproj')) + $([System.IO.Path]::GetFullPath('$(DeployFullPath)/../../../../web/$(ProjectName).gxdproj')) $(DEPLOY_PATH)\AWS_Lambda_Package.zip $(DEPLOY_PATH)\api_gateway.swagger.json template\aws-apigateway-swagger-lambda-extension.json diff --git a/src/AzureServerless/createpackage.msbuild b/src/AzureServerless/createpackage.msbuild index 255f117..7cbbc40 100644 --- a/src/AzureServerless/createpackage.msbuild +++ b/src/AzureServerless/createpackage.msbuild @@ -1,7 +1,7 @@ - $([System.IO.Path]::GetFullPath('$(DeployFullPath)\..\..\..\..\web\$(ProjectName).gxdproj')) + $([System.IO.Path]::GetFullPath('$(DeployFullPath)/../../../../web/$(ProjectName).gxdproj')) azureblobstorage diff --git a/src/AzureServerless/deploy.msbuild b/src/AzureServerless/deploy.msbuild index 584c0c5..10b42ed 100644 --- a/src/AzureServerless/deploy.msbuild +++ b/src/AzureServerless/deploy.msbuild @@ -1,7 +1,7 @@ - $([System.IO.Path]::GetFullPath('$(DeployFullPath)\..\..\..\..\web\$(ProjectName).gxdproj')) + $([System.IO.Path]::GetFullPath('$(DeployFullPath)/../../../../web/$(ProjectName).gxdproj')) @@ -20,7 +20,7 @@ - + diff --git a/src/Docker/deploy.msbuild b/src/Docker/deploy.msbuild index dbfada8..4bde715 100644 --- a/src/Docker/deploy.msbuild +++ b/src/Docker/deploy.msbuild @@ -29,6 +29,7 @@ $([System.Text.RegularExpressions.Regex]::Replace ($(DeployDirectory), `\\$`, "")) + $([System.Text.RegularExpressions.Regex]::Replace ($(DeployDirectory), `\/$`, "")) $(DeployDirectory)\Dockerfile diff --git a/src/HCP/deploy.msbuild b/src/HCP/deploy.msbuild index bffa214..72f454e 100644 --- a/src/HCP/deploy.msbuild +++ b/src/HCP/deploy.msbuild @@ -2,14 +2,14 @@ $([System.String]::new('$(HCP_APPNAME)').ToLower()) - $([System.IO.Path]::GetFullPath('$(DEPLOY_PATH)\..\..\$(APPLICATION_NAME).war')) - $([System.IO.Path]::GetFullPath('$(DEPLOY_PATH)\..\..\$(ApplicationLowerName).war')) + $([System.IO.Path]::GetFullPath('$(DEPLOY_PATH)/../../$(APPLICATION_NAME).war')) + $([System.IO.Path]::GetFullPath('$(DEPLOY_PATH)/../../$(ApplicationLowerName).war')) - + diff --git a/src/IBMCF/deploy.msbuild b/src/IBMCF/deploy.msbuild index d55306e..2a078bf 100644 --- a/src/IBMCF/deploy.msbuild +++ b/src/IBMCF/deploy.msbuild @@ -1,7 +1,7 @@ - $([System.IO.Path]::GetFullPath('$(DEPLOY_PATH)\..\..\$(APPLICATION_NAME).war')) + $([System.IO.Path]::GetFullPath('$(DEPLOY_PATH)/../../$(APPLICATION_NAME).war')) cf api https://api.ng.bluemix.net cf login -u $(IBMCF_USER) -p $(IBMCF_PASSWORD) -o $(IBMCF_ORGANIZATION) -s $(IBMCF_SPACE) cf push $(IBMCF_APPLICATION) -b liberty-for-java -p $(SourceWar) diff --git a/src/Local/deploy.msbuild b/src/Local/deploy.msbuild index e7280fc..c25c1e2 100644 --- a/src/Local/deploy.msbuild +++ b/src/Local/deploy.msbuild @@ -1,6 +1,6 @@ - $([System.IO.Path]::GetFullPath('$(DeployFullPath)\..\..\..\..\web\$(ProjectName).gxdproj')) + $([System.IO.Path]::GetFullPath('$(DeployFullPath)/../../../../web/$(ProjectName).gxdproj')) diff --git a/src/SAPCloudFoundry/deploy.msbuild b/src/SAPCloudFoundry/deploy.msbuild index 8d3605e..5dd1671 100644 --- a/src/SAPCloudFoundry/deploy.msbuild +++ b/src/SAPCloudFoundry/deploy.msbuild @@ -3,7 +3,7 @@ $([System.String]::new('$(SAPCF_APPNAME)').ToLower()) - $([System.IO.Path]::GetFullPath('$(DEPLOY_PATH)\..\..\')) + $([System.IO.Path]::GetFullPath('$(DEPLOY_PATH)/../../')) $(DeployFileFullPath)\$(APPLICATION_NAME).war $(DeployFileFullPath)\$(ApplicationLowerName).war $(DEPLOY_PATH)\..\..\manifest.yml @@ -15,9 +15,9 @@ - - - + + + diff --git a/src/StaticFrontEnd/deploy.msbuild b/src/StaticFrontEnd/deploy.msbuild index ef3fbfe..488784a 100644 --- a/src/StaticFrontEnd/deploy.msbuild +++ b/src/StaticFrontEnd/deploy.msbuild @@ -2,7 +2,7 @@ ..\.. / - $([System.IO.Path]::GetFullPath('$(DeployFullPath)\..\..\..\..\web\$(ProjectName).gxdproj')) + $([System.IO.Path]::GetFullPath('$(DeployFullPath)/../../../../web/$(ProjectName).gxdproj')) ..\StaticFrontEnd\deploy\$(STATICFRONTEND_PROVIDER).targets diff --git a/src/StaticFrontEnd/deploy/docker.targets b/src/StaticFrontEnd/deploy/docker.targets index 6aa144a..3337caa 100644 --- a/src/StaticFrontEnd/deploy/docker.targets +++ b/src/StaticFrontEnd/deploy/docker.targets @@ -6,6 +6,7 @@ $(DeployFullPath)\context $(DeployDirectory)\Dockerfile $([System.Text.RegularExpressions.Regex]::Replace ($(DeployDirectory), `\\$`, "")) + $([System.Text.RegularExpressions.Regex]::Replace ($(DeployDirectory), `\/$`, "")) diff --git a/src/StaticResources/deploy/azureblobstorage.targets b/src/StaticResources/deploy/azureblobstorage.targets index c133a79..80ad97c 100644 --- a/src/StaticResources/deploy/azureblobstorage.targets +++ b/src/StaticResources/deploy/azureblobstorage.targets @@ -9,7 +9,7 @@