diff --git a/.vs/MedAP/v15/.suo b/.vs/MedAP/v15/.suo index 96e2c39..498467a 100644 Binary files a/.vs/MedAP/v15/.suo and b/.vs/MedAP/v15/.suo differ diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..48c5e05 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,133 @@ +pipeline { + agent none + stages { + stage('Checkout') { + agent any + steps { + /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ + script { + withEnv(['NEXT_BUILD_NUMBER=140']) { + env.versionNumber = VersionNumber(versionNumberString : '${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2017-01-01', skipFailedBuilds: true) + // env.versionNumber = VersionNumber(versionNumberString : '${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2017-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') + env.APP_NAME = 'MedAP' + } + } + script { + currentBuild.displayName = "${env.versionNumber}" + if (env.BRANCH_NAME == "develop" || env.BRANCH_NAME.contains("DEMO")) { + currentBuild.description = "TEST ${env.versionNumber}" + } + else { + currentBuild.description = "BUILD ${env.versionNumber}" + } + } + /* CAMBIO numero versione in file sorgente!!! */ + bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 000.000 ${env.versionNumber} || EXIT /B 0" + } + } + stage('Build') { + agent any + steps { + script { + /* compilo tutti i progetti compresi... */ + if (env.BRANCH_NAME == "develop") { + /* CAMBIO numero versione in file sorgente!!! */ + bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 000.000 ${env.versionNumber} || EXIT /B 0" + bat "e:\\nuget.exe restore ${WORKSPACE}\\MedAP.sln" + parallel ( + PIC: { + sleep 0 + bat "\"${tool 'MSBuild-14.0'}\" MedAP/MedAP.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m" + }, + failFast: false) + } + else { + echo 'Nothing to Build...' + } + } + } + } + stage('Test') { + steps { + echo 'Testing.. 2 be done...' + } + } + stage('Deploy') { + agent any + steps { + script { + /* DEPLOY condizionale: develop / master */ + if (env.BRANCH_NAME == "master") { + /* CAMBIO numero versione in file sorgente!!! */ + bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 000.000 ${env.versionNumber} || EXIT /B 0" + bat "e:\\nuget.exe restore ${WORKSPACE}\\MedAP.sln" + // parallel ( + // IIS01: { + // bat "\"${tool 'MSBuild-14.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=14.0 /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ MedAP/MedAP.csproj" + // }, + // IIS02: { + // bat "\"${tool 'MSBuild-14.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=14.0 /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ MedAP/MedAP.csproj" + // }, + // failFast: false) + } + else { + echo 'Nothing to deploy...' + } + } + } + } + stage('RemoteDeploy') { + agent any + steps { + script { + // /* compilo installers in base al BRANCH del cliente... */ + // if (env.BRANCH_NAME == "PROD-OVH") { + // /* CAMBIO numero versione in file sorgente!!! */ + // bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 000.000 ${env.versionNumber} || EXIT /B 0" + // bat "e:\\nuget.exe restore ${WORKSPACE}\\MedAP.sln" + // parallel ( + // PIC: { + // sleep 0 + // bat "\"${tool 'MSBuild-14.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=PROD-OVH.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=PROD-OVH /p:username=WPROD01\\Steamware /p:Password=viaD@nte16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ MedAP/MedAP.csproj" + // }, + // failFast: false) + // } + // else if (env.BRANCH_NAME == "DEMO-OVH") { + // /* CAMBIO numero versione in file sorgente!!! */ + // bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 000.000 ${env.versionNumber} || EXIT /B 0" + // bat "e:\\nuget.exe restore ${WORKSPACE}\\MedAP.sln" + // parallel ( + // PIC: { + // sleep 0 + // bat "\"${tool 'MSBuild-14.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=DEMO-OVH.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=DEMO-OVH /p:username=WPROD01\\Steamware /p:Password=viaD@nte16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ MedAP/MedAP.csproj" + // }, + // failFast: false) + // } + // else{ + // echo 'Questo BRANCH non necessita di RemoteDeploy...' + // } + } + } + } + /*stage('Archive') { + steps { + echo 'Archiviazione build Release' + archiveArtifacts artifacts: 'ScratchTest/ScratchTest/bin/Release/**' + } + }*/ + } + post { + success { + mail to:"samuele@steamware.net", subject:"SUCCESS: ${currentBuild.fullDisplayName}", body: "Build passed." + } + failure { + mail to:"samuele@steamware.net", subject:"FAILURE: ${currentBuild.fullDisplayName}", body: "Build failed." + } + unstable { + mail to:"samuele@steamware.net", subject:"UNSTABLE: ${currentBuild.fullDisplayName}", body: "Build is unstable." + } + /*changed { + mail to:"samuele@steamware.net", subject:"CHANGED: ${currentBuild.fullDisplayName}", body: "Build status changed." + }*/ + } +} \ No newline at end of file diff --git a/VersGen/VersGen.cs b/VersGen/VersGen.cs index 688037a..66853c6 100644 --- a/VersGen/VersGen.cs +++ b/VersGen/VersGen.cs @@ -5,7 +5,7 @@ using System.Reflection; -[assembly: AssemblyVersion("1.0.32.4384")] -[assembly: AssemblyFileVersion("1.0.32.4384")] +[assembly: AssemblyVersion("1.0.000.000")] +[assembly: AssemblyFileVersion("1.0.000.000")] [assembly: AssemblyCopyright("Steamware © 2006-2018")] -[assembly: AssemblyCompany("Steamware")] +[assembly: AssemblyCompany("Steamware")] \ No newline at end of file diff --git a/VersGen/VersGen.tt b/VersGen/VersGen.tt index 38390ea..8aa861b 100644 --- a/VersGen/VersGen.tt +++ b/VersGen/VersGen.tt @@ -6,14 +6,7 @@ using System.Reflection; -[assembly: AssemblyVersion("1.0.32.<#= this.RevisionNumber #>")] -[assembly: AssemblyFileVersion("1.0.32.<#= this.RevisionNumber #>")] +[assembly: AssemblyVersion("1.0.000.000")] +[assembly: AssemblyFileVersion("1.0.000.000")] [assembly: AssemblyCopyright("Steamware © 2006-<#= DateTime.Now.Year #>")] -[assembly: AssemblyCompany("Steamware")] -<#+ -// int Major = 2; -// int Minor = 4; -// int Build = 602; -// int RevisionNumber = (int)(DateTime.Now - DateTime.Today).TotalSeconds; - int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(2006,1,1)).TotalDays; -#> \ No newline at end of file +[assembly: AssemblyCompany("Steamware")] \ No newline at end of file diff --git a/VersGen/obj/Debug/TempPE/VersGen.cs.dll b/VersGen/obj/Debug/TempPE/VersGen.cs.dll index 580ad63..21fc386 100644 Binary files a/VersGen/obj/Debug/TempPE/VersGen.cs.dll and b/VersGen/obj/Debug/TempPE/VersGen.cs.dll differ