Files
GPW/Jenkinsfile
T
Samuele E. Locatelli (WEB DEV) 61009ddccb TEST copia da workspace...
2017-04-04 23:50:30 +02:00

91 lines
3.5 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: 'StatusBuildSelector', stable: false]])*/
step([$class: 'CopyArtifact', fingerprintArtifacts: true, projectName: 'Steamware\\SteamWareLib', selector: [$class: 'WorkspaceSelector']])
/* 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: {
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: {
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: {
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: {
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..'
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
stage('Archive') {
steps {
echo 'Archiviazione build Release'
archiveArtifacts artifacts: 'ScratchTest/ScratchTest/bin/Release/**'
}
}
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)
}
}*/
}
/*post {
always {
echo 'I will always say Hello again!'
}
}*/
}