lib/autoproj/jenkins/updater.rb in autoproj-jenkins-0.3.12 vs lib/autoproj/jenkins/updater.rb in autoproj-jenkins-0.3.13
- old
+ new
@@ -48,11 +48,11 @@
# downloads it from github.com
# @param [Boolean] dev whether the packages pipelines should be updated
# with --dev or not
# @param [Array<Autoproj::PackageDefinition>] packages if non-empty,
# restrict operations to these packages and their dependencies
- def render_buildconf_pipeline(*package_names, gemfile: 'buildconf-Gemfile', autoproj_install_path: nil, dev: false, credentials_id: nil, vcs_credentials: Credentials.new)
+ def render_buildconf_pipeline(*package_names, gemfile: 'buildconf-Gemfile', autoproj_install_path: nil, dev: false, credentials_id: nil, vcs_credentials: Credentials.new, seed: nil)
manifest_vcs = ws.manifest.vcs
if manifest_vcs.local? || manifest_vcs.none?
raise ArgumentError, "cannot use Jenkins to build an autoproj buildconf that is not on a remotely acessible VCS"
end
@@ -62,10 +62,11 @@
package_names: package_names,
gemfile: gemfile,
autoproj_install_path: autoproj_install_path,
job_prefix: job_prefix,
credentials_id: credentials_id,
+ seed: seed,
vcs_credentials: vcs_credentials,
dev: dev)
end
# Create or update the buildconf (master) job
@@ -75,19 +76,20 @@
# @param [String] gemfile the gemfile template that should be used for
# the autoproj bootstrap. Mostly used for autoproj-jenkins development
# within VMs
# @param [Integer] quiet_period the job's quiet period, in seconds.
# Mostly used within autoproj-jenkins tests
- def create_or_update_buildconf_job(*package_names, gemfile: 'buildconf-Gemfile', autoproj_install_path: nil, dev: false, quiet_period: 5, credentials_id: nil, vcs_credentials: Credentials.new)
+ def create_or_update_buildconf_job(*package_names, gemfile: 'buildconf-Gemfile', autoproj_install_path: nil, seed: nil, dev: false, quiet_period: 5, credentials_id: nil, vcs_credentials: Credentials.new)
job_name = job_name_from_package_name("buildconf")
pipeline = render_buildconf_pipeline(
*package_names,
gemfile: gemfile,
autoproj_install_path: autoproj_install_path,
credentials_id: credentials_id,
vcs_credentials: vcs_credentials,
+ seed: seed,
dev: dev)
server.create_or_reset_job(job_name, 'buildconf.xml', pipeline: pipeline, quiet_period: quiet_period)
end
# Returns the job name of a given package
@@ -142,11 +144,11 @@
# Create jobs and dependencies to handle the given set of packages
#
# @return [Array<String>] the list of names of the jobs that have been
# created/updated
- def update(*packages, quiet_period: 5, gemfile: 'buildconf-Gemfile', autoproj_install_path: nil, vcs_credentials: Credentials.new)
+ def update(*packages, seed: nil, quiet_period: 5, gemfile: 'buildconf-Gemfile', autoproj_install_path: nil, vcs_credentials: Credentials.new)
reverse_dependencies = ws.manifest.compute_revdeps
package_names = packages.map(&:name).to_set
packages.map do |package|
job_name = job_name_from_package_name(package.name)
@@ -166,9 +168,10 @@
end
pipeline = server.render_pipeline(job_name, 'package.pipeline',
buildconf_vcs: ws.manifest.vcs,
vcs: package.vcs,
+ seed: seed,
package_name: package.name,
package_dir: Pathname.new(package.autobuild.srcdir).relative_path_from(Pathname.new(ws.root_dir)).to_s,
artifact_glob: "**/*",
job_name: job_name,
upstream_jobs: upstream_jobs,