manageiq-cross_repo 1.1.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +22 -0
- data/.github/workflows/manageiq_cross_repo.yaml +51 -0
- data/.gitignore +1 -0
- data/.whitesource +3 -0
- data/CHANGELOG.md +65 -0
- data/README.md +5 -1
- data/exe/manageiq-cross_repo +2 -2
- data/lib/manageiq/cross_repo/repository.rb +15 -1
- data/lib/manageiq/cross_repo/runner/base.rb +99 -0
- data/lib/manageiq/cross_repo/runner/github.rb +34 -0
- data/lib/manageiq/cross_repo/runner/travis.rb +20 -0
- data/lib/manageiq/cross_repo/runner.rb +19 -73
- data/lib/manageiq/cross_repo/version.rb +1 -1
- data/lib/manageiq/cross_repo.rb +2 -2
- data/repos/.gitkeep +0 -0
- metadata +15 -8
- data/.travis.yml +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aabcb009709323fda3ef5fb9d7b51a14bb740382d2ae9ee07906f1f51ff7dc0b
|
4
|
+
data.tar.gz: 455362a5640b2aea638156d67a0c39495a2b4151f6242fe6f68ad92f718e1512
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 189db86dd4fb0fe6f597bb0308b9a1d06e3bf6302bfb01f05adec4f5df0c01d3c63f469d32e05c8d51caf76cce5e1baf2363bcc0260cda01838bc154d7f29437
|
7
|
+
data.tar.gz: b37fc65c86b522b03aa4673d624e0f32506f4ee3e27afc19e3751eef8e234000052c369fc6f4960d465beb1f4285feae841431f6a30b1a6d15b6fb6c5ea01d20
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
ci:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby-version:
|
11
|
+
- '2.5'
|
12
|
+
- '2.6'
|
13
|
+
- '2.7'
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v2
|
16
|
+
- name: Set up Ruby
|
17
|
+
uses: ruby/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: ${{ matrix.ruby-version }}
|
20
|
+
bundler-cache: true
|
21
|
+
- name: Run tests
|
22
|
+
run: bundle exec rake
|
@@ -0,0 +1,51 @@
|
|
1
|
+
name: ManageIQ Cross Repo Workflow
|
2
|
+
|
3
|
+
on:
|
4
|
+
workflow_call:
|
5
|
+
inputs:
|
6
|
+
test-repo:
|
7
|
+
required: true
|
8
|
+
type: string
|
9
|
+
repos:
|
10
|
+
required: true
|
11
|
+
type: string
|
12
|
+
test-suite:
|
13
|
+
required: false
|
14
|
+
type: string
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
ci:
|
18
|
+
name: Run manageiq-cross_repo
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
strategy:
|
21
|
+
fail-fast: false
|
22
|
+
services:
|
23
|
+
postgres:
|
24
|
+
image: manageiq/postgresql:10
|
25
|
+
env:
|
26
|
+
POSTGRESQL_USER: root
|
27
|
+
POSTGRESQL_PASSWORD: smartvm
|
28
|
+
POSTGRESQL_DATABASE: vmdb_test
|
29
|
+
options: --health-cmd pg_isready --health-interval 2s --health-timeout 5s --health-retries 5
|
30
|
+
ports:
|
31
|
+
- 5432:5432
|
32
|
+
env:
|
33
|
+
TEST_SUITE: ${{ inputs.test-suite }}
|
34
|
+
REPOS: ${{ inputs.repos }}
|
35
|
+
TEST_REPO: ${{ inputs.test-repo }}
|
36
|
+
PGHOST: localhost
|
37
|
+
PGPASSWORD: smartvm
|
38
|
+
steps:
|
39
|
+
- uses: actions/checkout@v2
|
40
|
+
- name: Set up Ruby
|
41
|
+
uses: ruby/setup-ruby@v1
|
42
|
+
with:
|
43
|
+
ruby-version: 2.7
|
44
|
+
bundler-cache: true
|
45
|
+
- name: Set up Node
|
46
|
+
uses: actions/setup-node@v2
|
47
|
+
with:
|
48
|
+
node-version: 12
|
49
|
+
registry-url: https://npm.manageiq.org/
|
50
|
+
- name: Run tests
|
51
|
+
run: bundle exec manageiq-cross_repo
|
data/.gitignore
CHANGED
data/.whitesource
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
# Change Log
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
|
+
|
5
|
+
## [Unreleased]
|
6
|
+
|
7
|
+
## [2.0.0] - 2022-02-08
|
8
|
+
### Changed
|
9
|
+
- Announce the cross repo run information (#81)
|
10
|
+
- Use Github Actions for CI (#82)
|
11
|
+
- Replace Travis with Github Actions (#83)
|
12
|
+
|
13
|
+
## [1.2.1] - 2022-01-11
|
14
|
+
### Fixed
|
15
|
+
- Fix unpacking the hash for ruby 3 support
|
16
|
+
|
17
|
+
## [1.2.0] - 2021-12-15
|
18
|
+
### Changed
|
19
|
+
- Add support for test repos using Github Actions
|
20
|
+
|
21
|
+
### Fixed
|
22
|
+
- If the list of repos is empty default to the core repo
|
23
|
+
|
24
|
+
## [1.1.3] - 2021-08-27
|
25
|
+
### Changed
|
26
|
+
- Add retry to ensure_clone (#74)
|
27
|
+
|
28
|
+
## [1.1.2] - 2021-05-13
|
29
|
+
### Changed
|
30
|
+
- Fix newer activesupport pulling in newer tzinfo and causing automate engine specs to fail
|
31
|
+
|
32
|
+
## [1.1.1] - 2021-02-22
|
33
|
+
### Changed
|
34
|
+
- [#71] Pass BUNDLE_PATH env var to test script
|
35
|
+
|
36
|
+
## [1.1.0] - 2021-02-05
|
37
|
+
### Changed
|
38
|
+
- Fix a warning from Kernel#open
|
39
|
+
- Add a --script-cmd and SCRIPT_CMD option
|
40
|
+
- Parse .travis.yml and run before_*/install/script sections
|
41
|
+
|
42
|
+
## [1.0.4] - 2020-04-14
|
43
|
+
### Changed
|
44
|
+
- Run tools/ci/before_install.sh for all plugins
|
45
|
+
|
46
|
+
## [1.0.3] - 2020-03-05
|
47
|
+
### Changed
|
48
|
+
- Prefer testing using the merge commit if it exists rather than the PR head
|
49
|
+
|
50
|
+
## [1.0.2] - 2020-02-04
|
51
|
+
### Changed
|
52
|
+
- Fix an issue extracting tgz files smaller than 10Kb
|
53
|
+
- Fix an issue overriding gems whose repo name doesn't match
|
54
|
+
|
55
|
+
[Unreleased]: https://github.com/ManageIQ/more_core_extensions/compare/v2.0.0...HEAD
|
56
|
+
[2.0.0]: https://github.com/ManageIQ/more_core_extensions/compare/v2.0.0...v1.2.1
|
57
|
+
[1.2.1]: https://github.com/ManageIQ/more_core_extensions/compare/v1.2.0...v1.2.1
|
58
|
+
[1.2.0]: https://github.com/ManageIQ/more_core_extensions/compare/v1.1.3...v1.2.0
|
59
|
+
[1.1.3]: https://github.com/ManageIQ/more_core_extensions/compare/v1.1.2...v1.1.3
|
60
|
+
[1.1.2]: https://github.com/ManageIQ/more_core_extensions/compare/v1.1.1...v1.1.2
|
61
|
+
[1.1.1]: https://github.com/ManageIQ/more_core_extensions/compare/v1.1.0...v1.1.1
|
62
|
+
[1.1.0]: https://github.com/ManageIQ/more_core_extensions/compare/v1.0.4...v1.1.0
|
63
|
+
[1.0.4]: https://github.com/ManageIQ/more_core_extensions/compare/v1.0.3...v1.0.4
|
64
|
+
[1.0.3]: https://github.com/ManageIQ/more_core_extensions/compare/v1.0.2...v1.0.3
|
65
|
+
[1.0.2]: https://github.com/ManageIQ/more_core_extensions/compare/v1.0.1...v1.0.2
|
data/README.md
CHANGED
@@ -16,8 +16,12 @@ Options:
|
|
16
16
|
If any of the repositories in the list are a core repository that will
|
17
17
|
be used as the root repository, otherwise ManageIQ/manageiq@master will be the default.
|
18
18
|
Can also be passed as a REPOS environment variable.
|
19
|
-
-s, --script-cmd=<s> Optional, a command string for running the specs. Defaults to `bundle exec rake`.
|
20
19
|
(default: )
|
20
|
+
-e, --test-suite=<s> Optional, the name of a rake test suite to pass as an environment variable to the test being run.
|
21
|
+
This is commonly used by the CI config to conditionally perform different setup tasks
|
22
|
+
and also to run different test suites, e.g. spec:javascript.
|
23
|
+
-s, --script-cmd=<s> Optional, a command string for running the specs.
|
24
|
+
If present this will override the the script section of the test_repo's CI config
|
21
25
|
|
22
26
|
-v, --version Print version and exit
|
23
27
|
-h, --help Show this message
|
data/exe/manageiq-cross_repo
CHANGED
@@ -33,13 +33,13 @@ opts = Optimist.options do
|
|
33
33
|
|
34
34
|
opt :test_suite, <<~EOS, :type => :string, :default => ENV["TEST_SUITE"].presence
|
35
35
|
Optional, the name of a rake test suite to pass as an environment variable to the test being run.
|
36
|
-
This is commonly used by the
|
36
|
+
This is commonly used by the CI config to conditionally perform different setup tasks
|
37
37
|
and also to run different test suites, e.g. spec:javascript.
|
38
38
|
EOS
|
39
39
|
|
40
40
|
opt :script_cmd, <<~EOS, :type => :string, :default => ENV["SCRIPT_CMD"].presence
|
41
41
|
Optional, a command string for running the specs.
|
42
|
-
If present this will override the the script section of the test_repo's
|
42
|
+
If present this will override the the script section of the test_repo's CI config
|
43
43
|
EOS
|
44
44
|
|
45
45
|
|
@@ -31,7 +31,9 @@ module ManageIQ::CrossRepo
|
|
31
31
|
require "tmpdir"
|
32
32
|
require "zlib"
|
33
33
|
|
34
|
-
|
34
|
+
retries ||= 0
|
35
|
+
|
36
|
+
puts "Fetching #{tarball_url}#{retry_count(retries)}"
|
35
37
|
|
36
38
|
Dir.mktmpdir do |dir|
|
37
39
|
Mixlib::Archive.new(open_tarball_url(tarball_url)).extract(dir)
|
@@ -40,6 +42,12 @@ module ManageIQ::CrossRepo
|
|
40
42
|
FileUtils.mkdir_p(path.dirname)
|
41
43
|
FileUtils.mv(content_dir, path)
|
42
44
|
end
|
45
|
+
rescue => e
|
46
|
+
retries += 1
|
47
|
+
raise if retries > 3
|
48
|
+
|
49
|
+
sleep 1
|
50
|
+
retry
|
43
51
|
end
|
44
52
|
|
45
53
|
private
|
@@ -167,5 +175,11 @@ module ManageIQ::CrossRepo
|
|
167
175
|
def git_pr_to_sha(url, pr)
|
168
176
|
git_branch_to_sha(url, "refs/pull/#{pr}/merge") || git_branch_to_sha(url, "refs/pull/#{pr}/head")
|
169
177
|
end
|
178
|
+
|
179
|
+
def retry_count(num)
|
180
|
+
return if num == 0
|
181
|
+
|
182
|
+
" (retry #{num}/3)"
|
183
|
+
end
|
170
184
|
end
|
171
185
|
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
require "active_support/core_ext/object/blank"
|
2
|
+
require "yaml"
|
3
|
+
|
4
|
+
module ManageIQ::CrossRepo
|
5
|
+
class Runner
|
6
|
+
class Base
|
7
|
+
attr_accessor :script_cmd, :config
|
8
|
+
|
9
|
+
def initialize(script_cmd = nil)
|
10
|
+
@script_cmd = script_cmd.presence
|
11
|
+
@config = load_config!
|
12
|
+
end
|
13
|
+
|
14
|
+
def build_test_script
|
15
|
+
load_config!
|
16
|
+
build_script
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def environment_setup_commands
|
22
|
+
commands = []
|
23
|
+
|
24
|
+
if config["node_js"]
|
25
|
+
commands << "source ~/.nvm/nvm.sh"
|
26
|
+
commands += Array(config["node_js"]).map do |node_version|
|
27
|
+
"nvm install #{node_version}"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
commands.any? ? build_section("environment", *commands) : commands
|
32
|
+
end
|
33
|
+
|
34
|
+
def section_commands
|
35
|
+
sections = %w[before_install install before_script script]
|
36
|
+
sections.flat_map do |section|
|
37
|
+
commands = build_section_commands(section)
|
38
|
+
build_section(section, *commands) if commands.present?
|
39
|
+
end.compact
|
40
|
+
end
|
41
|
+
|
42
|
+
def build_commands
|
43
|
+
environment_setup_commands + section_commands
|
44
|
+
end
|
45
|
+
|
46
|
+
def build_section_commands(section)
|
47
|
+
# Travis sections can have a single command or an array of commands
|
48
|
+
Array(config[section]).map { |cmd| "#{cmd} || exit $?" }
|
49
|
+
end
|
50
|
+
|
51
|
+
def build_section(section, *commands)
|
52
|
+
[
|
53
|
+
"echo '::group::#{section}'",
|
54
|
+
*commands,
|
55
|
+
"echo '::endgroup::'"
|
56
|
+
]
|
57
|
+
end
|
58
|
+
|
59
|
+
def build_script
|
60
|
+
<<~BASH_SCRIPT
|
61
|
+
#!/bin/bash
|
62
|
+
|
63
|
+
#{build_commands.join("\n")}
|
64
|
+
BASH_SCRIPT
|
65
|
+
end
|
66
|
+
|
67
|
+
def load_config!
|
68
|
+
ci_config.tap do |config|
|
69
|
+
# Set missing sections to the proper defaults
|
70
|
+
config["install"] ||= defaults[config["language"]]["install"]
|
71
|
+
|
72
|
+
config["script"] = script_cmd if script_cmd.present?
|
73
|
+
config["script"] ||= defaults[config["language"]]["script"]
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def ci_config
|
78
|
+
raise NotImplementedError, "must be implemented in a subclass"
|
79
|
+
end
|
80
|
+
|
81
|
+
def defaults
|
82
|
+
@defaults ||= {
|
83
|
+
"node_js" => {
|
84
|
+
"language" => "node_js",
|
85
|
+
"node_js" => ["12"],
|
86
|
+
"install" => "npm install",
|
87
|
+
"script" => "npm test"
|
88
|
+
},
|
89
|
+
"ruby" => {
|
90
|
+
"language" => "ruby",
|
91
|
+
"rvm" => ["2.7"],
|
92
|
+
"install" => "bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}",
|
93
|
+
"script" => "bundle exec rake"
|
94
|
+
}
|
95
|
+
}.freeze
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require_relative "./base"
|
2
|
+
require "yaml"
|
3
|
+
require "active_support/core_ext/enumerable"
|
4
|
+
|
5
|
+
module ManageIQ::CrossRepo
|
6
|
+
class Runner
|
7
|
+
class Github < Base
|
8
|
+
CONFIG_FILE = ".github/workflows/ci.yaml".freeze
|
9
|
+
|
10
|
+
def self.available?
|
11
|
+
File.exist?(CONFIG_FILE)
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def ci_config
|
17
|
+
github_config = YAML.load_file(CONFIG_FILE)
|
18
|
+
|
19
|
+
steps = github_config["jobs"]["ci"]["steps"]
|
20
|
+
steps_by_name = steps.index_by { |step| step["name"] }
|
21
|
+
|
22
|
+
language = steps.any? { |s| s["uses"] == "ruby/setup-ruby@v1" } ? "ruby" : "node_js"
|
23
|
+
|
24
|
+
result = {"language" => language}
|
25
|
+
|
26
|
+
result["before_install"] = steps_by_name["Set up system"]["run"] if steps_by_name["Set up system"]
|
27
|
+
result["before_script"] = steps_by_name["Prepare tests"]["run"] if steps_by_name["Prepare tests"]
|
28
|
+
result["script"] = steps_by_name["Run tests"]["run"] if steps_by_name["Run tests"]
|
29
|
+
|
30
|
+
result
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require_relative "./base"
|
2
|
+
require "yaml"
|
3
|
+
|
4
|
+
module ManageIQ::CrossRepo
|
5
|
+
class Runner
|
6
|
+
class Travis < Base
|
7
|
+
CONFIG_FILE = ".travis.yml".freeze
|
8
|
+
|
9
|
+
def self.available?
|
10
|
+
File.exist?(CONFIG_FILE)
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def ci_config
|
16
|
+
YAML.load_file(CONFIG_FILE)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
require "manageiq/cross_repo/repository"
|
2
|
+
require "active_support/core_ext/class/subclasses"
|
2
3
|
require "active_support/core_ext/object/blank"
|
4
|
+
Dir.glob(File.join(__dir__, "runner", "*")).sort.each { |f| require f }
|
3
5
|
|
4
6
|
module ManageIQ::CrossRepo
|
5
7
|
class Runner
|
@@ -16,8 +18,6 @@ module ManageIQ::CrossRepo
|
|
16
18
|
|
17
19
|
@core_repo = @test_repo
|
18
20
|
else
|
19
|
-
raise ArgumentError, "You must pass at least one repo when running a plugin test." if repos.blank?
|
20
|
-
|
21
21
|
@core_repo ||= Repository.new("ManageIQ/manageiq@master")
|
22
22
|
end
|
23
23
|
|
@@ -26,6 +26,7 @@ module ManageIQ::CrossRepo
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def run
|
29
|
+
announce_run
|
29
30
|
test_repo.ensure_clone
|
30
31
|
core_repo.ensure_clone unless test_repo.core?
|
31
32
|
prepare_gem_repos
|
@@ -34,6 +35,15 @@ module ManageIQ::CrossRepo
|
|
34
35
|
|
35
36
|
private
|
36
37
|
|
38
|
+
def announce_run
|
39
|
+
puts "\e[36m Starting cross repo for:\e[0m"
|
40
|
+
puts " \e[36mtest repo: #{test_repo.identifier}\e[0m"
|
41
|
+
puts " \e[36mcore repo: #{core_repo.identifier}\e[0m"
|
42
|
+
gem_repos.each do |gr|
|
43
|
+
puts " \e[36mgem repo: #{gr.identifier}\e[0m"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
37
47
|
def bundle_path
|
38
48
|
app_path = Pathname.new(ENV["TRAVIS_BUILD_DIR"].presence || Pathname.pwd)
|
39
49
|
app_path.join("vendor", "bundle")
|
@@ -41,12 +51,13 @@ module ManageIQ::CrossRepo
|
|
41
51
|
|
42
52
|
def run_tests
|
43
53
|
with_test_env do
|
44
|
-
|
54
|
+
test_script = script_source.new(script_cmd).build_test_script
|
55
|
+
run_test_script(test_script)
|
45
56
|
end
|
46
57
|
end
|
47
58
|
|
48
59
|
def env_vars
|
49
|
-
{"MANAGEIQ_REPO" => core_repo.path.to_s, "
|
60
|
+
{"MANAGEIQ_REPO" => core_repo.path.to_s, "BUNDLE_PATH" => bundle_path.to_s, "TEST_SUITE" => test_suite}
|
50
61
|
end
|
51
62
|
|
52
63
|
def with_test_env
|
@@ -67,6 +78,10 @@ module ManageIQ::CrossRepo
|
|
67
78
|
exit($?.exitstatus) unless $?.success?
|
68
79
|
end
|
69
80
|
|
81
|
+
def script_source
|
82
|
+
Base.descendants.detect(&:available?)
|
83
|
+
end
|
84
|
+
|
70
85
|
def generate_bundler_d
|
71
86
|
bundler_d_path = core_repo.path.join("bundler.d")
|
72
87
|
override_path = bundler_d_path.join("overrides.rb")
|
@@ -100,74 +115,5 @@ module ManageIQ::CrossRepo
|
|
100
115
|
|
101
116
|
system!(env_vars, "/bin/bash -s", :in => r, :out => $stdout, :err => $stderr)
|
102
117
|
end
|
103
|
-
|
104
|
-
def build_test_script
|
105
|
-
load_travis_yml!
|
106
|
-
|
107
|
-
commands = environment_setup_commands
|
108
|
-
|
109
|
-
sections = %w[before_install install before_script script]
|
110
|
-
commands += sections.flat_map do |section|
|
111
|
-
# Travis sections can have a single command or an array of commands
|
112
|
-
section_commands = Array(travis_yml[section]).map { |cmd| "#{cmd} || exit $?" }
|
113
|
-
next if section_commands.blank?
|
114
|
-
|
115
|
-
[
|
116
|
-
"echo 'travis_fold:start:#{section}'",
|
117
|
-
*section_commands,
|
118
|
-
"echo 'travis_fold:end:#{section}'"
|
119
|
-
]
|
120
|
-
end.compact
|
121
|
-
|
122
|
-
<<~BASH_SCRIPT
|
123
|
-
#!/bin/bash
|
124
|
-
|
125
|
-
#{commands.join("\n")}
|
126
|
-
BASH_SCRIPT
|
127
|
-
end
|
128
|
-
|
129
|
-
def environment_setup_commands
|
130
|
-
setup_commands = []
|
131
|
-
|
132
|
-
if travis_yml["node_js"]
|
133
|
-
setup_commands << "source ~/.nvm/nvm.sh"
|
134
|
-
setup_commands += Array(travis_yml["node_js"]).map do |node_version|
|
135
|
-
"nvm install #{node_version}"
|
136
|
-
end
|
137
|
-
end
|
138
|
-
|
139
|
-
setup_commands
|
140
|
-
end
|
141
|
-
|
142
|
-
def load_travis_yml!
|
143
|
-
# Load the test_repo's .travis.yml file
|
144
|
-
travis_yml
|
145
|
-
|
146
|
-
# Set missing travis sections to the proper defaults
|
147
|
-
travis_yml["install"] ||= travis_defaults[travis_yml["language"]]["install"]
|
148
|
-
|
149
|
-
travis_yml["script"] = script_cmd if script_cmd.present?
|
150
|
-
travis_yml["script"] ||= travis_defaults[travis_yml["language"]]["script"]
|
151
|
-
end
|
152
|
-
|
153
|
-
def travis_yml
|
154
|
-
@travis_yml ||= begin
|
155
|
-
require "yaml"
|
156
|
-
YAML.load_file(".travis.yml")
|
157
|
-
end
|
158
|
-
end
|
159
|
-
|
160
|
-
def travis_defaults
|
161
|
-
@travis_defaults ||= {
|
162
|
-
"node_js" => {
|
163
|
-
"install" => "npm install",
|
164
|
-
"script" => "npm test"
|
165
|
-
},
|
166
|
-
"ruby" => {
|
167
|
-
"install" => "bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}",
|
168
|
-
"script" => "bundle exec rake"
|
169
|
-
}
|
170
|
-
}.freeze
|
171
|
-
end
|
172
118
|
end
|
173
119
|
end
|
data/lib/manageiq/cross_repo.rb
CHANGED
data/repos/.gitkeep
ADDED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manageiq-cross_repo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Authors
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: manageiq-style
|
@@ -123,19 +123,22 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
description: ManageIQ CrossRepo testing library
|
126
|
-
email:
|
126
|
+
email:
|
127
127
|
executables:
|
128
128
|
- manageiq-cross_repo
|
129
129
|
extensions: []
|
130
130
|
extra_rdoc_files: []
|
131
131
|
files:
|
132
132
|
- ".codeclimate.yml"
|
133
|
+
- ".github/workflows/ci.yml"
|
134
|
+
- ".github/workflows/manageiq_cross_repo.yaml"
|
133
135
|
- ".gitignore"
|
134
136
|
- ".rspec"
|
135
137
|
- ".rubocop.yml"
|
136
138
|
- ".rubocop_cc.yml"
|
137
139
|
- ".rubocop_local.yml"
|
138
|
-
- ".
|
140
|
+
- ".whitesource"
|
141
|
+
- CHANGELOG.md
|
139
142
|
- Gemfile
|
140
143
|
- LICENSE.txt
|
141
144
|
- README.md
|
@@ -147,15 +150,19 @@ files:
|
|
147
150
|
- lib/manageiq/cross_repo.rb
|
148
151
|
- lib/manageiq/cross_repo/repository.rb
|
149
152
|
- lib/manageiq/cross_repo/runner.rb
|
153
|
+
- lib/manageiq/cross_repo/runner/base.rb
|
154
|
+
- lib/manageiq/cross_repo/runner/github.rb
|
155
|
+
- lib/manageiq/cross_repo/runner/travis.rb
|
150
156
|
- lib/manageiq/cross_repo/version.rb
|
151
157
|
- manageiq-cross_repo.gemspec
|
158
|
+
- repos/.gitkeep
|
152
159
|
homepage: https://github.com/ManageIQ/manageiq-cross_repo
|
153
160
|
licenses:
|
154
161
|
- MIT
|
155
162
|
metadata:
|
156
163
|
homepage_uri: https://github.com/ManageIQ/manageiq-cross_repo
|
157
164
|
source_code_uri: https://github.com/ManageIQ/manageiq-cross_repo
|
158
|
-
post_install_message:
|
165
|
+
post_install_message:
|
159
166
|
rdoc_options: []
|
160
167
|
require_paths:
|
161
168
|
- lib
|
@@ -170,8 +177,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
177
|
- !ruby/object:Gem::Version
|
171
178
|
version: '0'
|
172
179
|
requirements: []
|
173
|
-
rubygems_version: 3.
|
174
|
-
signing_key:
|
180
|
+
rubygems_version: 3.3.5
|
181
|
+
signing_key:
|
175
182
|
specification_version: 4
|
176
183
|
summary: ManageIQ CrossRepo testing library
|
177
184
|
test_files: []
|