[Pkg-puppet-devel] [facter] 17/180: (FACT-375) Copy CI acceptance test artifact task
Stig Sandbeck Mathisen
ssm at debian.org
Mon Jun 30 15:06:26 UTC 2014
This is an automated email from the git hooks/post-receive script.
ssm pushed a commit to branch master
in repository facter.
commit 724e0fe21a997a615df8f4a11ef97d8b25068016
Author: Adrien Thebo <git at somethingsinistral.net>
Date: Thu Mar 6 12:55:05 2014 -0800
(FACT-375) Copy CI acceptance test artifact task
File taken from puppet:tasks/ci.rake at 379c5afcec3d8f0c63a78669195b240a1a4f9a89
---
tasks/ci.rake | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/tasks/ci.rake b/tasks/ci.rake
new file mode 100644
index 0000000..b082a1b
--- /dev/null
+++ b/tasks/ci.rake
@@ -0,0 +1,29 @@
+require 'yaml'
+require 'time'
+
+namespace "ci" do
+ task :spec do
+ ENV["LOG_SPEC_ORDER"] = "true"
+ sh %{rspec -r yarjuf -f JUnit -o result.xml -fp spec}
+ end
+
+ desc "Tar up the acceptance/ directory so that package test runs have tests to run against."
+ task :acceptance_artifacts => :tag_creator do
+ Dir.chdir("acceptance") do
+ rm_f "acceptance-artifacts.tar.gz"
+ sh "tar -czv --exclude .bundle -f acceptance-artifacts.tar.gz *"
+ end
+ end
+
+ task :tag_creator do
+ Dir.chdir("acceptance") do
+ File.open('creator.txt', 'w') do |fh|
+ YAML.dump({
+ 'creator_id' => ENV['CREATOR'] || ENV['BUILD_URL'] || 'unknown',
+ 'created_on' => Time.now.iso8601,
+ 'commit' => (`git log -1 --oneline` rescue "unknown: #{$!}")
+ }, fh)
+ end
+ end
+ end
+end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git
More information about the Pkg-puppet-devel
mailing list