test cache

This commit is contained in:
Samuele Locatelli
2021-03-29 15:02:51 +02:00
parent 5bf0010435
commit c28545e53b
+27 -12
View File
@@ -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