yast-rake 0.2.44 → 0.2.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/data/targets.yml +2 -2
- data/lib/tasks/github_actions/github_actions/job.rb +2 -1
- data/lib/tasks/github_actions/github_actions/job_runner.rb +17 -1
- data/lib/yast/rake.rb +8 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84beac8fc61a64c1e2395c3bf9353b3af7d82a8114a8ca8bb54ba04d0eb3a5c6
|
4
|
+
data.tar.gz: 5b2030a73eb9a16e4295d378e9a9820ecb01b149281270cccbd890b54f3fd3d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37383c8f09a3e8bbfff98918581fd450454ad2987fe055719e1a1a0bd1055cd30155d009ee498c3863fa56212f1f5c8be387b8f17d3b32bc806d237c317e9a1a
|
7
|
+
data.tar.gz: 455c0771c116675915339edeadf390e72bd9537cc09d6a4dae9b8746b906a6fa2ec8896d7df9562a2b673e27585cceb8d2b5df314966f87da7bd908379cc4b11
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.47
|
data/data/targets.yml
CHANGED
@@ -98,8 +98,8 @@
|
|
98
98
|
:sle_latest:
|
99
99
|
obs_api: "https://api.suse.de/"
|
100
100
|
obs_project: "Devel:YaST:Head"
|
101
|
-
obs_sr_project: "SUSE:SLE-15-
|
102
|
-
obs_target: "SUSE_SLE-15-
|
101
|
+
obs_sr_project: "SUSE:SLE-15-SP5:GA"
|
102
|
+
obs_target: "SUSE_SLE-15-SP5_GA"
|
103
103
|
:factory:
|
104
104
|
obs_project: "YaST:Head"
|
105
105
|
obs_sr_project: "openSUSE:Factory"
|
@@ -22,7 +22,7 @@ module GithubActions
|
|
22
22
|
# Github Actions job
|
23
23
|
# @see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
24
24
|
class Job
|
25
|
-
attr_reader :name, :steps, :runs_on, :container, :workflow
|
25
|
+
attr_reader :name, :steps, :runs_on, :container, :workflow, :matrix
|
26
26
|
|
27
27
|
# @param name [String] name of the job
|
28
28
|
# @param data [Hash] data from the workflow YAML file
|
@@ -32,6 +32,7 @@ module GithubActions
|
|
32
32
|
@runs_on = data["runs-on"]
|
33
33
|
@container = data["container"]
|
34
34
|
@workflow = workflow
|
35
|
+
@matrix = data.fetch("strategy", {})["matrix"]
|
35
36
|
|
36
37
|
@steps = data["steps"].map do |step|
|
37
38
|
Step.new(self, step)
|
@@ -78,7 +78,23 @@ module GithubActions
|
|
78
78
|
abort "Unsupported container definition: #{job.container.inspect}"
|
79
79
|
end
|
80
80
|
|
81
|
-
Container.new(image_name, options.to_s)
|
81
|
+
Container.new(expand_name(image_name), options.to_s)
|
82
|
+
end
|
83
|
+
|
84
|
+
# replace the ${{ matrix.<value> }} placeholders in the image name
|
85
|
+
#
|
86
|
+
# @param image_name [String] name of the Docker image
|
87
|
+
# @return [String] name with replaced values
|
88
|
+
def expand_name(image_name)
|
89
|
+
image_name.gsub(/\$\{\{\s*matrix\.[^}]*\}\}/) do |subst|
|
90
|
+
name = /\$\{\{\s*matrix\.([^}]*)\}\}/.match(subst)[1].strip
|
91
|
+
value = job.matrix ? job.matrix[name] : subst
|
92
|
+
|
93
|
+
# if the value is an Array use the first value by default
|
94
|
+
replacement = value.is_a?(Array) ? value.first : value.to_s
|
95
|
+
puts "Using ${{matrix.#{name}}} value: #{replacement.inspect}"
|
96
|
+
replacement
|
97
|
+
end
|
82
98
|
end
|
83
99
|
|
84
100
|
# run a job step
|
data/lib/yast/rake.rb
CHANGED
@@ -22,14 +22,19 @@ require_relative "tasks"
|
|
22
22
|
|
23
23
|
# yast integration testing takes too long and require osc:build so it create
|
24
24
|
# circle, so replace test dependency with test:unit
|
25
|
-
|
26
|
-
prerequisites =
|
25
|
+
ptask = Rake::Task["package"]
|
26
|
+
prerequisites = ptask.prerequisites
|
27
27
|
prerequisites.delete("test")
|
28
28
|
|
29
|
-
|
29
|
+
ptask.enhance(prerequisites)
|
30
30
|
|
31
31
|
yast_submit = ENV["YAST_SUBMIT"] || :factory
|
32
32
|
Yast::Tasks.submit_to(yast_submit.to_sym)
|
33
|
+
namespace :osc do
|
34
|
+
# This adds to existing desc
|
35
|
+
desc "Try YAST_SUBMIT=help rake...."
|
36
|
+
task :build
|
37
|
+
end
|
33
38
|
|
34
39
|
Yast::Tasks.configuration do |conf|
|
35
40
|
conf.package_name = File.read("RPMNAME").strip if File.exist?("RPMNAME")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yast-rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.47
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josef Reidinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: packaging_rake_tasks
|