From be3ca82e482a2dba8140a803f68a5040f73196f1 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 5 Jan 2022 11:45:13 +0100 Subject: [PATCH] inizio modifica yaml x CI-CD versione CORE --- .gitlab-ci.yml | 57 +++++++++++++++++--------------------------------- 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 625f646..fb824f9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,20 +58,6 @@ AC:build: - '& "$env:MSBUILD_PATH" GPW_Admin/GPW_Admin.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m' - '& "$env:MSBUILD_PATH" GPW_Commesse/GPW_Commesse.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /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 BHS:build: stage: build @@ -85,22 +71,16 @@ BHS:build: - '& "$env:MSBUILD_PATH" GPW_Barcode/GPW_Barcode.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m' - '& "$env:MSBUILD_PATH" HOME/HOME.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m' - '& "$env:MSBUILD_PATH" GPW_Smart/GPW_Smart.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m' - - -# test_job: -# stage: test -# only: -# - tags -# script: -# - '& "$env:NUNIT_PATH" ".\$env:TEST_FOLDER\Tests.dll"' # running NUnit tests -# artifacts: -# when: always # save test results even when the task fails -# expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on -# paths: -# - '.\TestResult.xml' # saving NUnit results to copy to deploy folder -# dependencies: -# - build_job +CORE.WLOG:build: + stage: build + tags: + - win + before_script: + - *nuget-fix + - dotnet restore GPW.CORE.UI.sln + script: + - dotnet build GPW.CORE.UI/GPW.CORE.UI.csproj AC:staging: stage: staging @@ -115,16 +95,7 @@ AC:staging: script: - '& "$env:MSBUILD_PATH" /p:m=8 /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/ /verbosity:minimal GPW_Admin/GPW_Admin.csproj' - '& "$env:MSBUILD_PATH" /p:m=8 /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/ /verbosity:minimal GPW_Commesse/GPW_Commesse.csproj' -# cache: -# #key: ${CI_COMMIT_REF_SLUG} -# # key: ${CI_JOB_NAME} -# key: GPW-pack -# paths: -# - packages/ -# policy: pull needs: ["AC:build"] -# when: -# manual BHS:staging: stage: staging @@ -142,6 +113,16 @@ BHS:staging: - '& "$env:MSBUILD_PATH" /p:m=8 /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/ /verbosity:minimal GPW_Smart/GPW_Smart.csproj' needs: ["BHS:build"] +CORE.WLOG:staging: + stage: staging + tags: + - win + only: + - develop + needs: ["CORE.WLOG:build"] + script: + - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true GPW.CORE.UI/GPW.CORE.UI.csproj + AC:deploy: stage: deploy