2017-07-03 09:30:10 +02:00
|
|
|
package common
|
|
|
|
|
|
|
|
import javaposse.jobdsl.dsl.Job
|
|
|
|
import javaposse.jobdsl.dsl.DslFactory
|
|
|
|
|
|
|
|
import common.Build
|
|
|
|
|
|
|
|
class Appcast extends Build
|
|
|
|
{
|
|
|
|
String name = 'Appcast'
|
|
|
|
String label= 'Common'
|
2017-07-03 09:33:28 +02:00
|
|
|
String artifacts = 'build/*.msi,build/*.dmg,build/*.tar.gz,build/*.sha256,build/Appcast.*,build/ReleaseNotes.html,build/docs/**/*.pdf,build/docs/**/*.tar.xz,source/resources/default-*'
|
2017-07-03 09:30:10 +02:00
|
|
|
String trigger = null
|
|
|
|
List oldBuilds = [-1, 5]
|
|
|
|
boolean sendMail = false
|
|
|
|
|
|
|
|
String getSourceJobName(String artifactJob)
|
|
|
|
{
|
|
|
|
def prefixSource = ''
|
|
|
|
|
2017-12-20 14:54:05 +01:00
|
|
|
if(getReleaseJob())
|
2017-07-03 09:30:10 +02:00
|
|
|
prefixSource = 'Release_'
|
|
|
|
|
|
|
|
return buildName(prefixSource, artifactJob)
|
|
|
|
}
|
|
|
|
|
|
|
|
Job generate(DslFactory dslFactory)
|
|
|
|
{
|
|
|
|
def j = super.generate(dslFactory)
|
|
|
|
|
|
|
|
j.with
|
|
|
|
{
|
2017-12-20 14:54:05 +01:00
|
|
|
if(!getReleaseJob())
|
2017-07-03 09:30:10 +02:00
|
|
|
{
|
|
|
|
triggers
|
|
|
|
{
|
|
|
|
upstream(getSourceJobName('Win32_GNU_MSI') + ',' + getSourceJobName('MacOS_DMG') + ',' + getSourceJobName('Source') + ',' + getSourceJobName('Docs'))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
copyArtifacts(getSourceJobName('Win32_GNU_MSI'))
|
|
|
|
{
|
|
|
|
buildSelector
|
|
|
|
{
|
|
|
|
latestSuccessful(true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
copyArtifacts(getSourceJobName('MacOS_DMG'))
|
|
|
|
{
|
|
|
|
buildSelector
|
|
|
|
{
|
|
|
|
latestSuccessful(true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
copyArtifacts(getSourceJobName('Source'))
|
|
|
|
{
|
|
|
|
buildSelector
|
|
|
|
{
|
|
|
|
latestSuccessful(true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
copyArtifacts(getSourceJobName('Docs'))
|
|
|
|
{
|
|
|
|
buildSelector
|
|
|
|
{
|
|
|
|
latestSuccessful(true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-20 14:54:05 +01:00
|
|
|
def appCastJob = getReleaseJob() ? '' : '-DJENKINS_APPCAST=\${JOB_NAME}'
|
2017-07-03 09:30:10 +02:00
|
|
|
shell("cd build; cmake ../source -DCMAKE_BUILD_TYPE=release -Dtools.only=true ${appCastJob}")
|
|
|
|
shell('cd build; cmake -E copy docs/notes/singlehtml/de/appcast.html ReleaseNotes.html')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return j
|
|
|
|
}
|
|
|
|
}
|