Update jenkinsfile
This commit is contained in:
Vendored
+90
-14
@@ -12,10 +12,10 @@ pipeline {
|
||||
steps {
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=17']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'QRC-UTILS'
|
||||
withEnv(['NEXT_BUILD_NUMBER=71']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '1.2.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '1.2.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'ZCode'
|
||||
}
|
||||
}
|
||||
script {
|
||||
@@ -28,8 +28,76 @@ pipeline {
|
||||
}
|
||||
}
|
||||
// CAMBIO numero versione + checkout NuGet in file sorgente!!!
|
||||
bat "fart.exe VersGen\\MoonPro.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
|
||||
bat "e:\\nuget.exe restore ${WORKSPACE}\\QR-GEN.sln"
|
||||
bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 0.0.0.0 ${env.versionNumber} || EXIT /B 0"
|
||||
// checkout NuGet in file sorgente!!!
|
||||
fixNuget("${WORKSPACE}\\ZebraCode.sln")
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
agent any
|
||||
steps {
|
||||
script {
|
||||
properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '180', artifactNumToKeepStr: '30', daysToKeepStr: '360', numToKeepStr: '30')), pipelineTriggers([])])
|
||||
// CAMBIO numero versione + checkout NuGet in file sorgente!!!
|
||||
bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 0.0.0.0 ${env.versionNumber} || EXIT /B 0"
|
||||
// checkout NuGet in file sorgente!!!
|
||||
fixNuget("${WORKSPACE}\\ZebraCode.sln")
|
||||
}
|
||||
script {
|
||||
/* compilo installers in base al BRANCH del cliente... */
|
||||
if (env.BRANCH_NAME == "develop") {
|
||||
parallel (
|
||||
ZCode: {
|
||||
sleep 0
|
||||
bat "\"${tool 'MSBuild-15.0'}\" ZCode\\ZCode.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m"
|
||||
},
|
||||
failFast: false)
|
||||
}
|
||||
else {
|
||||
echo 'Niente x Build (limitata a develop)...'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
agent any
|
||||
steps {
|
||||
script {
|
||||
// CAMBIO numero versione + checkout NuGet in file sorgente!!!
|
||||
bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 0.0.0.0 ${env.versionNumber} || EXIT /B 0"
|
||||
// checkout NuGet in file sorgente!!!
|
||||
fixNuget("${WORKSPACE}\\ZebraCode.sln")
|
||||
}
|
||||
script {
|
||||
/* DEPLOY condizionale: develop (Ufficio Seriate) / master (Sito Online) */
|
||||
if (env.BRANCH_NAME == "master") {
|
||||
parallel (
|
||||
IIS_01: {
|
||||
if(env.enableIIS01 == "Y")
|
||||
{
|
||||
// SITE
|
||||
bat "\"${tool 'MSBuild-15.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:VisualStudioVersion=15.0 /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ ZCode\\ZCode.csproj"
|
||||
}
|
||||
},
|
||||
IIS_02: {
|
||||
if(env.enableIIS02 == "Y")
|
||||
{
|
||||
sleep 4
|
||||
// SITE
|
||||
bat "\"${tool 'MSBuild-15.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS02.pubxml /p:VisualStudioVersion=15.0 /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ ZCode\\ZCode.csproj"
|
||||
}
|
||||
},
|
||||
failFast: false)
|
||||
}
|
||||
else if (env.BRANCH_NAME == "ovh") {
|
||||
bat "\"${tool 'MSBuild-15.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=OVH-PROD.pubxml /p:VisualStudioVersion=15.0 /p:RunCodeAnalysis=false /p:Configuration=OVH /p:username=WPROD01\\Steamware /p:Password=viaD@nte16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ ZCode\\ZCode.csproj"
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Questo BRANCH non necessita di deploy...'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,14 +137,6 @@ def getChangeString() {
|
||||
return changeString
|
||||
}
|
||||
|
||||
// Funzione x invio email
|
||||
def sendEmail(status) {
|
||||
mail (
|
||||
to: "$EMAIL_RECIPIENTS",
|
||||
subject: "${env.versionNumber} " + status +": Build $BUILD_NUMBER ($JOB_NAME)",
|
||||
body: "Modifiche:\n " + getChangeString() + "\n\n Verifica console output: $BUILD_URL/console" + "\n"
|
||||
)
|
||||
}
|
||||
|
||||
// Funzione x invio slack
|
||||
def sendSlack(status, colorCode) {
|
||||
@@ -88,3 +148,19 @@ def sendSlack(status, colorCode) {
|
||||
"Modifiche:\n " + getChangeString() + "\n\n Verifica build: <${env.BUILD_URL}|Apri>" + "\n"
|
||||
)
|
||||
}
|
||||
|
||||
// funzione x fix pacchetti nuget da NOSTRO repo Nexus con proxy
|
||||
def fixNuget(solutionFile) {
|
||||
// bat "e:\\nuget setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-group"
|
||||
// solo la prima volta va aggiunta...
|
||||
hasSource = bat "e:\\nuget sources list | find \"Steamware\" /C"
|
||||
if (hasSource == "0")
|
||||
{
|
||||
bat "e:\\nuget sources Add -Name \"Steamware Nexus\" -Source http://nexus.steamware.net/repository/nuget-group -username \"nugetUser\" -password \"viaDante16\""
|
||||
}
|
||||
else
|
||||
{
|
||||
bat "e:\\nuget sources Update -Name \"Steamware Nexus\" -Source http://nexus.steamware.net/repository/nuget-group -username \"nugetUser\" -password \"viaDante16\""
|
||||
}
|
||||
bat "e:\\nuget.exe restore ${solutionFile}"
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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>
|
||||
<PrecompileBeforePublish>True</PrecompileBeforePublish>
|
||||
<EnableUpdateable>True</EnableUpdateable>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<WDPMergeOption>DonotMerge</WDPMergeOption>
|
||||
<ExcludeApp_Data>True</ExcludeApp_Data>
|
||||
<MSDeployServiceURL>IIS01</MSDeployServiceURL>
|
||||
<DeployIisAppPath>Default Web Site/ZCode</DeployIisAppPath>
|
||||
<RemoteSitePhysicalPath />
|
||||
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
|
||||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||
<EnableMSDeployBackup>True</EnableMSDeployBackup>
|
||||
<UserName>jenkins</UserName>
|
||||
<_SavePWD>True</_SavePWD>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?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>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAI/S2yHlOzEGsfZnJFESRYAAAAAACAAAAAAADZgAAwAAAABAAAAAE7G84vVb53R4aZ+HfuWtmAAAAAASAAACgAAAAEAAAAFP2qEkZwYHbgS8jeQXlYkIYAAAAs7f0jFvrMxDUJhgGDSV0tbf0WJarsFkBFAAAAA5GtgC/PxiRJifMrrWabUUsv0uS</EncryptedPassword>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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>IIS02</MSDeployServiceURL>
|
||||
<DeployIisAppPath>Default Web Site/ZCode</DeployIisAppPath>
|
||||
<RemoteSitePhysicalPath />
|
||||
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
|
||||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||
<EnableMSDeployBackup>True</EnableMSDeployBackup>
|
||||
<UserName>jenkins</UserName>
|
||||
<_SavePWD>True</_SavePWD>
|
||||
<PrecompileBeforePublish>True</PrecompileBeforePublish>
|
||||
<EnableUpdateable>True</EnableUpdateable>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<WDPMergeOption>DonotMerge</WDPMergeOption>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?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>qrcode.steamware.net</SiteUrlToLaunchAfterPublish>
|
||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
||||
<ExcludeApp_Data>False</ExcludeApp_Data>
|
||||
<MSDeployServiceURL>https://wprod01.steamware.net:8172/MsDeploy.axd</MSDeployServiceURL>
|
||||
<DeployIisAppPath>qrcode.steamware.net</DeployIisAppPath>
|
||||
<RemoteSitePhysicalPath />
|
||||
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
|
||||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||
<EnableMSDeployBackup>True</EnableMSDeployBackup>
|
||||
<UserName>jenkins</UserName>
|
||||
<_SavePWD>True</_SavePWD>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?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>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAI/S2yHlOzEGsfZnJFESRYAAAAAACAAAAAAADZgAAwAAAABAAAADRGyRflF9zMzRp57A+PBt9AAAAAASAAACgAAAAEAAAALl7FQBp0w39dqC/KjfHYQEYAAAAViubc54Evmg1amaBPgWawo/pbmtTlnk3FAAAAKTJS8XBVzk2R3uxaOszcDc41aX4</EncryptedPassword>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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>Package</WebPublishMethod>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
||||
<ExcludeApp_Data>True</ExcludeApp_Data>
|
||||
<DesktopBuildPackageLocation>C:\Users\samuele.steamw\Documents\VisualStudioProject\QRC-UTILS\Release\QR-GEN.zip</DesktopBuildPackageLocation>
|
||||
<PackageAsSingleFile>true</PackageAsSingleFile>
|
||||
<DeployIisAppPath>Default Web Site/ZCode</DeployIisAppPath>
|
||||
<PublishDatabaseSettings>
|
||||
<Objects xmlns="" />
|
||||
</PublishDatabaseSettings>
|
||||
<PrecompileBeforePublish>True</PrecompileBeforePublish>
|
||||
<EnableUpdateable>True</EnableUpdateable>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<WDPMergeOption>DonotMerge</WDPMergeOption>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?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>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAmTIWAbwOw0WNkOJPskDBCQAAAAACAAAAAAADZgAAwAAAABAAAAAGYA4wqy8Eynb5+FXK/G0lAAAAAASAAACgAAAAEAAAAA1NLsZla+BxjV/TRtkqhrYYAAAAsqpiiZpk0a/Ao1s7MLV0uKWKHdsiiXvJFAAAAK76Zq0NsIRMLhmkNpXAL838WvB9</EncryptedPassword>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -171,6 +171,8 @@
|
||||
<Content Include="Content\bootstrap-reboot.css.map" />
|
||||
<Content Include="Content\bootstrap-grid.min.css.map" />
|
||||
<Content Include="Content\bootstrap-grid.css.map" />
|
||||
<None Include="Properties\PublishProfiles\IIS02.pubxml" />
|
||||
<None Include="Properties\PublishProfiles\IIS01.pubxml" />
|
||||
<None Include="Properties\PublishProfiles\OVH-PROD.pubxml" />
|
||||
<None Include="Properties\PublishProfiles\Prod.pubxml" />
|
||||
<Content Include="Scripts\bootstrap.bundle.js" />
|
||||
|
||||
+6
-6
@@ -3,24 +3,24 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29709.97
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZCode", "QR-GEN\ZCode.csproj", "{4B0464BD-88BC-44A4-9750-AFC4259E7400}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VersGen", "VersGen\VersGen.csproj", "{175AF851-9AED-4D5F-8571-9CEC8B2D2320}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZCode", "ZCode\ZCode.csproj", "{4B0464BD-88BC-44A4-9750-AFC4259E7400}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4B0464BD-88BC-44A4-9750-AFC4259E7400}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4B0464BD-88BC-44A4-9750-AFC4259E7400}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4B0464BD-88BC-44A4-9750-AFC4259E7400}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4B0464BD-88BC-44A4-9750-AFC4259E7400}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{175AF851-9AED-4D5F-8571-9CEC8B2D2320}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{175AF851-9AED-4D5F-8571-9CEC8B2D2320}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{175AF851-9AED-4D5F-8571-9CEC8B2D2320}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{175AF851-9AED-4D5F-8571-9CEC8B2D2320}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4B0464BD-88BC-44A4-9750-AFC4259E7400}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4B0464BD-88BC-44A4-9750-AFC4259E7400}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4B0464BD-88BC-44A4-9750-AFC4259E7400}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4B0464BD-88BC-44A4-9750-AFC4259E7400}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Reference in New Issue
Block a user