-
Notifications
You must be signed in to change notification settings - Fork 4
/
Rakefile
50 lines (42 loc) · 1.29 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
require "securerandom"
require "yaml"
task :default => [:test]
desc "Run just tests no measurements"
task :test do
sh "ginkgo -r -skipMeasurements ."
end
desc "Builds packages"
task :build do
version = ENV["VERSION"] || "development"
sha = `git rev-parse --short HEAD`.chomp
buildid = SecureRandom.hex
build = ENV["BUILD"] || "foss"
source = "/go/src/github.com/choria-io/provisioner"
["el6_32", "el6_64", "el7_64"].each do |pkg|
sh 'docker run --rm -v `pwd`:%s -e SOURCE_DIR=%s -e ARTIFACTS=%s -e SHA1="%s" -e BUILD="%s" -e VERSION="%s" -e PACKAGE=%s choria/packager:el7-go1.17-puppet' % [
source,
source,
source,
sha,
build,
version,
pkg
]
end
end
desc "Builds binaries"
task :build_binaries do
version = ENV["VERSION"] || "development"
sha = `git rev-parse --short HEAD`.chomp
buildid = SecureRandom.hex
build = ENV["BUILD"] || "foss"
source = "/go/src/github.com/choria-io/provisioner"
sh 'docker run --rm -v `pwd`:%s -e SOURCE_DIR=%s -e ARTIFACTS=%s -e SHA1="%s" -e BUILD="%s" -e VERSION="%s" -e BINARY_ONLY=1 choria/packager:el7-go1.17-puppet' % [
source,
source,
source,
sha,
build,
version
]
end