From c28545e53b2ada0e4580e2e101438f196c4fad30 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 29 Mar 2021 15:02:51 +0200 Subject: [PATCH] test cache --- .gitlab-ci.yml | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7c6fa66..491b342 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,8 +4,7 @@ variables: ASPNET_MERGE_PATH: 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools' EXE_RELEASE_FOLDER: 'c:\Projetcs\Compiled\GPW\Release' DEPLOY_FOLDER: 'c:\Projects\Deploy\GPW\Builds' - VERS_MAIN: '2.7' - # VERS_NUMBER: '$VERS_MAIN.2103.$CI_PIPELINE_IID' + VERS_MAIN: '2.8' # EXE_RELEASE_FOLDER: 'YourApp\bin\Release' # MSI_RELEASE_FOLDER: 'Setup\bin\Release' # TEST_FOLDER: 'Tests\bin\Release' @@ -50,23 +49,20 @@ stages: - build - deploy + admin:build: stage: build before_script: - *nuget-fix - # path alla solution corrente - - '& "$env:NUGET_PATH" restore GPW.sln' + - '& "$env:NUGET_PATH" restore GPW.sln' # path alla solution corrente - *version-fix script: - '& "$env:MSBUILD_PATH" GPW_Admin/GPW_Admin.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /p:verbosity=Minimal /m' -# 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_Admin\' # saving entire Test project so NUnit can run tests -# - '$env:DEPLOY_FOLDER\GPW_Admin\' # saving entire Test project so NUnit can run tests + cache: + #key: ${CI_COMMIT_REF_SLUG} + key: ${CI_JOB_NAME} + paths: + - packages/ bcode:build: stage: build @@ -76,6 +72,11 @@ 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} + paths: + - packages/ # artifacts: # expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on @@ -113,10 +114,17 @@ admin: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_Admin/GPW_Admin.csproj' + cache: + #key: ${CI_COMMIT_REF_SLUG} + key: ${CI_JOB_NAME} + paths: + - packages/ needs: ["admin:build"] dependencies: - admin:build # - test_job + when: + manual bcode:deploy: stage: deploy @@ -126,8 +134,15 @@ 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} + paths: + - packages/ needs: ["bcode:build"] dependencies: - bcode:build # - test_job + when: + manual \ No newline at end of file