Merge branch 'release/ConvertJenkinsToGitlabCiCd'

This commit is contained in:
Samuele Locatelli
2022-04-11 19:42:45 +02:00
10 changed files with 235 additions and 92 deletions
+96 -80
View File
@@ -2,11 +2,11 @@ variables:
NUGET_PATH: 'C:\Tools\nuget.exe'
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
ASPNET_MERGE_PATH: 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools'
VERS_MAIN: '1.8'
VERS_MAIN: '1.1'
NEW_REL: ''
NEXUS_PATH: 'WebLCP'
APP_NAME: 'WebLCP'
SOL_NAME: 'INTERFACE\WebLCP'
SOL_NAME: 'WebLCP'
APP_CONF: 'Release'
PROJ_NAME: 'WebLCP'
@@ -26,16 +26,15 @@ variables:
.version-fix: &version-fix
- |
# Esecuzione fix numero versione x pack nuget
$fileName = ".\VersGen\VersGen.cs";
$fileName = "INTERFACE\VersGen\VersGen.cs";
# calcolo nuova
$env:NEW_REL = $env:VERS_MAIN+"."+(get-date format yyMM)+"."+(get-date format dHH)
echo "New vers: $env:NEW_REL"
# aggiorno file
$contenuto = Get-Content -path $fileName -Raw
$newContenuto = $contenuto -replace '1.0.0.0', $env:NEW_REL
$newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL
$newContenuto | Set-Content -path $fileName
# helper x fix manifest xml
.manifest-fix: &manifest-fix
- |
@@ -44,7 +43,7 @@ variables:
$contenuto = Get-Content -path $fileName -Raw
$newContenuto = $contenuto -replace '{{BRANCHNAME}}', $CI_COMMIT_BRANCH
$newContenuto = $newContenuto -replace '{{PACKNAME}}', $env:APP_NAME
$newContenuto = $newContenuto -replace '1.0.0.0', $env:NEW_REL
$newContenuto = $newContenuto -replace '0.0.0.0', $env:NEW_REL
$newContenuto | Set-Content -path $fileName
# helper creazione hash files
@@ -78,7 +77,7 @@ variables:
{
$version = "unstable"
}
$File2Send = Get-ChildItem("$env:APP_NAME\Release\*")
$File2Send = Get-ChildItem("INTERFACE\$env:APP_NAME\Release\*")
ForEach ($File in $File2Send) {
$FileName = Split-path $File -leaf
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$CI_COMMIT_BRANCH/LAST/$FileName
@@ -100,82 +99,99 @@ WebLCP:build:
APP_NAME: WebLCP
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore $env:SOL_NAME.sln -Verbosity quiet'
- '& "$env:NUGET_PATH" restore INTERFACE\$env:SOL_NAME.sln -Verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" INTERFACE/$env:APP_NAME/$env:APP_NAME.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
# WebLCP:IIS01:deploy:
# stage: deploy
# tags:
# - win
# variables:
# APP_NAME: WebLCP
# except:
# refs:
# - main
# - master
# before_script:
# - *nuget-fix
# - '& "$env:NUGET_PATH" restore $env:SOL_NAME.sln -Verbosity quiet'
# - *version-fix
# script:
# - '& "$env:MSBUILD_PATH" /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 INTERFACE/$env:APP_NAME/$env:APP_NAME.csproj'
# needs: ["WebLCP:build"]
# WebLCP:IIS02:deploy:
# stage: deploy
# tags:
# - win
# variables:
# APP_NAME: WebLCP
# except:
# refs:
# - main
# - master
# before_script:
# - *nuget-fix
# - '& "$env:NUGET_PATH" restore $env:SOL_NAME.sln -Verbosity quiet'
# - *version-fix
# script:
# - '& "$env:MSBUILD_PATH" /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 INTERFACE/$env:APP_NAME/$env:APP_NAME.csproj'
# needs: ["WebLCP:build"]
WebLCP:IIS01:deploy:
stage: deploy
tags:
- win
variables:
APP_NAME: WebLCP
except:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore INTERFACE/$env:SOL_NAME.sln -Verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" /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 INTERFACE/$env:APP_NAME/$env:APP_NAME.csproj'
needs: ["WebLCP:build"]
# WebLCP:IIS03:deploy:
# stage: deploy
# tags:
# - win
# variables:
# APP_NAME: WebLCP
# except:
# refs:
# - main
# - master
# before_script:
# - *nuget-fix
# - '& "$env:NUGET_PATH" restore $env:SOL_NAME.sln -Verbosity quiet'
# - *version-fix
# script:
# - '& "$env:MSBUILD_PATH" /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 INTERFACE/$env:APP_NAME/$env:APP_NAME.csproj'
# needs: ["WebLCP:build"]
WebLCP:IIS02:deploy:
stage: deploy
tags:
- win
variables:
APP_NAME: WebLCP
except:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore INTERFACE/$env:SOL_NAME.sln -Verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" /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 INTERFACE/$env:APP_NAME/$env:APP_NAME.csproj'
needs: ["WebLCP:build"]
# WebLCP:File:release:
# stage: release
# tags:
# - win
# variables:
# APP_NAME: WebLCP
# only:
# refs:
# - main
# - master
# before_script:
# - *nuget-fix
# - '& "$env:NUGET_PATH" restore $env:SOL_NAME.sln -Verbosity quiet'
# - *version-fix
# - *manifest-fix
# script:
# - '& "$env:MSBUILD_PATH" /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Package /p:PublishProfile=FileExport.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:PackageLocation=Release/$env:APP_NAME.zip /p:PackageAsSingleFile=True /p:OutputPath=bin/ /verbosity:minimal INTERFACE/$env:APP_NAME/$env:APP_NAME.csproj'
# - *hashBuild
# - *nexusUpload
# needs: ["WebLCP:build"]
WebLCP:IIS03:deploy:
stage: deploy
tags:
- win
variables:
APP_NAME: WebLCP
except:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore INTERFACE/$env:SOL_NAME.sln -Verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" /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 INTERFACE/$env:APP_NAME/$env:APP_NAME.csproj'
needs: ["WebLCP:build"]
WebLCP:OVH:release:
stage: release
tags:
- win
only:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore INTERFACE/$env:APP_NAME.sln -Verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=OVH.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=steamware /p:Password=viaD@nte16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal INTERFACE/$env:APP_NAME/$env:APP_NAME.csproj'
needs: ["WebLCP:build"]
WebLCP:File:release:
stage: release
tags:
- win
variables:
APP_NAME: WebLCP
only:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore INTERFACE/$env:SOL_NAME.sln -Verbosity quiet'
- *version-fix
- *manifest-fix
script:
- '& "$env:MSBUILD_PATH" /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Package /p:PublishProfile=FileExport.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:PackageLocation=Release/$env:APP_NAME.zip /p:PackageAsSingleFile=True /p:OutputPath=bin/ /verbosity:minimal INTERFACE/$env:APP_NAME/$env:APP_NAME.csproj'
- *hashBuild
- *nexusUpload
needs: ["WebLCP:build"]
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>Package</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<ExcludeApp_Data>true</ExcludeApp_Data>
<DesktopBuildPackageLocation>WebLCP/Release/WebLCP.zip</DesktopBuildPackageLocation>
<PackageAsSingleFile>true</PackageAsSingleFile>
<DeployIisAppPath>Default Web Site/WebLCP</DeployIisAppPath>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<PrecompileBeforePublish>true</PrecompileBeforePublish>
<EnableUpdateable>true</EnableUpdateable>
<DebugSymbols>false</DebugSymbols>
<WDPMergeOption>DonotMerge</WDPMergeOption>
</PropertyGroup>
</Project>
@@ -9,20 +9,16 @@ modificando il file MSBuild. Per altre informazioni su questo argomento, vedere
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>True</ExcludeApp_Data>
<MSDeployServiceURL>https://IIS01:8172/MsDeploy.axd</MSDeployServiceURL>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<ExcludeApp_Data>true</ExcludeApp_Data>
<MSDeployServiceURL>https://IIS01.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/test/admodelling</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<EnableMSDeployBackup>true</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<PrecompileBeforePublish>True</PrecompileBeforePublish>
<EnableUpdateable>True</EnableUpdateable>
<DebugSymbols>False</DebugSymbols>
<WDPMergeOption>DonotMerge</WDPMergeOption>
<_SavePWD>true</_SavePWD>
<PublishDatabaseSettings>
<Objects xmlns="">
<ObjectGroup Name="AdmodellingConnectionString" Order="1" Enabled="False">
@@ -35,10 +31,26 @@ modificando il file MSBuild. Per altre informazioni su questo argomento, vedere
<Source MatchValue="Data Source=SQL2016DEV;Initial Catalog=Admodelling;User ID=sa;Password=keyhammer16;" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
</UpdateFrom>
</ObjectGroup>
<ObjectGroup Name="ErrorLog" Order="2" Enabled="False">
<Destination Path="" />
<Object Type="DbDacFx">
<PreSource Path="Data Source=SQL2016PROD;Initial Catalog=Elmah;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC" includeData="False" />
<Source Path="$(IntermediateOutputPath)AutoScripts\ErrorLog_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
</Object>
<UpdateFrom Type="Web.Config">
<Source MatchValue="Data Source=SQL2016PROD;Initial Catalog=Elmah;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
</UpdateFrom>
</ObjectGroup>
</Objects>
</PublishDatabaseSettings>
<EnableMsDeployAppOffline>false</EnableMsDeployAppOffline>
<PrecompileBeforePublish>true</PrecompileBeforePublish>
<EnableUpdateable>true</EnableUpdateable>
<DebugSymbols>false</DebugSymbols>
<WDPMergeOption>DonotMerge</WDPMergeOption>
</PropertyGroup>
<ItemGroup>
<MSDeployParameterValue Include="$(DeployParameterPrefix)AdmodellingConnectionString-Web.config Connection String" />
<MSDeployParameterValue Include="$(DeployParameterPrefix)ErrorLog-Web.config Connection String" />
</ItemGroup>
</Project>
@@ -11,7 +11,7 @@ modificando il file MSBuild. Per altre informazioni su questo argomento, vedere
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>True</ExcludeApp_Data>
<MSDeployServiceURL>https://IIS02:8172/MsDeploy.axd</MSDeployServiceURL>
<MSDeployServiceURL>https://IIS02.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/test/admodelling</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Questo file viene usato dal processo di pubblicazione/creazione pacchetto del progetto Web. È possibile personalizzare il comportamento del processo
modificando il file MSBuild. Per altre informazioni su questo argomento, vedere https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<ExcludeApp_Data>true</ExcludeApp_Data>
<MSDeployServiceURL>https://IIS03.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/test/admodelling</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>true</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>true</_SavePWD>
<PublishDatabaseSettings>
<Objects xmlns="">
<ObjectGroup Name="AdmodellingConnectionString" Order="1" Enabled="False">
<Destination Path="" />
<Object Type="DbDacFx">
<PreSource Path="Data Source=SQL2016DEV;Initial Catalog=Admodelling;User ID=sa;Password=keyhammer16" includeData="False" />
<Source Path="$(IntermediateOutputPath)AutoScripts\AdmodellingConnectionString_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
</Object>
<UpdateFrom Type="Web.Config">
<Source MatchValue="Data Source=SQL2016DEV;Initial Catalog=Admodelling;User ID=sa;Password=keyhammer16;" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
</UpdateFrom>
</ObjectGroup>
<ObjectGroup Name="ErrorLog" Order="2" Enabled="False">
<Destination Path="" />
<Object Type="DbDacFx">
<PreSource Path="Data Source=SQL2016PROD;Initial Catalog=Elmah;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC" includeData="False" />
<Source Path="$(IntermediateOutputPath)AutoScripts\ErrorLog_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
</Object>
<UpdateFrom Type="Web.Config">
<Source MatchValue="Data Source=SQL2016PROD;Initial Catalog=Elmah;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
</UpdateFrom>
</ObjectGroup>
</Objects>
</PublishDatabaseSettings>
<EnableMsDeployAppOffline>false</EnableMsDeployAppOffline>
<PrecompileBeforePublish>true</PrecompileBeforePublish>
<EnableUpdateable>true</EnableUpdateable>
<DebugSymbols>false</DebugSymbols>
<WDPMergeOption>DonotMerge</WDPMergeOption>
</PropertyGroup>
<ItemGroup>
<MSDeployParameterValue Include="$(DeployParameterPrefix)AdmodellingConnectionString-Web.config Connection String" />
<MSDeployParameterValue Include="$(DeployParameterPrefix)ErrorLog-Web.config Connection String" />
</ItemGroup>
</Project>
@@ -14,7 +14,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<MSDeployServiceURL>https://172.16.0.214:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>admodelling.org</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<SkipExtraFilesOnServer>true</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>steamware</UserName>
+2
View File
@@ -302,7 +302,9 @@
<DependentUpon>DS_App.xsd</DependentUpon>
</Content>
<Content Include="logs\PlaceHolder.file" />
<None Include="Properties\PublishProfiles\FileExport.pubxml" />
<None Include="Properties\PublishProfiles\IIS01.pubxml" />
<None Include="Properties\PublishProfiles\IIS03.pubxml" />
<None Include="Properties\PublishProfiles\IIS02.pubxml" />
<Content Include="results\PlaceHolder.file" />
<Content Include="Scripts\bootstrap.bundle.js" />
+28
View File
@@ -0,0 +1,28 @@
<body>
<i>Server gestioen devices TAB per MAPO/MoonPro</i>
<h4>Versione: {{CURRENT-REL}}</h4>
<br />
Note di rilascio:
<ul>
<li>
<b>Ultime modifiche:</b>
<ul>{{LAST-CHANGES}}</ul>
</li>
<li>
<b>v.1.7.* &rarr;</b>
<ul>
<li>Integrazione sistemi di AutoUpdate</li>
<li>Auto Approvazione</li>
</ul>
</li>
</ul>
<div>
<div style="float: left;">
<img src="logoSteamware.png" />
</div>
<div style="float: right;">
<a href="https://www.steamware.net/IOT" target="_blank">&copy; Steamware 2006-2018</a>
</div>
</div>
</body>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

+7
View File
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>0.0.0.0</version>
<url>https://nexus.steamware.net/repository/SWS/{{PACKNAME}}/{{BRANCHNAME}}/LAST/{{PACKNAME}}.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/{{PACKNAME}}/{{BRANCHNAME}}/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
</item>