124 lines
8.4 KiB
Groovy
124 lines
8.4 KiB
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Checkout') {
|
|
steps {
|
|
/* build delle SteamWare libs! */
|
|
/* build 'SteamWare/SteamWareLib'*/
|
|
/* copio le libs...*/
|
|
step([$class: 'CopyArtifact', fingerprintArtifacts: true, projectName: 'Steamware/SteamWareLib', selector: [$class: 'WorkspaceSelector'], target: '../Steamware/SteamWareLib'])
|
|
|
|
/* ora il progetto vero e proprio... */
|
|
/*checkout scm*/
|
|
/*echo 'Checkout Git'*/
|
|
script {
|
|
withEnv(['NEXT_BUILD_NUMBER=4027']) {
|
|
env.versionNumber = VersionNumber(versionNumberString : '${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, versionPrefix: '2.4.')
|
|
/*env.versionNumber = VersionNumber(versionNumberString : '${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, versionPrefix: '2.4.', overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')*/
|
|
}
|
|
}
|
|
echo "${env.BUILD_ID}"
|
|
echo "${env.versionNumber}"
|
|
}
|
|
}
|
|
stage('Build') {
|
|
steps {
|
|
parallel (
|
|
HOME: {
|
|
echo 'Build HOME Release'
|
|
bat "\"${tool 'MSBuild-14.0'}\" HOME\\HOME.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:ProductVersion=${env.versionNumber} /p:OutputPath=bin/ /m"
|
|
},
|
|
ADMIN: {
|
|
sleep 0
|
|
echo 'Build ADMIN Release'
|
|
bat "\"${tool 'MSBuild-14.0'}\" GPW_Admin\\GPW_Admin.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:ProductVersion=${env.versionNumber} /p:OutputPath=bin/ /m"
|
|
},
|
|
/*BARCODE: {
|
|
sleep 1
|
|
echo 'Build BARCODE Release'
|
|
bat "\"${tool 'MSBuild-14.0'}\" GPW_Barcode\\GPW_Barcode.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:ProductVersion=${env.versionNumber} /p:OutputPath=bin/ /m"
|
|
},
|
|
SMART: {
|
|
sleep 2
|
|
echo 'Build SMART Release'
|
|
bat "\"${tool 'MSBuild-14.0'}\" GPW_Smart\\GPW_Smart.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:ProductVersion=${env.versionNumber} /p:OutputPath=bin/ /m"
|
|
},
|
|
COMMESSE: {
|
|
sleep 3
|
|
echo 'Build COMMESSE Release'
|
|
bat "\"${tool 'MSBuild-14.0'}\" GPW_Commesse\\GPW_Commesse.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:ProductVersion=${env.versionNumber} /p:OutputPath=bin/ /m"
|
|
},*/
|
|
failFast: false)
|
|
}
|
|
}
|
|
stage('Test') {
|
|
steps {
|
|
echo 'Testing.. 2 be done...'
|
|
}
|
|
}
|
|
stage('Deploy') {
|
|
steps {
|
|
parallel (
|
|
/*HOME_IIS01_IIS02: {
|
|
echo 'DEPLOY HOME IIS01/IIS02'
|
|
bat "\"${tool 'MSBuild-14.0'}\" HOME\\HOME.csproj /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=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:ProductVersion=${env.versionNumber} /m"
|
|
bat "\"${tool 'MSBuild-14.0'}\" HOME\\HOME.csproj /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=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:ProductVersion=${env.versionNumber} /m"
|
|
},*/
|
|
ADMIN: {
|
|
sleep 0
|
|
echo 'Build ADMIN Release'
|
|
bat "\"${tool 'MSBuild-14.0'}\" GPW_Admin\\GPW_Admin.csproj /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=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:ProductVersion=${env.versionNumber} /m"
|
|
bat "\"${tool 'MSBuild-14.0'}\" GPW_Admin\\GPW_Admin.csproj /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=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:ProductVersion=${env.versionNumber} /m"
|
|
},
|
|
/*BARCODE: {
|
|
sleep 1
|
|
echo 'Build BARCODE Release'
|
|
bat "\"${tool 'MSBuild-14.0'}\" GPW_Barcode\\GPW_Barcode.csproj /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=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:ProductVersion=${env.versionNumber} /m"
|
|
bat "\"${tool 'MSBuild-14.0'}\" GPW_Barcode\\GPW_Barcode.csproj /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=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:ProductVersion=${env.versionNumber} /m"
|
|
},
|
|
SMART: {
|
|
sleep 2
|
|
echo 'Build SMART Release'
|
|
bat "\"${tool 'MSBuild-14.0'}\" GPW_Smart\\GPW_Smart.csproj /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=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:ProductVersion=${env.versionNumber} /m"
|
|
bat "\"${tool 'MSBuild-14.0'}\" GPW_Smart\\GPW_Smart.csproj /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=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:ProductVersion=${env.versionNumber} /m"
|
|
},
|
|
COMMESSE: {
|
|
sleep 3
|
|
echo 'Build COMMESSE Release'
|
|
bat "\"${tool 'MSBuild-14.0'}\" GPW_Commesse\\GPW_Commesse.csproj /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=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:ProductVersion=${env.versionNumber} /m"
|
|
bat "\"${tool 'MSBuild-14.0'}\" GPW_Commesse\\GPW_Commesse.csproj /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=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /p:ProductVersion=${env.versionNumber} /m"
|
|
},*/
|
|
failFast: false)
|
|
}
|
|
}
|
|
/*stage('Deploy Installers') {
|
|
steps {
|
|
parallel (
|
|
Cli_01: {
|
|
echo 'Creazione zip 01...'
|
|
sleep 1
|
|
echo 'Copia...'
|
|
bat "E:\\Jenkins\\exportDropbox.bat TestSam\\Test\\pipeline_test\\lastSuccessfulBuild\\archive\\ScratchTest\\ScratchTest\\bin\\Release TestSam\\CLI_01 Build_${env.versionNumber}"
|
|
},
|
|
Cli_02: {
|
|
echo 'Creazione zip 02...'
|
|
sleep 1
|
|
echo 'Copia...'
|
|
bat "E:\\Jenkins\\exportDropbox.bat TestSam\\Test\\pipeline_test\\lastSuccessfulBuild\\archive\\ScratchTest\\ScratchTest\\bin\\Release TestSam\\CLI_02 Build_${env.versionNumber}"
|
|
},
|
|
failFast: false)
|
|
}
|
|
}*/
|
|
/*stage('Archive') {
|
|
steps {
|
|
echo 'Archiviazione build Release'
|
|
archiveArtifacts artifacts: 'ScratchTest/ScratchTest/bin/Release/**'
|
|
}
|
|
}*/
|
|
}
|
|
/*post {
|
|
always {
|
|
echo 'I will always say Hello again!'
|
|
}
|
|
}*/
|
|
} |