Merge branch 'release/RefreshApprTimbr'

This commit is contained in:
Samuele Locatelli
2022-06-27 14:14:29 +02:00
2 changed files with 74 additions and 19 deletions
+56 -15
View File
@@ -45,7 +45,7 @@ stages:
- deploy
- installer
AC:build:
ADM:build:
stage: build
tags:
- win
@@ -56,8 +56,17 @@ AC:build:
script:
- '& "$env:MSBUILD_PATH" GPW_Admin/GPW_Admin.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
COM:build:
stage: build
tags:
- win
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet' # path alla solution corrente
- *version-fix
script:
- '& "$env:MSBUILD_PATH" GPW_Commesse/GPW_Commesse.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
BH:build:
stage: build
tags:
@@ -81,7 +90,7 @@ Smart:build:
script:
- '& "$env:MSBUILD_PATH" GPW_Smart/GPW_Smart.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
AC:staging:
ADM:staging:
stage: staging
tags:
- win
@@ -93,8 +102,21 @@ AC:staging:
- *version-fix
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=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Admin/GPW_Admin.csproj'
needs: ["ADM:build"]
COM:staging:
stage: staging
tags:
- win
rules:
- if: '$CI_COMMIT_BRANCH == "develop"'
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet'
- *version-fix
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=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Commesse/GPW_Commesse.csproj'
needs: ["AC:build"]
needs: ["COM:build"]
BH:staging:
stage: staging
@@ -125,7 +147,7 @@ Smart: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=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Smart/GPW_Smart.csproj'
needs: ["Smart:build"]
AC:deploy:
ADM:deploy:
stage: deploy
tags:
- win
@@ -136,19 +158,28 @@ AC:deploy:
- '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet'
- *version-fix
script:
# ----ADMIN ----
# IIS 02
- '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS02.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Admin/GPW_Admin.csproj'
# IIS DEV
- '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS03.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Admin/GPW_Admin.csproj'
# ----Commesse ----
needs: ["ADM:build"]
COM:deploy:
stage: deploy
tags:
- win
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet'
- *version-fix
script:
# IIS 02
- '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS02.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Commesse/GPW_Commesse.csproj'
# IIS DEV
- '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS03.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Commesse/GPW_Commesse.csproj'
needs: ["AC:build"]
# when:
# manual
needs: ["COM:build"]
BH:deploy:
stage: deploy
@@ -191,15 +222,12 @@ Smart:deploy:
- '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS03.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Smart/GPW_Smart.csproj'
needs: ["Smart:build"]
AC:install:
ADM:install:
stage: installer
tags:
- win
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
# when: manual
# only:
# - tags # the build process will only be started by git tag commits
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet'
@@ -207,9 +235,22 @@ AC:install:
script:
# Admin ZIP package
- '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /T:Package /P:Configuration=SPS /p:PublishProfile=SPS.pubxml /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/SPS_PROD/$env:NEW_REL/GPW_Admin.zip /p:DeployIisAppPath="Default Web Site/GPW/ADMIN" /p:PackageAsSingleFile=True /p:OutputPath=bin/ GPW_Admin/GPW_Admin.csproj'
needs: ["ADM:build"]
COM:install:
stage: installer
tags:
- win
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet'
- *version-fix
script:
# Commesse ZIP package
- '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /T:Package /P:Configuration=SPS /p:PublishProfile=SPS.pubxml /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/SPS_PROD/$env:NEW_REL/GPW_Commesse.zip /p:DeployIisAppPath="Default Web Site/GPW/ADMIN" /p:PackageAsSingleFile=True /p:OutputPath=bin/ GPW_Commesse/GPW_Commesse.csproj'
needs: ["AC:build"]
needs: ["COM:build"]
BH:install:
stage: installer
@@ -133,10 +133,24 @@ namespace GPW_Admin.WebUserControls
{
minArr = Convert.ToInt32(Math.Floor(Convert.ToDouble(minOrig / step))) * step;
}
// modifico data del record
DataProxy.DP.taTimb.stp_Timbr_modifica(idxDip, dataOra, dataOra.AddMinutes(minArr - minOrig).AddSeconds(-secOrig));
// approvo con data modificata
DataProxy.DP.taTimb.stp_Timbr_Approva(idxDip, dataOra.AddMinutes(minArr - minOrig).AddSeconds(-secOrig));
try
{
// modifico data del record
DataProxy.DP.taTimb.stp_Timbr_modifica(idxDip, dataOra, dataOra.AddMinutes(minArr - minOrig).AddSeconds(-secOrig));
}
catch (Exception exc)
{
logger.lg.scriviLog($"Eccezione durante stp_Timbr_modifica{Environment.NewLine}{exc}");
}
try
{
// approvo con data modificata
DataProxy.DP.taTimb.stp_Timbr_Approva(idxDip, dataOra.AddMinutes(minArr - minOrig).AddSeconds(-secOrig));
}
catch (Exception exc)
{
logger.lg.scriviLog($"Eccezione durante stp_Timbr_Approva{Environment.NewLine}{exc}");
}
}
catch
{ }