Nuovo step x pubblicare ANCHE su nexus gli zip di IobWin

This commit is contained in:
Samuele E. Locatelli
2020-02-05 12:00:14 +01:00
parent ff00d0cb12
commit f94184c832
Vendored
+28 -9
View File
@@ -9,7 +9,7 @@ pipeline {
steps {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=663']) {
withEnv(['NEXT_BUILD_NUMBER=664']) {
// 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'
@@ -77,19 +77,11 @@ pipeline {
// a seconda del branch decido cosa e come compilare e caricare...
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-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 == "develop" || env.BRANCH_NAME.contains("master") ) {
// // 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-16.0'}\" IOB-WIN/IOB-WIN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /m"
}
@@ -156,6 +148,33 @@ pipeline {
bat "xcopy /y Releases\\${env.BRANCH_NAME}\\MAPO-IOB-WIN.zip E:\\Staging\\byProd\\MP\\${env.BRANCH_NAME}\\IOB-WIN\\${env.versionNumber}\\ "
// copio in area WebDeploy
bat "xcopy /y Releases\\${env.BRANCH_NAME}\\MAPO-IOB-WIN.zip c:\\inetpub\\wwwroot\\SWS\\MAPO\\IOB-WIN\\${env.BRANCH_NAME}\\ "
// fix classificazione x develop/master...
if (env.BRANCH_NAME == "develop")
{
env.classifier = "unstable"
}
else
{
env.classifier = ""
}
// ora mi occupo delle operazioni di invio a NEXUS...
nexusArtifactUploader(
nexusVersion: 'nexus3',
protocol: 'http',
nexusUrl: 'nexus.steamware.net',
groupId: 'MAPO',
//version: "${env.versionNumber}",
version: "stable",
repository: 'utility',
credentialsId: 'bc9d8e92-4302-3266-817f-7b58501d12d5',
artifacts: [
[artifactId: 'IOB-WIN',
classifier: "${env.classifier}",
file: "Releases\\${env.BRANCH_NAME}\\MAPO-IOB-WIN.zip",
type: 'zip']
]
)
}
else
{