From ed03e716d1a6dfb81037d7efca1cd5ae3331c75a Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 30 Mar 2021 12:31:52 +0200 Subject: [PATCH] completato update yaml --- .gitlab-ci.yml | 168 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 131 insertions(+), 37 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d69822b..ca3d5bb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -65,6 +65,14 @@ admin:build: # key: GPW-pack # paths: # - packages/ +# artifacts: +# expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on +# paths: +# # - '$env:EXE_RELEASE_FOLDER\YourApp.exe' # saving exe to copy to deploy folder +# # - '$env:MSI_RELEASE_FOLDER\YourApp Setup.msi' # saving msi to copy to deploy folder +# # - '$env:TEST_FOLDER\' # saving entire Test project so NUnit can run tests +# - '$env:EXE_RELEASE_FOLDER\GPW_Barcode\' # saving entire Test project so NUnit can run tests +# - '$env:DEPLOY_FOLDER\GPW_Barcode\' # saving entire Test project so NUnit can run tests bcode:build: stage: build @@ -74,21 +82,36 @@ bcode:build: - *version-fix script: - '& "$env:MSBUILD_PATH" GPW_Barcode/GPW_Barcode.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /p:verbosity=Minimal /m' -# cache: -# #key: ${CI_COMMIT_REF_SLUG} -# # key: ${CI_JOB_NAME} -# key: GPW-pack -# paths: -# - packages/ -# artifacts: -# expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on -# paths: -# # - '$env:EXE_RELEASE_FOLDER\YourApp.exe' # saving exe to copy to deploy folder -# # - '$env:MSI_RELEASE_FOLDER\YourApp Setup.msi' # saving msi to copy to deploy folder -# # - '$env:TEST_FOLDER\' # saving entire Test project so NUnit can run tests -# - '$env:EXE_RELEASE_FOLDER\GPW_Barcode\' # saving entire Test project so NUnit can run tests -# - '$env:DEPLOY_FOLDER\GPW_Barcode\' # saving entire Test project so NUnit can run tests +commesse:build: + stage: build + before_script: + - *nuget-fix + - '& "$env:NUGET_PATH" restore GPW.sln' + - *version-fix + script: + - '& "$env:MSBUILD_PATH" GPW_Commesse/GPW_Commesse.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /p:verbosity=Minimal /m' + +home:build: + stage: build + before_script: + - *nuget-fix + - '& "$env:NUGET_PATH" restore GPW.sln' + - *version-fix + script: + - '& "$env:MSBUILD_PATH" HOME/HOME.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /p:verbosity=Minimal /m' + +smart:build: + stage: build + before_script: + - *nuget-fix + - '& "$env:NUGET_PATH" restore GPW.sln' + - *version-fix + script: + - '& "$env:MSBUILD_PATH" GPW_Smart/GPW_Smart.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /p:verbosity=Minimal /m' + + + # test_job: # stage: test @@ -131,8 +154,6 @@ admin:deploy: # when: # manual - - bcode:deploy: stage: deploy before_script: @@ -141,19 +162,50 @@ bcode:deploy: - *version-fix script: - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:verbosity=Minimal GPW_Barcode/GPW_Barcode.csproj' -# cache: -# #key: ${CI_COMMIT_REF_SLUG} -# # key: ${CI_JOB_NAME} -# key: GPW-pack -# paths: -# - packages/ -# policy: pull + needs: ["bcode:build"] dependencies: - bcode:build - # - test_job -# when: -# manual + +commesse:deploy: + stage: deploy + before_script: + - *nuget-fix + - '& "$env:NUGET_PATH" restore GPW.sln' + - *version-fix + script: + - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:verbosity=Minimal GPW_Commesse/GPW_Commesse.csproj' + + needs: ["commesse:build"] + dependencies: + - bcode:build + +home:deploy: + stage: deploy + before_script: + - *nuget-fix + - '& "$env:NUGET_PATH" restore GPW.sln' + - *version-fix + script: + - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:verbosity=Minimal HOME/HOME.csproj' + + needs: ["home:build"] + dependencies: + - bcode:build + +smart:deploy: + stage: deploy + before_script: + - *nuget-fix + - '& "$env:NUGET_PATH" restore GPW.sln' + - *version-fix + script: + - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:verbosity=Minimal GPW_Smart/GPW_Smart.csproj' + + needs: ["smart:build"] + dependencies: + - bcode:build + admin:install: stage: installer @@ -192,16 +244,58 @@ bcode:install: - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IISDEV.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:verbosity=Minimal GPW_Barcode/GPW_Barcode.csproj' # ZIP package - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /T:Package /P:Configuration=SPS /p:PublishProfile=SPS.pubxml /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/SPS_PROD/$newRel/GPW_Barcode.zip /p:DeployIisAppPath=Default Web Site/GPW/ADMIN /p:PackageAsSingleFile=True /p:OutputPath=bin/ GPW_Barcode/GPW_Barcode.csproj' -# cache: -# #key: ${CI_COMMIT_REF_SLUG} -# # key: ${CI_JOB_NAME} -# key: GPW-pack -# paths: -# - packages/ -# policy: pull needs: ["bcode:build"] -# dependencies: -# - bcode:build - # - test_job when: - manual \ No newline at end of file + manual + +commesse:install: + stage: installer + before_script: + - *nuget-fix + - '& "$env:NUGET_PATH" restore GPW.sln' + - *version-fix + script: + # IIS 02 + - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS02.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:verbosity=Minimal GPW_Commesse/GPW_Commesse.csproj' + # IIS DEV + - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IISDEV.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:verbosity=Minimal GPW_Commesse/GPW_Commesse.csproj' + # ZIP package + - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /T:Package /P:Configuration=SPS /p:PublishProfile=SPS.pubxml /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/SPS_PROD/$newRel/GPW_Commesse.zip /p:DeployIisAppPath=Default Web Site/GPW/ADMIN /p:PackageAsSingleFile=True /p:OutputPath=bin/ GPW_Commesse/GPW_Commesse.csproj' + needs: ["commesse:build"] + when: + manual + +home:install: + stage: installer + before_script: + - *nuget-fix + - '& "$env:NUGET_PATH" restore GPW.sln' + - *version-fix + script: + # IIS 02 + - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS02.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:verbosity=Minimal HOME/HOME.csproj' + # IIS DEV + - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IISDEV.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:verbosity=Minimal HOME/HOME.csproj' + # ZIP package + - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /T:Package /P:Configuration=SPS /p:PublishProfile=SPS.pubxml /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/SPS_PROD/$newRel/HOME.zip /p:DeployIisAppPath=Default Web Site/GPW/ADMIN /p:PackageAsSingleFile=True /p:OutputPath=bin/ HOME/HOME.csproj' + needs: ["home:build"] + when: + manual + +smart:install: + stage: installer + before_script: + - *nuget-fix + - '& "$env:NUGET_PATH" restore GPW.sln' + - *version-fix + script: + # IIS 02 + - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS02.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:verbosity=Minimal GPW_Smart/GPW_Smart.csproj' + # IIS DEV + - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IISDEV.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:verbosity=Minimal GPW_Smart/GPW_Smart.csproj' + # ZIP package + - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /T:Package /P:Configuration=SPS /p:PublishProfile=SPS.pubxml /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/SPS_PROD/$newRel/GPW_Smart.zip /p:DeployIisAppPath=Default Web Site/GPW/ADMIN /p:PackageAsSingleFile=True /p:OutputPath=bin/ GPW_Smart/GPW_Smart.csproj' + needs: ["smart:build"] + when: + manual + \ No newline at end of file