|
| 1 | +<?xml version='1.0' encoding='UTF-8'?> |
| 2 | +<com.cloudbees.plugins.flow.BuildFlow plugin=" [email protected]" > |
| 3 | +<%= flowProject( |
| 4 | + repoUser: @user, |
| 5 | + repoRef: @branch, |
| 6 | + description: "Flow that bootstraps and runs a community build", |
| 7 | + params: [ |
| 8 | + {:name => "scalac_opts", :desc => "[For community-build] Scala compiler arguments, e.g., -Yopt:l:classpath, passed to project builds."}, |
| 9 | + {:name => "projects", :desc => "[For community-build] List of projects to build."}, |
| 10 | + {:name => "sbtBuildTask", :desc => "[For bootstrap] To skip testing, set to e.g. `update`. Useful when publishing a nightly to run the community build against.", :default => "testAll"}, |
| 11 | + {:name => "publishToSonatype", :desc => "[For bootstrap] Set to anything but "yes" to avoid publishing to sonatype. Otherwise, release builds (tagged or SCALA_VER_BASE defined) will be published."}, |
| 12 | + {:name => "testStability", :desc => "[For bootstrap] To avoid running the stability test, set to e.g., `no`", :default => "yes"}, |
| 13 | + {:name => "moduleVersioning", :desc => "[For bootstrap] Set to anything but "versions.properties" to build the latest HEAD for all modules."}, |
| 14 | + {:name => "SCALA_VER_BASE", :desc => "[For bootstrap] Specifying this parameter will cause a release to be built. If it's empty (and HEAD does not have a tag that parses as a version), a -nightly release is built."}, |
| 15 | + {:name => "SCALA_VER_SUFFIX", :desc => "[For bootstrap] Empty for a final release, otherwise, e.g., -RC1 for the first RC or -M3 for the third milestone. (Will be parsed from the tag on SCALA_REF, if any.)"}, |
| 16 | + {:name => "SCALA_BINARY_VER", :desc => "[For bootstrap] For binary compatible releases (such as 2.11.0 and 2.11.1), the short binary version (e.g. 2.11). Otherwise, the full Scala version."}, |
| 17 | + {:name => "SCALA_FULL_VER", :desc => "[For bootstrap] For non-snapshot releases, the scala version, otherwise the closest scala version that's a valid binary version. Used to cross-version the scala continuations plugin."}, |
| 18 | + {:name => "STARR_REF", :desc => "[For bootstrap] Can be set to a git ref of a separate commit that will be used to build STARR, rather than using a prebuilt STARR based on starr.version in versions.properties. Used when bootstraping compiler changes that change the ABI, e.g. changing name mangling."}, |
| 19 | + {:name => "XML_VER", :desc => "[For bootstrap] The version to build for scala-xml. If the version already exists, it won't be published. If empty, it will be parsed from versions.properties (unless moduleVersioning != "versions.properties")."}, |
| 20 | + {:name => "PARSERS_VER", :desc => "[For bootstrap] The version to build for scala-parser-combinators. If the version already exists, it won't be published. If empty, it will be parsed from versions.properties (unless moduleVersioning != "versions.properties")."}, |
| 21 | + {:name => "CONTINUATIONS_VER", :desc => "[For bootstrap] The version to build for scala-continuations-plugin and -library. The plugin will be cross-versioned with SCALA_FULL_VER. If the version already exists, it won't be published. If empty, it will be parsed from versions.properties (unless moduleVersioning != "versions.properties")."}, |
| 22 | + {:name => "SWING_VER", :desc => "[For bootstrap] The version to build for scala-swing. If the version already exists, it won't be published. |
| 23 | + If empty, it will be parsed from versions.pr[For bootstrap] operties (unless moduleVersioning != "versions.properties")."}, |
| 24 | + {:name => "ACTORS_MIGRATION_VER", :desc => "[For bootstrap] The version to build for scala-partest. If the version already exists, it won't be published. If empty, it will be parsed from versions.properties (unless moduleVersioning != "versions.properties")."}, |
| 25 | + {:name => "PARTEST_VER", :desc => "[For bootstrap] The version to build for scala-partest. If the version already exists, it won't be published. If empty, it will be parsed from versions.properties (unless moduleVersioning != "versions.properties")."}, |
| 26 | + {:name => "SCALACHECK_VER", :desc => "[For bootstrap] The version to build for scalacheck. Not published. If empty, it will be parsed from versions.properties (unless moduleVersioning != "versions.properties")."}, |
| 27 | + {:name => "AKKA_ACTOR_VER", :desc => "[For bootstrap] The version of akka-actors to include in scala-library-all.pom. NOTE: the release script will NOT build akka, the version specified here needs to be released already. If empty, it will be parsed from versions.properties."}, |
| 28 | + {:name => "JLINE_VER", :desc => "[For bootstrap] The version of jline to use for building the Scala project.NOTE: the release script will NOT build jline, the version specified here needs to be released already.If empty, it will be parsed from versions.properties."} |
| 29 | + ], |
| 30 | + buildNameScript: setReleaseBuildNameScript, |
| 31 | + dsl: <<-EOX |
| 32 | +if (params.repo_ref) buildParams = params |
| 33 | +else buildParams = params + [ "repo_ref" : "v$ver" ] |
| 34 | +
|
| 35 | +buildRun = build(buildParams, "#{job("integrate/bootstrap")}") |
| 36 | +
|
| 37 | +upstreamBuild = buildRun.build |
| 38 | +// defines repo_ref, version, sbtDistVersionOverride |
| 39 | +upstreamPropsArtifact = upstreamBuild.artifacts.find{it.name == "jenkins.properties"} |
| 40 | +
|
| 41 | +if (upstreamPropsArtifact == null) { |
| 42 | + out.println('Error: bootstrap did not publish "jenkins.properties" artifact, unable to proceed.') |
| 43 | + build.state.setResult(Result.FAILURE) |
| 44 | + return |
| 45 | +} |
| 46 | +
|
| 47 | +buildVersionProps = new java.util.Properties() |
| 48 | +buildVersionProps.load(new java.io.FileInputStream(upstreamPropsArtifact.file)) |
| 49 | +
|
| 50 | +testParams = buildParams + buildVersionProps |
| 51 | +
|
| 52 | +parallel ( |
| 53 | + { build(testParams, "#{job("integrate/community-build")}") }, |
| 54 | +) |
| 55 | +
|
| 56 | +EOX |
| 57 | +) %> |
| 58 | + <publishers> |
| 59 | + <hudson.tasks.Mailer plugin=" [email protected]" > |
| 60 | + |
| 61 | + <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild> |
| 62 | + <sendToIndividuals>false</sendToIndividuals> |
| 63 | + </hudson.tasks.Mailer> |
| 64 | + </publishers> |
| 65 | + <buildNeedsWorkspace>true</buildNeedsWorkspace> |
| 66 | +</com.cloudbees.plugins.flow.BuildFlow> |
0 commit comments