From a9805a51ddb8d00e19aca2e3ef046d2d11aae2b1 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 16 Nov 2023 15:45:49 +0100 Subject: [PATCH] prova compilazione condizionale con rule --- .gitlab-ci.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f19d74dc..386d0f43 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -197,10 +197,10 @@ TAB3:build: before_script: - *nuget-fix - dotnet restore "$env:SOL_NAME.sln" + rules: + if: ${{CF_BRANCH}} -match "$env:APP_NAME" script: - dotnet build $env:APP_NAME/$env:APP_NAME.csproj - when: - branch: 'match(${{CF_BRANCH}}, "..$env:APP_NAME.", true)' # ----- Start DEPLOY develop (IIS01) ----- @@ -350,14 +350,17 @@ TAB3:IIS01:deploy: before_script: - *nuget-fix - dotnet restore "$env:SOL_NAME.sln" - only: - - develop + rules: + if: ${{CF_BRANCH}} -match "$env:APP_NAME" + # only: + # - develop needs: ["TAB3:build"] script: - dotnet build $env:APP_NAME/$env:APP_NAME.csproj - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj - when: - branch: 'match(${{CF_BRANCH}}, "..$env:APP_NAME.", true)' + # when: + # branch: + # - ${{CF_BRANCH}} -match # ----- Start DEPLOY master (IIS02/IIS04) ----- LAND:IIS02:deploy: