diff --git a/IOB-WIN-FORM/AdapterForm.Designer.cs b/IOB-WIN-FORM/AdapterForm.Designer.cs
index 79df7326..05bfe084 100644
--- a/IOB-WIN-FORM/AdapterForm.Designer.cs
+++ b/IOB-WIN-FORM/AdapterForm.Designer.cs
@@ -1077,7 +1077,7 @@
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "AdapterForm";
- this.Text = "IOB-WIN-NEXT";
+ this.Text = "IOB-WIN-FORM";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
this.Shown += new System.EventHandler(this.MainForm_Shown);
this.Resize += new System.EventHandler(this.MainForm_Resize);
diff --git a/IOB-WIN-FORM/MainForm.Designer.cs b/IOB-WIN-FORM/MainForm.Designer.cs
index 38122bb0..5f0d1013 100644
--- a/IOB-WIN-FORM/MainForm.Designer.cs
+++ b/IOB-WIN-FORM/MainForm.Designer.cs
@@ -257,7 +257,7 @@
// notifyIcon1
//
this.notifyIcon1.ContextMenuStrip = this.trayMenu;
- this.notifyIcon1.Text = "IOB-WIN-NEXT";
+ this.notifyIcon1.Text = "IOB-WIN-FORM";
this.notifyIcon1.Visible = true;
this.notifyIcon1.DoubleClick += new System.EventHandler(this.notifyIcon1_DoubleClick);
//
@@ -280,7 +280,7 @@
this.MainMenuStrip = this.menuStrip1;
this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "MainForm";
- this.Text = "IOB WIN 2025";
+ this.Text = "IOB WIN MAIN FORM";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
this.Shown += new System.EventHandler(this.MainForm_Shown);
this.Resize += new System.EventHandler(this.MainForm_Resize);
diff --git a/IOB-WIN-FORM/MainForm.cs b/IOB-WIN-FORM/MainForm.cs
index 27df6d2b..4a0d4cb4 100644
--- a/IOB-WIN-FORM/MainForm.cs
+++ b/IOB-WIN-FORM/MainForm.cs
@@ -494,6 +494,11 @@ namespace IOB_WIN_FORM
}
}
+ ///
+ /// Nome applicazione (da app.config)
+ ///
+ private string nomeApp = "";
+
protected void myInit()
{
DateTime adesso = DateTime.Now;
@@ -503,7 +508,7 @@ namespace IOB_WIN_FORM
lblStatus.Text = "Loading";
// fix versione e nome APP!
- string nomeApp = $"{ConfigurationManager.AppSettings.Get("appName")}";
+ nomeApp = $"{ConfigurationManager.AppSettings.Get("appName")}";
string versione = $" v.{System.Reflection.Assembly.GetExecutingAssembly().GetName().Version}";
// fix icon!
@@ -577,7 +582,7 @@ namespace IOB_WIN_FORM
}
catch (Exception exc)
{
- lgError(string.Format("MainForm myInit EXCEPTION in fase di chiamata URL di reboot:{0}{1}{2}", urlReboot, Environment.NewLine, exc));
+ lgError($"MainForm myInit EXCEPTION in fase di chiamata URL di reboot:{urlReboot}{Environment.NewLine}{exc}");
}
displayTaskAndLog("Main Form OK");
}
@@ -832,12 +837,12 @@ namespace IOB_WIN_FORM
// SE permessa massimizzazione...
if (utils.CRB("windowCanMax"))
{
- trayMenu.Items.Add("Show IOB-WIN-NEXT");
+ trayMenu.Items.Add($"Show {nomeApp} App");
}
// se è permesso tray close...
if (utils.CRB("trayClose"))
{
- trayMenu.Items.Add("Close IOB-WIN-NEXT");
+ trayMenu.Items.Add($"Close {nomeApp} App");
}
}
diff --git a/IOB-WIN-PING/IOB-WIN-PING.csproj b/IOB-WIN-PING/IOB-WIN-PING.csproj
index c1a63604..d56536fb 100644
--- a/IOB-WIN-PING/IOB-WIN-PING.csproj
+++ b/IOB-WIN-PING/IOB-WIN-PING.csproj
@@ -34,6 +34,15 @@
prompt
4
+
+ true
+ bin\Remote_DEBUG\
+ DEBUG;TRACE
+ full
+ x86
+ 7.3
+ prompt
+
..\packages\MapoSDK.6.14.2411.518\lib\MapoSDK.dll
@@ -124,13 +133,20 @@
True
Resources.resx
+ True
+
+ Always
+
+
App.config
+ True
PreserveNewest
App.config
+ True
PreserveNewest
@@ -191,6 +207,7 @@
Designer
+ true
PreserveNewest
diff --git a/IOB-WIN-PING/index.md b/IOB-WIN-PING/index.md
index 190867da..fdb4be99 100644
--- a/IOB-WIN-PING/index.md
+++ b/IOB-WIN-PING/index.md
@@ -1,6 +1,6 @@
-# IOB-WIN-NEXT
+# IOB-WIN-PING
-Documentazione relativa all'applicativo IOB-WIN-NEXT
+Documentazione relativa all'applicativo IOB-WIN-PING
## Articles
diff --git a/IOB-WIN-PING/index.pdf b/IOB-WIN-PING/index.pdf
index 4ce60519..8f7e09ef 100644
Binary files a/IOB-WIN-PING/index.pdf and b/IOB-WIN-PING/index.pdf differ
diff --git a/IOB-WIN-WPS/DATA/DAT/PersistData.dat b/IOB-WIN-WPS/DATA/DAT/PersistData.dat
deleted file mode 100644
index 5f282702..00000000
--- a/IOB-WIN-WPS/DATA/DAT/PersistData.dat
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/IOB-WIN-WPS/DATA/DAT/SimData.dat b/IOB-WIN-WPS/DATA/DAT/SimData.dat
deleted file mode 100644
index c59e4823..00000000
--- a/IOB-WIN-WPS/DATA/DAT/SimData.dat
+++ /dev/null
@@ -1,959 +0,0 @@
-;------------------------------------------------------------------------------------
-; filevalori simulati x provare sistema dati e filtraggio... commenti iniziano per ';', valori formato data#valore#counter
-; NOTE FILE:
-; - bit come macchine std IOB
-; B0 = POWERON
-; B1 = RUN
-; B2 = CONTAPEZZO
-; B3 = ALLARME
-; B4 = MANUALE
-; B5 = NA
-; B6 = NA
-; B7 = NA
-; - segnali alternanti su 00011100
-;------------------------------------------------------------------------------------
-;
-;----------------------------
-; inizio da spenta
-0
-0
-; indico accesa
-1
-1
-1
-; allarme (BLINK)
-9
-9
-9
-9
-9
-1
-1
-1
-1
-1
-1
-9
-9
-9
-9
-9
-1
-1
-1
-1
-1
-19
-9
-9
-9
-9
-1
-1
-1
-1
-1
-1
-; allarme manuale (2 blink, periodo diverso)
-25
-25
-17
-17
-9
-9
-1
-1
-25
-25
-17
-17
-9
-9
-1
-1
-25
-25
-17
-17
-9
-9
-1
-1
-25
-25
-17
-17
-9
-9
-1
-1
-25
-25
-17
-17
-9
-9
-1
-1
-; indico manuale
-17
-17
-17
-17
-17
-17
-17
-17
-17
-17
-1
-1
-1
-1
-1
-1
-1
-1
-17
-17
-17
-17
-17
-17
-17
-17
-17
-17
-1
-1
-1
-1
-1
-1
-1
-1
-17
-17
-17
-17
-17
-17
-17
-17
-17
-17
-1
-1
-1
-1
-1
-1
-1
-1
-; RUN!
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-; contapezzo
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-; RUN
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-; contapezzo
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-; RUN
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-; contapezzo
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-; RUN
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-; allarme (BLINK)
-9
-9
-9
-9
-9
-1
-1
-1
-1
-1
-1
-9
-9
-9
-9
-9
-1
-1
-1
-1
-1
-19
-9
-9
-9
-9
-1
-1
-1
-1
-1
-1
-; allarme manuale (2 blink, periodo diverso)
-25
-25
-17
-17
-9
-9
-1
-1
-25
-25
-17
-17
-9
-9
-1
-1
-25
-25
-17
-17
-9
-9
-1
-1
-25
-25
-17
-17
-9
-9
-1
-1
-25
-25
-17
-17
-9
-9
-1
-1
-; indico manuale
-17
-17
-17
-17
-17
-17
-17
-17
-17
-17
-1
-1
-1
-1
-1
-1
-1
-1
-17
-17
-17
-17
-17
-17
-17
-17
-17
-17
-1
-1
-1
-1
-1
-1
-1
-1
-17
-17
-17
-17
-17
-17
-17
-17
-17
-17
-1
-1
-1
-1
-1
-1
-1
-1
-; RUN!
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-; contapezzo
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-; RUN
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-; contapezzo
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-7
-7
-7
-7
-7
-3
-3
-3
-3
-3
-3
-; RUN
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
\ No newline at end of file
diff --git a/IOB-WIN-WPS/IOB-WIN-WPS.csproj b/IOB-WIN-WPS/IOB-WIN-WPS.csproj
index fe0a770e..f77abf8c 100644
--- a/IOB-WIN-WPS/IOB-WIN-WPS.csproj
+++ b/IOB-WIN-WPS/IOB-WIN-WPS.csproj
@@ -11,25 +11,9 @@
v4.6.2
512
true
+ true
- false
-
-
- publish\
- true
- Disk
- false
- Foreground
- 7
- Days
- false
- false
- true
- 0
- 1.0.0.%2a
- false
- true
x86
@@ -40,7 +24,6 @@
DEBUG;TRACE
prompt
4
- false
AnyCPU
@@ -50,27 +33,6 @@
TRACE
prompt
4
- false
-
-
- true
- bin\x86\Debug\
- DEBUG;TRACE
- full
- x86
- prompt
- MinimumRecommendedRules.ruleset
- false
-
-
- bin\x86\Release\
- TRACE
- true
- pdbonly
- x86
- prompt
- MinimumRecommendedRules.ruleset
- false
true
@@ -81,16 +43,6 @@
7.3
prompt
-
- true
- bin\x86\Remote_DEBUG\
- DEBUG;TRACE
- full
- x86
- 7.3
- prompt
- MinimumRecommendedRules.ruleset
-
..\packages\MapoSDK.6.14.2411.518\lib\MapoSDK.dll
@@ -156,7 +108,6 @@
Always
-
Always
@@ -189,12 +140,12 @@
- app.config
+ App.config
True
PreserveNewest
- app.config
+ App.config
True
PreserveNewest
@@ -227,12 +178,6 @@
Always
-
- Always
-
-
- Always
-
Always
@@ -253,7 +198,7 @@
-
+
Designer
true
PreserveNewest
diff --git a/IOB-WIN-WPS/MainFormNext.cs b/IOB-WIN-WPS/MainFormNext.cs
index e8a2b4db..bbab0792 100644
--- a/IOB-WIN-WPS/MainFormNext.cs
+++ b/IOB-WIN-WPS/MainFormNext.cs
@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Windows.Markup;
namespace IOB_WIN_WPS
{
diff --git a/IOB-WIN-WPS/Properties/AssemblyInfo.cs b/IOB-WIN-WPS/Properties/AssemblyInfo.cs
index a942cac6..18303bb0 100644
--- a/IOB-WIN-WPS/Properties/AssemblyInfo.cs
+++ b/IOB-WIN-WPS/Properties/AssemblyInfo.cs
@@ -5,10 +5,10 @@ using System.Runtime.InteropServices;
// Le informazioni generali relative a un assembly sono controllate dal seguente
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
// associate a un assembly.
-[assembly: AssemblyTitle("IOB-WIN-NEXT")]
+[assembly: AssemblyTitle("IOB-WIN-WPS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyProduct("IOB-WIN-NEXT")]
+[assembly: AssemblyProduct("IOB-WIN-WPS")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -18,5 +18,5 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
// Se il progetto viene esposto a COM, il GUID seguente verrà utilizzato come ID della libreria dei tipi
-[assembly: Guid("adcb8028-79c4-4896-a9a7-e3c5140fc00b")]
+[assembly: Guid("1636aeb4-9932-48fd-88b4-001133c38ff7")]
diff --git a/IOB-WIN-WPS/Readme/ToDo.txt b/IOB-WIN-WPS/Readme/ToDo.txt
deleted file mode 100644
index 161ff489..00000000
--- a/IOB-WIN-WPS/Readme/ToDo.txt
+++ /dev/null
@@ -1,61 +0,0 @@
--------------------------------------
-- 2017.10.19
--------------------------------------
-OK - da testare ora invio URL a MoonPro
-OK - ALIVE
-OK - ENABLED
-OK - INPUT
-OK - FARE lettura VERA da FANUC almeno della bitmap
-OK - fare gestione come rPI-IOB, ovvero
-OK - gestione QUEUE eventi
-OK - salvataggio su file dello storico eventi rilevati
-OK - gestione dei segnali ballerini (BITMASK!)
-OK - gestione contapezzi CUSTOM
- - fare gestione configurabile lettura FANUC
-OK - gestione dati G43
-OK - togliere dati F (E0 | 90)
- - fare integrazione ALTRI varori FANUC, tra cui
- - allarmi
-OK - load/speed
-OK - overrides (G12, G30)
-
-OK - nuovo metodo chiamata x MP/IO (che dovrà avere nuovo comando x accettare queste chiamate e salvare su tabella SENZA processing, come eventi o come extra... evento NOTA?)
- - verificare segnali: (vedi doc gsheet)
- - F001.0: ALARM_PRESENT
- - F001.7: CN_READY / POWER_ON
- - STL000.5: AUTO (vers 1)
- - STL000.7: AUTO (vers 2)
-- Cambiare ordine valutazione eventi frequenza VLF-->VHF
-- Azzerare I contatori quanto si arriva al più lento (quando si azzera lui ripartono comunque tutti...) -> in questo modo scatta un contatore QUANDO GENERAL_COUNTER MOD periodo_Ccntatore == 0
-- rendere parametrica l'assegnazione delle funzioni al diverso ambito frequenza tra i 5 (VHF, HF, NF, LF, VLF)
-- procedura x gestione dati REALTIME (da NON salvare su db ma al limite su REDIS, simil EQN con 2 tab x eliminare dati scaduti)
-
-OK FINIRE SISTEMAZIONE JETCO:
-OK - install servers
-OK - install DB
-OK - conf acquisitore togliendo parti abbozzate x contapezzi/fineciclo
-OK - part program name MAIN con nuova funzione
-
-CREARE NUOVO SW (o configurazione? o ramo alternativo a develop?) x mapping INIZIALE della macchina... ad esempio
- - si collega a ns server
- - chiede cosa deve fare (es mappa memorie D da 0 a 9999)
- - effettua testing e poi fa upload risultati
- - il ns sw fa i check/controlli modifica
-in questo modo ad esmepio possiamo cercare i contapezzi, i segnali ceh cambiano con il fineciclo nelle aree Y, i contatori STANDARD nelle memorie D, ...
-
-
-GESTIONE LIVE DATA
-L'idea è ceh quando una macchina è "sotto osservazione" ovvero live viene aperta pagina questa debba inviare PIU' DATI di tipo realtime e mostrarli nel browser. Per farlo ci saranno questi elementi
-- si apre una pagina di dettaglio macchina (da tablet? da SITE principale?)
-- questo causa la modifica di una chiave su DB (e/o redis) di stato macchina, del tipo "OnAir=true", e potrebbe essere una chiave a tempo (30 sec poi scade?) e mentre la pagina è aperta e si aggiorna (ogni 1-2 sec oppure Signal-R) questo valore viene confermato (e prorigato)
-- ogni IOB-WIN fa una chiamata "extra" all'URL dedicato al checl "OnAir", e se trova che è abilitato passa in modalità letture frequenti (1/2 al sec?) dei parametri LIVE (es: feed, speed, posizioni assi, load istantanei)
-- se passa inq eusta modalità live invia DI CONTINUO il dato al server IO
-- il server IO salva SU REDIS questi valori sia come "lastVal" che come serie storica
-- le pagine che mostrano i dati si continuano ad aggiornare (da redis) con grafici (chartJs come PIC) e/o valori istantanei
-- le serie storiche vengono ripulite periodicamente (ogni ora? valori + vecchi di 24h ad esempio?)
-- struttura dati REDIS da creare SIMILE a struttura info URL...
-- struttura dati LIVE: ../LIVE/COD_MACC/CURR_VAL (contiene TUTTI i dati LIVE, ultimi ricevuti...)
-- struttura dati TimeSeries: ../LIVE/COD_MACC/DATA_NAME (contiene TUTTI i dati come timeseries, es SPEEDRATE, FEEDRATE, POS_X1, POS_X2, ...)
-- operazione SAVE aggiorna SURR e accoda NUOVO valore...
-- LOAD (rilettura9 POTREBBE fare pulizia se + vecchi di 24h...)
-- la trasmissione verso IO deve avvenire con "multisend, nel
\ No newline at end of file
diff --git a/IOB-WIN-WPS/articles/intro.md b/IOB-WIN-WPS/articles/intro.md
index 61665336..48dedfd0 100644
--- a/IOB-WIN-WPS/articles/intro.md
+++ b/IOB-WIN-WPS/articles/intro.md
@@ -1,4 +1,4 @@
-# Logica di funzionamento IOB-WIN-NEXT:
+# Logica di funzionamento IOB-WIN-WPS:
L'applicativo si occupa di dialogare con i diversi PLC/CNC utyilizzando diverse librerie di funzionamento, tra proprietarie (focas, s7net, OSAI...) che pubbliche (ModBus, MTConnet, OPC-UA).
\ No newline at end of file
diff --git a/IOB-WIN-WPS/articles/intro.pdf b/IOB-WIN-WPS/articles/intro.pdf
deleted file mode 100644
index 26f93d40..00000000
Binary files a/IOB-WIN-WPS/articles/intro.pdf and /dev/null differ
diff --git a/IOB-WIN-WPS/index.md b/IOB-WIN-WPS/index.md
index 190867da..56cdde4a 100644
--- a/IOB-WIN-WPS/index.md
+++ b/IOB-WIN-WPS/index.md
@@ -1,6 +1,6 @@
-# IOB-WIN-NEXT
+# IOB-WIN-WPS
-Documentazione relativa all'applicativo IOB-WIN-NEXT
+Documentazione relativa all'applicativo IOB-WIN-WPS
## Articles
diff --git a/IOB-WIN-WPS/index.pdf b/IOB-WIN-WPS/index.pdf
deleted file mode 100644
index 4ce60519..00000000
Binary files a/IOB-WIN-WPS/index.pdf and /dev/null differ
diff --git a/Jenkinsfile b/Jenkinsfile
deleted file mode 100644
index 18bd41f4..00000000
--- a/Jenkinsfile
+++ /dev/null
@@ -1,270 +0,0 @@
-pipeline {
- agent none
- environment {
- EMAIL_RECIPIENTS = 'samuele@steamware.net'
- }
- stages {
- stage('Checkout') {
- agent any
- steps {
- /* calcolo numero versione... diverso x branch MASTER/DEVELOP */
- script {
- env.versionNumber = VersionNumber(versionNumberString : '3.5.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILD_DATE_FORMATTED, "ddHH"}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
- env.APP_NAME = 'MAPO-IOB-WIN'
- }
- script {
- currentBuild.displayName = "${env.versionNumber}"
- if (env.BRANCH_NAME == "master") {
- currentBuild.description = "BUILD ${env.versionNumber}"
- }
- else {
- currentBuild.description = "TEST ${env.versionNumber}"
- }
- }
- /* CAMBIO numero versione in file sorgente!!! */
- bat "e:\\fart.exe VersGen\\VersGen.cs 0.0.0.0 ${env.versionNumber} || EXIT /B 0"
- }
- }
- stage('Build') {
- agent any
- steps {
- // fix vers numb + pacchetti nuget
- script {
- // CAMBIO numero versione in file sorgente!!!
- bat "e:\\fart.exe VersGen\\VersGen.cs 0.0.0.0 ${env.versionNumber} || EXIT /B 0"
- // checkout NuGet in file sorgente!!!
- fixNuget("${WORKSPACE}\\IOB-MAN.sln")
- fixNuget("${WORKSPACE}\\IOB-WIN-NEXT.sln")
- }
- script {
- if (env.BRANCH_NAME == "develop") {
- parallel (
- IOB_WIN: {
- // BUILD!
- bat "\"${tool 'MSBuild-16.0'}\" IOB-MAN/IOB-MAN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /verbosity:minimal /m"
- bat "\"${tool 'MSBuild-16.0'}\" IOB-WIN-NEXT/IOB-WIN-NEXT.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /verbosity:minimal /m"
- },
- // IOB_MAN: {
- // // BUILD!
- // bat "\"${tool 'MSBuild-16.0'}\" IOB-MAN/IOB-MAN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /verbosity:minimal /m"
- // },
- failFast: false
- )
- }
- else {
- echo 'NON faccio test di Build se non per BRANCH develop'
- }
- }
- }
- }
- stage('Test') {
- steps {
- echo 'Testing.. 2 be done...'
- }
- }
- stage('Deploy') {
- agent any
- steps {
- // fix vers numb + pacchetti nuget
- script {
- // CAMBIO numero versione in file sorgente!!!
- bat "e:\\fart.exe VersGen\\VersGen.cs 0.0.0.0 ${env.versionNumber} || EXIT /B 0"
- // checkout NuGet in file sorgente!!!
- fixNuget("${WORKSPACE}\\IOB-MAN.sln")
- fixNuget("${WORKSPACE}\\IOB-WIN-NEXT.sln")
- }
- // a seconda del branch decido cosa e come compilare e caricare...
- script {
- if(env.BRANCH_NAME == "IobMan") {
- // BUILD!
- bat "\"${tool 'MSBuild-16.0'}\" IOB-MAN/IOB-MAN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /verbosity:minimal /m"
- }
- // procedo solo se NON si tratta di commit in ramo DOCUMentazione...
- else if (env.BRANCH_NAME == "develop" || env.BRANCH_NAME.contains("master") ) {
- // BUILD!
- bat "\"${tool 'MSBuild-16.0'}\" IOB-MAN/IOB-MAN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /verbosity:minimal /m"
- bat "\"${tool 'MSBuild-16.0'}\" IOB-WIN-NEXT/IOB-WIN-NEXT.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /verbosity:minimal /m"
- }
- else
- {
- echo 'Nessun Deploy necessario'
- }
- }
- // ora mi occupo delle operazioni di compressione e copia...
- script {
- // // se è ramo IobMan compilo SOLO IOB-MAN...
- // if(env.BRANCH_NAME == "IobMan") {
- // env.classifier = ""
- // // rimuovo vecchio zip...
- // bat "del /f ${WORKSPACE}\\Releases\\${env.BRANCH_NAME}\\*.zip || EXIT /B 0"
- // // Compressione in .zip dell'installer...
- // bat "e:\\7za.exe a -tzip ${WORKSPACE}\\Releases\\${env.BRANCH_NAME}\\MAPO-IOB-MAN.zip ${WORKSPACE}\\IOB-MAN\\bin\\*"
- // // ora mi occupo delle operazioni di invio a NEXUS...
- // nexusArtifactUploader(
- // nexusVersion: 'nexus3',
- // protocol: 'https',
- // nexusUrl: 'nexus.steamware.net',
- // groupId: 'MAPO',
- // //version: "${env.versionNumber}",
- // version: "stable",
- // repository: 'utility',
- // credentialsId: 'bc9d8e92-4302-3266-817f-7b58501d12d5',
- // artifacts: [
- // [artifactId: 'IOB-MAN',
- // classifier: "${env.classifier}",
- // file: "Releases\\${env.BRANCH_NAME}\\MAPO-IOB-MAN.zip",
- // type: 'zip']
- // ]
- // )
- // }
- // ...
- // else if (env.BRANCH_NAME == "develop" || env.BRANCH_NAME.contains("master") || env.BRANCH_NAME.contains("feature") ) {
- if (env.BRANCH_NAME == "develop" || env.BRANCH_NAME.contains("master") ) {
- fixResources("IOB-MAN")
- fixResources("IOB-WIN-NEXT")
-
- // elimino vecchio zip...
- bat "RD /S /Q Releases\\${env.BRANCH_NAME}\\ || EXIT /B 0"
-
- compressZip("IOB-MAN")
- compressZip("IOB-WIN-NEXT")
-
- // fix classificazione x develop/master...
- if (env.BRANCH_NAME == "develop")
- {
- // env.classifier = "unstable"
- env.version = "unstable"
- }
- else
- {
- // env.classifier = ""
- env.version = "stable"
- }
- // ora mi occupo delle operazioni di invio a NEXUS...
- nexusArtifactUploader(
- nexusVersion: 'nexus3',
- protocol: 'https',
- nexusUrl: 'nexus.steamware.net',
- groupId: 'MAPO',
- //version: "${env.versionNumber}",
- version: "${env.version}",
- repository: 'utility',
- credentialsId: 'bc9d8e92-4302-3266-817f-7b58501d12d5',
- artifacts: [
- // [artifactId: 'IOB-WIN',
- // classifier: "",
- // // classifier: "${env.classifier}",
- // file: "Releases\\${env.BRANCH_NAME}\\MAPO-IOB-WIN.zip",
- // type: 'zip'],
- [artifactId: 'IOB-MAN',
- classifier: "${env.classifier}",
- file: "Releases\\${env.BRANCH_NAME}\\MAPO-IOB-MAN.zip",
- type: 'zip'],
- [artifactId: 'IOB-WIN-NEXT',
- classifier: "",
- // classifier: "${env.classifier}",
- file: "Releases\\${env.BRANCH_NAME}\\MAPO-IOB-WIN-NEXT.zip",
- type: 'zip']
- ]
- )
- }
- else
- {
- echo 'Nessuna compressione+copia post deploy'
- }
- }
- }
- }
- }
- post {
- success {
- sendSlack("Successful", "good")
- }
- failure {
- sendSlack("Failed", "danger")
- }
- unstable {
- sendSlack("Unstable", "warning")
- }
- }
-}
-
-@NonCPS
-def getChangeString() {
- MAX_MSG_LEN = 100
- def changeString = ""
-
- echo "Gathering SCM changes"
- def changeLogSets = currentBuild.changeSets
- for (int i = 0; i < changeLogSets.size(); i++) {
- def entries = changeLogSets[i].items
- for (int j = 0; j < entries.length; j++) {
- def entry = entries[j]
- truncated_msg = entry.msg.take(MAX_MSG_LEN)
- changeString += " - ${truncated_msg} [${entry.author}]\n"
- }
- }
-
- if (!changeString) {
- changeString = " - Nessuna Modifica"
- }
- return changeString
-}
-
-def fixResources(basePath){
- echo "Start fixResources for ${basePath}"
- def now = new Date()
- def anno = now.format("yyyy", TimeZone.getTimeZone('UTC'))
-
- // elimino files conf personalizzata per ogni install...
- bat "RD /S /Q ${basePath}\\bin\\DATA || EXIT /B 0"
- // manifest.xml: aggiorno versNumber ed URL del branch di update...
- bat "e:\\fart.exe ${basePath}\\Resources\\manifest.xml 0.0.0.0 ${env.versionNumber} || EXIT /B 0"
- bat "e:\\fart.exe ${basePath}\\Resources\\manifest.xml {{BRANCHNAME}} ${env.BRANCH_NAME} || EXIT /B 0"
- bat "e:\\fart.exe ${basePath}\\Resources\\ChangeLog.html {{CURRENT-REL}} ${env.versionNumber} || EXIT /B 0"
- bat "e:\\fart.exe ${basePath}\\Resources\\ChangeLog.html {{CURR-YEAR}} ${anno} || EXIT /B 0"
-
- // // copio ed esporto in IIS02 i vari files .xml, .html, .zip
- // powershell "(Get-Content ${basePath}\\Resources\\ChangeLog.html) | ForEach-Object { $_ -replace \"{{LAST-CHANGES}}\", \"${getChangeString()}\" } | Set-Content ${basePath}\\Resources\\ChangeLog.html"
-
- bat "xcopy /y ${basePath}\\Resources\\manifest.xml c:\\inetpub\\wwwroot\\SWS\\MAPO\\${basePath}\\${env.BRANCH_NAME}\\ "
- bat "xcopy /y ${basePath}\\Resources\\ChangeLog.html c:\\inetpub\\wwwroot\\SWS\\MAPO\\${basePath}\\${env.BRANCH_NAME}\\ "
- bat "xcopy /y ${basePath}\\Resources\\logoSteamware.png c:\\inetpub\\wwwroot\\SWS\\MAPO\\${basePath}\\${env.BRANCH_NAME}\\ "
-
- // elimino files inutili di resources e pubblico
- bat "RD /S /Q ${basePath}\\Resources || EXIT /B 0"
-}
-
-def compressZip(basePath){
- // Compressione in .zip dell'installer...
- bat "e:\\7za.exe a -tzip ${WORKSPACE}\\Releases\\${env.BRANCH_NAME}\\MAPO-${basePath}.zip ${WORKSPACE}\\${basePath}\\bin\\*"
- // salvo copia della versione in staging...
- bat "xcopy /y Releases\\${env.BRANCH_NAME}\\MAPO-${basePath}.zip E:\\Staging\\byProd\\MP\\${env.BRANCH_NAME}\\${basePath}\\${env.versionNumber}\\ "
- // copio in area WebDeploy
- bat "xcopy /y Releases\\${env.BRANCH_NAME}\\MAPO-${basePath}.zip c:\\inetpub\\wwwroot\\SWS\\MAPO\\${basePath}\\${env.BRANCH_NAME}\\ "
-}
-
-// Funzione x invio slack
-def sendSlack(status, colorCode) {
- slackSend (
- color: colorCode,
- channel: "#mapo-dev",
- message: "${env.JOB_NAME} ${env.versionNumber} | " + status + ": Build ${env.BUILD_NUMBER}\n\n" +
- "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 https://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 https://nexus.steamware.net/repository/nuget-group -username \"nugetUser\" -password \"viaDante16\""
- }
- else
- {
- bat "e:\\nuget sources Update -Name \"Steamware Nexus\" -Source https://nexus.steamware.net/repository/nuget-group -username \"nugetUser\" -password \"viaDante16\""
- }
- bat "e:\\nuget.exe restore ${solutionFile}"
-}
\ No newline at end of file