From e33c952b820b711d0cfc2b31869e72d2b0668b47 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 24 Dec 2019 15:50:27 +0100 Subject: [PATCH 01/11] Fix chiusura e inserimento (PRELIMINARE) autoupdater... --- IOB-MAN/App.config | 1 + IOB-MAN/IOB-MAN.csproj | 3 ++ IOB-MAN/IOBManPanel.Designer.cs | 40 +++++++++++++++++---------- IOB-MAN/IOBManPanel.cs | 49 +++++++++++++++++++++++++++++++-- IOB-MAN/packages.config | 1 + 5 files changed, 77 insertions(+), 17 deletions(-) diff --git a/IOB-MAN/App.config b/IOB-MAN/App.config index a95da3ed..1337de45 100644 --- a/IOB-MAN/App.config +++ b/IOB-MAN/App.config @@ -9,6 +9,7 @@ + diff --git a/IOB-MAN/IOB-MAN.csproj b/IOB-MAN/IOB-MAN.csproj index 162b615c..fa3df738 100644 --- a/IOB-MAN/IOB-MAN.csproj +++ b/IOB-MAN/IOB-MAN.csproj @@ -38,6 +38,9 @@ IobManIcon.ico + + ..\packages\Autoupdater.NET.Official.1.5.8\lib\net40\AutoUpdater.NET.dll + ..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll diff --git a/IOB-MAN/IOBManPanel.Designer.cs b/IOB-MAN/IOBManPanel.Designer.cs index 175c1a09..0b63c883 100644 --- a/IOB-MAN/IOBManPanel.Designer.cs +++ b/IOB-MAN/IOBManPanel.Designer.cs @@ -44,13 +44,14 @@ this.btnMinimizeAll = new System.Windows.Forms.Button(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.panel2 = new System.Windows.Forms.Panel(); + this.btnMoreTOut = new System.Windows.Forms.Button(); this.txtTOutAutoCheck = new System.Windows.Forms.TextBox(); this.chkAutoRestart = new System.Windows.Forms.CheckBox(); this.btnOpenAll = new System.Windows.Forms.Button(); this.btnRestartAll = new System.Windows.Forms.Button(); this.btnCloseAll = new System.Windows.Forms.Button(); this.dgvManagedItems = new System.Windows.Forms.DataGridView(); - this.btnMoreTOut = new System.Windows.Forms.Button(); + this.forceCloseALLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.statusStrip1.SuspendLayout(); this.panel1.SuspendLayout(); this.menuStrip1.SuspendLayout(); @@ -128,22 +129,23 @@ // this.processManagerToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.updateIOBMANToolStripMenuItem, - this.updateIOBWINToolStripMenuItem}); + this.updateIOBWINToolStripMenuItem, + this.forceCloseALLToolStripMenuItem}); this.processManagerToolStripMenuItem.Name = "processManagerToolStripMenuItem"; - this.processManagerToolStripMenuItem.Size = new System.Drawing.Size(57, 20); - this.processManagerToolStripMenuItem.Text = "&Update"; + this.processManagerToolStripMenuItem.Size = new System.Drawing.Size(62, 20); + this.processManagerToolStripMenuItem.Text = "&Manage"; // // updateIOBMANToolStripMenuItem // this.updateIOBMANToolStripMenuItem.Name = "updateIOBMANToolStripMenuItem"; - this.updateIOBMANToolStripMenuItem.Size = new System.Drawing.Size(167, 22); + this.updateIOBMANToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.updateIOBMANToolStripMenuItem.Text = "Update IOB-&MAN"; this.updateIOBMANToolStripMenuItem.Click += new System.EventHandler(this.updateIOBMANToolStripMenuItem_Click); // // updateIOBWINToolStripMenuItem // this.updateIOBWINToolStripMenuItem.Name = "updateIOBWINToolStripMenuItem"; - this.updateIOBWINToolStripMenuItem.Size = new System.Drawing.Size(167, 22); + this.updateIOBWINToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.updateIOBWINToolStripMenuItem.Text = "Update IOB-&WIN"; this.updateIOBWINToolStripMenuItem.Click += new System.EventHandler(this.updateIOBWINToolStripMenuItem_Click); // @@ -208,6 +210,17 @@ this.panel2.Size = new System.Drawing.Size(116, 341); this.panel2.TabIndex = 85; // + // btnMoreTOut + // + this.btnMoreTOut.Location = new System.Drawing.Point(81, 306); + this.btnMoreTOut.Name = "btnMoreTOut"; + this.btnMoreTOut.Size = new System.Drawing.Size(25, 23); + this.btnMoreTOut.TabIndex = 87; + this.btnMoreTOut.Text = "+"; + this.btnMoreTOut.UseVisualStyleBackColor = true; + this.btnMoreTOut.Visible = false; + this.btnMoreTOut.Click += new System.EventHandler(this.btnMoreTOut_Click); + // // txtTOutAutoCheck // this.txtTOutAutoCheck.Location = new System.Drawing.Point(11, 306); @@ -286,16 +299,12 @@ this.dgvManagedItems.TabIndex = 76; this.dgvManagedItems.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvManagedItems_CellDoubleClick); // - // btnMoreTOut + // forceCloseALLToolStripMenuItem // - this.btnMoreTOut.Location = new System.Drawing.Point(81, 306); - this.btnMoreTOut.Name = "btnMoreTOut"; - this.btnMoreTOut.Size = new System.Drawing.Size(25, 23); - this.btnMoreTOut.TabIndex = 87; - this.btnMoreTOut.Text = "+"; - this.btnMoreTOut.UseVisualStyleBackColor = true; - this.btnMoreTOut.Visible = false; - this.btnMoreTOut.Click += new System.EventHandler(this.btnMoreTOut_Click); + this.forceCloseALLToolStripMenuItem.Name = "forceCloseALLToolStripMenuItem"; + this.forceCloseALLToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.forceCloseALLToolStripMenuItem.Text = "&Force Close ALL"; + this.forceCloseALLToolStripMenuItem.Click += new System.EventHandler(this.forceCloseALLToolStripMenuItem_Click); // // IOBManPanel // @@ -350,6 +359,7 @@ private System.Windows.Forms.CheckBox chkAutoRestart; private System.Windows.Forms.TextBox txtTOutAutoCheck; private System.Windows.Forms.Button btnMoreTOut; + private System.Windows.Forms.ToolStripMenuItem forceCloseALLToolStripMenuItem; } } diff --git a/IOB-MAN/IOBManPanel.cs b/IOB-MAN/IOBManPanel.cs index 60f0b67a..12c91a6f 100644 --- a/IOB-MAN/IOBManPanel.cs +++ b/IOB-MAN/IOBManPanel.cs @@ -1,3 +1,4 @@ +using AutoUpdaterDotNET; using System; using System.Collections.Generic; using System.Diagnostics; @@ -429,6 +430,8 @@ namespace IOB_MAN private void IOBManPanel_FormClosing(object sender, FormClosingEventArgs e) { closeAllChild(true); + Thread.Sleep(500); + closeAllChild(true); } /// /// Chiude tutti i child @@ -665,12 +668,46 @@ namespace IOB_MAN apriChild(); updateStatus(); } - + /// + /// Ramo applicazione (x update) + /// + protected string branchName = "master"; + /// + /// URL stringa di UPDATE... + /// + protected string updateUrl + { + get + { + return string.Format("http://seriate.steamware.net:8083/SWS/MAPO/IOB-MAN/{0}/manifest.xml", branchName); + } + } private void updateIOBMANToolStripMenuItem_Click(object sender, EventArgs e) { - // FIXME fare come IOB-WIN! + utils.lgInfo($"Avvio procedura controllo update: url: {updateUrl}"); + // avvio controllo + AutoUpdater.ShowSkipButton = false; + AutoUpdater.ShowRemindLaterButton = false; + AutoUpdater.RunUpdateAsAdmin = utils.CRB("AUpdAsAdm"); + AutoUpdater.ReportErrors = false; + AutoUpdater.DownloadPath = @"C:\Steawmare\src\"; + AutoUpdater.ApplicationExitEvent += AutoUpdater_ApplicationExitEvent; + AutoUpdater.Start(updateUrl); } + private void AutoUpdater_ApplicationExitEvent() + { + utils.lgInfo("Chiusura IOB-WIN"); + Thread.Sleep(100); + // chiudo tutto + closeAllChild(true); + Thread.Sleep(1000); + utils.lgInfo("Chiusura Applicazione"); + // attendo 1 sec... + Thread.Sleep(1000); + // ESCO! + Application.Exit(); + } private void updateIOBWINToolStripMenuItem_Click(object sender, EventArgs e) { // chiude tutte @@ -698,6 +735,14 @@ namespace IOB_MAN { } + + private void forceCloseALLToolStripMenuItem_Click(object sender, EventArgs e) + { + // per iscurezza chiudo tutto + closeAllChild(true); + Thread.Sleep(1000); + updateStatus(); + } } } diff --git a/IOB-MAN/packages.config b/IOB-MAN/packages.config index 9c216584..7da2e62d 100644 --- a/IOB-MAN/packages.config +++ b/IOB-MAN/packages.config @@ -1,5 +1,6 @@  + From 99747135cee6e6e3b498561718cc6f809687e03d Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 24 Dec 2019 16:05:52 +0100 Subject: [PATCH 02/11] Alla ripartenza/riavvio PRIMA uccide eventuali processi zoombie --- IOB-MAN/IOB-MAN.csproj | 3 +++ IOB-MAN/IOBManPanel.cs | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/IOB-MAN/IOB-MAN.csproj b/IOB-MAN/IOB-MAN.csproj index fa3df738..86fec7ff 100644 --- a/IOB-MAN/IOB-MAN.csproj +++ b/IOB-MAN/IOB-MAN.csproj @@ -94,6 +94,9 @@ True Resources.resx + + Always + Always diff --git a/IOB-MAN/IOBManPanel.cs b/IOB-MAN/IOBManPanel.cs index 12c91a6f..bd06fc3b 100644 --- a/IOB-MAN/IOBManPanel.cs +++ b/IOB-MAN/IOBManPanel.cs @@ -89,7 +89,9 @@ namespace IOB_MAN utils.lgInfo("Start processi effettuato"); } } - + /// + /// Caricamento configurazione + /// private void loadConfig() { ArgsList.Clear(); @@ -99,6 +101,10 @@ namespace IOB_MAN TargetExe = string.Format(@"{0}\Resources\Test.bat", Application.StartupPath); } utils.lgInfo($"Target exe: {TargetExe}"); + + + + string ArgsString = utils.CRS("ArgsList"); utils.lgInfo($"Args found: {ArgsString}"); if (string.IsNullOrEmpty(ArgsString)) @@ -178,6 +184,10 @@ namespace IOB_MAN /// private void apriChild() { + // preventivamente CHIUDO TUTTO + closeAllChild(true); + Thread.Sleep(250); + // avvio i child foreach (var item in ArgsList) { startChildProc(item); From a31b6308ad29f370261e0a87d2dd61f3e2910d5c Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 24 Dec 2019 17:03:34 +0100 Subject: [PATCH 03/11] update PRELIMINARE jenkinsfile x IOB-MAN --- Jenkinsfile | 46 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5611a643..2ce94cdf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,8 +40,16 @@ pipeline { agent any steps { script { - // compilo installers in base al BRANCH del cliente... - if (env.BRANCH_NAME == "develop") { + // compilo installers in base al BRANCH ... + if(env.BRANCH_NAME == "IobMan") { + // CAMBIO numero versione in file sorgente!!! + bat "e:\\fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0" + // checkout NuGet in file sorgente!!! + fixNuget("${WORKSPACE}\\IOB-WIN.sln") + // BUILD! + bat "\"${tool 'MSBuild-14.0'}\" IOB-MAN/IOB-MAN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /m" + } + else if (env.BRANCH_NAME == "develop") { // CAMBIO numero versione in file sorgente!!! bat "e:\\fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0" // checkout NuGet in file sorgente!!! @@ -65,8 +73,16 @@ pipeline { steps { // in primis compilo a seconda del branch... TUTTO tranne develop... script { + if(env.BRANCH_NAME == "IobMan") { + // CAMBIO numero versione in file sorgente!!! + bat "e:\\fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0" + // checkout NuGet in file sorgente!!! + fixNuget("${WORKSPACE}\\IOB-WIN.sln") + // BUILD! + bat "\"${tool 'MSBuild-14.0'}\" IOB-MAN/IOB-MAN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /m" + } // procedo solo se NON si tratta di commit in ramo DOCUMentazione... - if (env.BRANCH_NAME != "docum") { + else if (env.BRANCH_NAME != "docum") { // CAMBIO numero versione in file sorgente!!! bat "e:\\fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0" // checkout NuGet in file sorgente!!! @@ -81,8 +97,30 @@ pipeline { } // ora mi occupo delle operazioni di compressione e copia... script { + // se è ramo IobMan compilo SOLO IOB-MAN... + if(env.BRANCH_NAME == "IobMan") { + env.classifier = "" + // Compressione in .zip dell'installer... + bat "e:\\7za.exe a -tzip ${WORKSPACE}\\Releases\\${env.BRANCH_NAME}\\IOB-MAN.zip ${WORKSPACE}\\IOB-MAN\\bin\\*" + // ora mi occupo delle operazioni di invio a NEXUS... + nexusArtifactUploader( + nexusVersion: 'nexus3', + protocol: 'http', + nexusUrl: 'http://nexus.steamware.net/', + //groupId: 'IOB-MAN', + version: "${env.versionNumber}", + repository: 'utility', + credentialsId: 'fe387daa-d07c-3207-877e-96c8be1be91b', + artifacts: [ + [artifactId: 'IOB-MAN', + classifier: "${env.classifier}", + file: "Releases\\${env.BRANCH_NAME}\\IOB-MAN.zip", + type: 'zip'] + ] + ) + } // procedo solo se NON si tratta di commit in ramo DOCUMentazione... - if (env.BRANCH_NAME != "docum") { + else if (env.BRANCH_NAME != "docum") { def now = new Date() def anno = now.format("yyyy", TimeZone.getTimeZone('UTC')) // elimino files conf personalizzata per ogni install... From 8ecd6c8810eead4d2d89537500dc34576dfa8431 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 24 Dec 2019 17:04:07 +0100 Subject: [PATCH 04/11] Aggiunta gestione conf da file json... --- IOB-MAN/App.config | 3 ++- IOB-MAN/CONF/.placeholder | 1 + IOB-MAN/CONF/process.json | 1 + IOB-MAN/IOB-MAN.csproj | 6 ++++- IOB-MAN/IOBManPanel.cs | 51 +++++++++++++++++++++++++++++---------- IOB-MAN/packages.config | 1 + 6 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 IOB-MAN/CONF/.placeholder create mode 100644 IOB-MAN/CONF/process.json diff --git a/IOB-MAN/App.config b/IOB-MAN/App.config index 1337de45..2e123514 100644 --- a/IOB-MAN/App.config +++ b/IOB-MAN/App.config @@ -13,6 +13,7 @@ - + + \ No newline at end of file diff --git a/IOB-MAN/CONF/.placeholder b/IOB-MAN/CONF/.placeholder new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/IOB-MAN/CONF/.placeholder @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/IOB-MAN/CONF/process.json b/IOB-MAN/CONF/process.json new file mode 100644 index 00000000..ca0ead80 --- /dev/null +++ b/IOB-MAN/CONF/process.json @@ -0,0 +1 @@ +[ "SIMUL_01", "SIMUL_02", "SIMUL_03", "SIMUL_04" ] \ No newline at end of file diff --git a/IOB-MAN/IOB-MAN.csproj b/IOB-MAN/IOB-MAN.csproj index 86fec7ff..64e5fcf2 100644 --- a/IOB-MAN/IOB-MAN.csproj +++ b/IOB-MAN/IOB-MAN.csproj @@ -44,6 +44,9 @@ ..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll + + ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + ..\packages\NLog.4.6.8\lib\net45\NLog.dll @@ -94,9 +97,10 @@ True Resources.resx - + Always + Always diff --git a/IOB-MAN/IOBManPanel.cs b/IOB-MAN/IOBManPanel.cs index bd06fc3b..7a505aa0 100644 --- a/IOB-MAN/IOBManPanel.cs +++ b/IOB-MAN/IOBManPanel.cs @@ -1,4 +1,5 @@ using AutoUpdaterDotNET; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Diagnostics; @@ -101,29 +102,53 @@ namespace IOB_MAN TargetExe = string.Format(@"{0}\Resources\Test.bat", Application.StartupPath); } utils.lgInfo($"Target exe: {TargetExe}"); + // caricamento configurazione argomenti di avvio processi + loadArgList(); + } - - - - string ArgsString = utils.CRS("ArgsList"); - utils.lgInfo($"Args found: {ArgsString}"); - if (string.IsNullOrEmpty(ArgsString)) + private void loadArgList() + { + // in primis cerco SE ESISTA il file json di configuraizone parametri avvio + string fileName = utils.CRS("ArgsConfFile"); + string jsonFileName = $"{Application.StartupPath}{fileName}"; + // verifico se esista il file richeisto + if (File.Exists(jsonFileName)) { - var rand = new Random(); - // ne creo rand (5-15) di default... - for (int i = 0; i < rand.Next(5, 10); i++) + // leggo il file json + StreamReader reader = new StreamReader(jsonFileName); + string jsonData = reader.ReadToEnd(); + if (!string.IsNullOrEmpty(jsonData)) { - ArgsList.Add("127.0.0.1"); + ArgsList = JsonConvert.DeserializeObject>(jsonData); } } else { - var elenco = ArgsString.Split(','); - foreach (var item in elenco) + // se non lo trovassi --> uso la chaive in web.config e GENERO un nuovo file x prox avvio... + string ArgsString = utils.CRS("ArgsList"); + utils.lgInfo($"Args found: {ArgsString}"); + if (string.IsNullOrEmpty(ArgsString)) { - ArgsList.Add(item); + var rand = new Random(); + // ne creo rand (5-15) di default... + for (int i = 0; i < rand.Next(5, 10); i++) + { + ArgsList.Add("127.0.0.1"); + } } + else + { + var elenco = ArgsString.Split(','); + foreach (var item in elenco) + { + ArgsList.Add(item); + } + } + // serializzo e salvo file! + string jsonData = JsonConvert.SerializeObject(ArgsList); + File.WriteAllText(jsonFileName, jsonData); } + } private void ElencoIOB_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e) diff --git a/IOB-MAN/packages.config b/IOB-MAN/packages.config index 7da2e62d..bab4e106 100644 --- a/IOB-MAN/packages.config +++ b/IOB-MAN/packages.config @@ -3,6 +3,7 @@ + From c3a65a80a1261035a666d403b85ee796194ce408 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 24 Dec 2019 17:08:34 +0100 Subject: [PATCH 05/11] update vers number --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2ce94cdf..eb00c738 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=619']) { + withEnv(['NEXT_BUILD_NUMBER=621']) { // env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO-IOB-WIN' From 6d9fa2b8b82bc9665c568aa94400bb2c9b8d4ed7 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 24 Dec 2019 17:19:13 +0100 Subject: [PATCH 06/11] Update x Fody (MSBuild 16) x IOB-MAN --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index eb00c738..65b51f52 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=621']) { + withEnv(['NEXT_BUILD_NUMBER=623']) { // env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO-IOB-WIN' @@ -47,7 +47,7 @@ pipeline { // checkout NuGet in file sorgente!!! fixNuget("${WORKSPACE}\\IOB-WIN.sln") // BUILD! - bat "\"${tool 'MSBuild-14.0'}\" IOB-MAN/IOB-MAN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /m" + bat "\"${tool 'MSBuild-16.0'}\" IOB-MAN/IOB-MAN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /m" } else if (env.BRANCH_NAME == "develop") { // CAMBIO numero versione in file sorgente!!! @@ -79,7 +79,7 @@ pipeline { // checkout NuGet in file sorgente!!! fixNuget("${WORKSPACE}\\IOB-WIN.sln") // BUILD! - bat "\"${tool 'MSBuild-14.0'}\" IOB-MAN/IOB-MAN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /m" + bat "\"${tool 'MSBuild-16.0'}\" IOB-MAN/IOB-MAN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /m" } // procedo solo se NON si tratta di commit in ramo DOCUMentazione... else if (env.BRANCH_NAME != "docum") { From 7d37c62840721ed6967846af2437f60a66d901f8 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 24 Dec 2019 17:21:45 +0100 Subject: [PATCH 07/11] Tolto robocopy iniziale + commentato nexus uploader --- Jenkinsfile | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 65b51f52..f30c16b5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,11 +12,11 @@ pipeline { /* copio le libs...*/ // step([$class: 'CopyArtifact', fingerprintArtifacts: true, projectName: 'Steamware/SteamWareLib', selector: [$class: 'WorkspaceSelector'], target: '../Steamware/SteamWareLib']) // mirroring directory x SteamWare Libs - bat "robocopy /MIR ..\\..\\SteamWare\\SteamWareLib ..\\SteamWare\\SteamWareLib || EXIT /B 0" + //bat "robocopy /MIR ..\\..\\SteamWare\\SteamWareLib ..\\SteamWare\\SteamWareLib || EXIT /B 0" /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=623']) { + withEnv(['NEXT_BUILD_NUMBER=624']) { // env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO-IOB-WIN' @@ -103,21 +103,21 @@ pipeline { // Compressione in .zip dell'installer... bat "e:\\7za.exe a -tzip ${WORKSPACE}\\Releases\\${env.BRANCH_NAME}\\IOB-MAN.zip ${WORKSPACE}\\IOB-MAN\\bin\\*" // ora mi occupo delle operazioni di invio a NEXUS... - nexusArtifactUploader( - nexusVersion: 'nexus3', - protocol: 'http', - nexusUrl: 'http://nexus.steamware.net/', - //groupId: 'IOB-MAN', - version: "${env.versionNumber}", - repository: 'utility', - credentialsId: 'fe387daa-d07c-3207-877e-96c8be1be91b', - artifacts: [ - [artifactId: 'IOB-MAN', - classifier: "${env.classifier}", - file: "Releases\\${env.BRANCH_NAME}\\IOB-MAN.zip", - type: 'zip'] - ] - ) + // nexusArtifactUploader( + // nexusVersion: 'nexus3', + // protocol: 'http', + // nexusUrl: 'http://nexus.steamware.net/', + // //groupId: 'IOB-MAN', + // version: "${env.versionNumber}", + // repository: 'utility', + // credentialsId: 'fe387daa-d07c-3207-877e-96c8be1be91b', + // artifacts: [ + // [artifactId: 'IOB-MAN', + // classifier: "${env.classifier}", + // file: "Releases\\${env.BRANCH_NAME}\\IOB-MAN.zip", + // type: 'zip'] + // ] + // ) } // procedo solo se NON si tratta di commit in ramo DOCUMentazione... else if (env.BRANCH_NAME != "docum") { From 702bb46213b15ddca6b94d80a91a7206b70aa71f Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 24 Dec 2019 17:27:16 +0100 Subject: [PATCH 08/11] =?UTF-8?q?Rimesso=20nexus=20(sper=C3=B2m!)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f30c16b5..7a1a880b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=624']) { + withEnv(['NEXT_BUILD_NUMBER=625']) { // env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO-IOB-WIN' @@ -103,21 +103,22 @@ pipeline { // Compressione in .zip dell'installer... bat "e:\\7za.exe a -tzip ${WORKSPACE}\\Releases\\${env.BRANCH_NAME}\\IOB-MAN.zip ${WORKSPACE}\\IOB-MAN\\bin\\*" // ora mi occupo delle operazioni di invio a NEXUS... - // nexusArtifactUploader( - // nexusVersion: 'nexus3', - // protocol: 'http', - // nexusUrl: 'http://nexus.steamware.net/', - // //groupId: 'IOB-MAN', - // version: "${env.versionNumber}", - // repository: 'utility', - // credentialsId: 'fe387daa-d07c-3207-877e-96c8be1be91b', - // artifacts: [ - // [artifactId: 'IOB-MAN', - // classifier: "${env.classifier}", - // file: "Releases\\${env.BRANCH_NAME}\\IOB-MAN.zip", - // type: 'zip'] - // ] - // ) + nexusArtifactUploader( + nexusVersion: 'nexus3', + protocol: 'http', + nexusUrl: 'nexus.steamware.net', + //groupId: 'IOB-MAN', + version: "${env.versionNumber}", + repository: 'utility', + // repository: 'SWS', + credentialsId: 'bc9d8e92-4302-3266-817f-7b58501d12d5', + artifacts: [ + [artifactId: 'IOB-MAN', + classifier: "${env.classifier}", + file: "Releases\\${env.BRANCH_NAME}\\IOB-MAN.zip", + type: 'zip'] + ] + ) } // procedo solo se NON si tratta di commit in ramo DOCUMentazione... else if (env.BRANCH_NAME != "docum") { From ab7d44c69e0bee7ac5e45c1f36c5fbfa9ba9b620 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 24 Dec 2019 17:30:34 +0100 Subject: [PATCH 09/11] Test deploy in SWS --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7a1a880b..1390f8cc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -109,8 +109,8 @@ pipeline { nexusUrl: 'nexus.steamware.net', //groupId: 'IOB-MAN', version: "${env.versionNumber}", - repository: 'utility', - // repository: 'SWS', + // repository: 'utility', + repository: 'SWS', credentialsId: 'bc9d8e92-4302-3266-817f-7b58501d12d5', artifacts: [ [artifactId: 'IOB-MAN', From 8657bd5569681c85ddd46585d8a372abca20d806 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 24 Dec 2019 17:32:49 +0100 Subject: [PATCH 10/11] Subfolder nexus --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1390f8cc..189402a8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=625']) { + withEnv(['NEXT_BUILD_NUMBER=626']) { // env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO-IOB-WIN' @@ -107,7 +107,7 @@ pipeline { nexusVersion: 'nexus3', protocol: 'http', nexusUrl: 'nexus.steamware.net', - //groupId: 'IOB-MAN', + groupId: 'MAPO', version: "${env.versionNumber}", // repository: 'utility', repository: 'SWS', From 4f27810291fd72279f591788c5154838c3c436e8 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 24 Dec 2019 17:40:32 +0100 Subject: [PATCH 11/11] Cambio Version --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 189402a8..bcd4af74 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=626']) { + withEnv(['NEXT_BUILD_NUMBER=627']) { // env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO-IOB-WIN' @@ -108,9 +108,9 @@ pipeline { protocol: 'http', nexusUrl: 'nexus.steamware.net', groupId: 'MAPO', - version: "${env.versionNumber}", - // repository: 'utility', - repository: 'SWS', + //version: "${env.versionNumber}", + repository: 'utility', + // repository: 'SWS', credentialsId: 'bc9d8e92-4302-3266-817f-7b58501d12d5', artifacts: [ [artifactId: 'IOB-MAN',