-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
1,057 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ class Apt < Base | |
xenial | ||
bionic | ||
focal | ||
jammy | ||
).freeze | ||
|
||
attr_reader :safelisted, :disallowed_while_sudo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ class Snaps < Base | |
xenial | ||
bionic | ||
focal | ||
jammy | ||
).freeze | ||
|
||
def before_prepare? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
require 'travis/build/appliances/base' | ||
require 'travis/build/git' | ||
|
||
module Travis | ||
module Build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
require 'travis/build/appliances/base' | ||
require 'travis/build/git' | ||
require 'travis/rollout' | ||
|
||
module Travis | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
require 'travis/vcs/base.rb' | ||
require 'travis/vcs/git.rb' | ||
require 'travis/vcs/perforce.rb' | ||
require 'travis/vcs/svn.rb' | ||
require 'travis/build/errors.rb' | ||
|
||
module Travis | ||
module Vcs | ||
class <<self | ||
def top | ||
"Travis::Vcs::#{provider_name.to_s.camelize}".constantize.top | ||
rescue NameError | ||
raise Travis::Build::UnknownServiceTypeError.new provider_name | ||
end | ||
|
||
def version | ||
"Travis::Vcs::#{provider_name.to_s.camelize}".constantize.version | ||
rescue NameError | ||
raise Travis::Build::UnknownServiceTypeError.new provider_name | ||
end | ||
|
||
def paths | ||
"Travis::Vcs::#{provider_name.to_s.camelize}".constantize.paths | ||
rescue NameError | ||
raise Travis::Build::UnknownServiceTypeError.new(provider_name) | ||
end | ||
|
||
def clone_cmd(endpoint, source) | ||
"Travis::Vcs::#{provider_name.to_s.camelize}".constantize.clone_cmd(endpoint, source) | ||
rescue NameError | ||
raise Travis::Build::UnknownServiceTypeError.new provider_name | ||
end | ||
|
||
def checkout_cmd(branch) | ||
"Travis::Vcs::#{provider_name.to_s.camelize}".constantize.checkout_cmd(branch) | ||
rescue NameError | ||
raise Travis::Build::UnknownServiceTypeError.new(provider_name) | ||
end | ||
|
||
def revision_cmd | ||
"Travis::Vcs::#{provider_name.to_s.camelize}".constantize.revision_cmd | ||
rescue NameError | ||
raise Travis::Build::UnknownServiceTypeError.new provider_name | ||
end | ||
|
||
def checkout(sh,data) | ||
vcs(sh,data).checkout | ||
end | ||
|
||
def defaults(server_type) | ||
@provider_name = server_type | ||
"Travis::Vcs::#{provider_name.to_s.camelize}".constantize.defaults | ||
rescue NameError | ||
raise Travis::Build::UnknownServiceTypeError.new provider_name | ||
end | ||
|
||
private | ||
def vcs(sh,data) | ||
provider = data[:repository][:server_type] if data.key?(:repository) | ||
provider = provider_name unless provider | ||
@provider_name = provider | ||
"Travis::Vcs::#{provider.to_s.camelize}".constantize.new(sh,data) | ||
rescue NameError | ||
raise Travis::Build::UnknownServiceTypeError.new provider_name | ||
end | ||
|
||
def provider_name | ||
@provider_name ||= 'git' | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#frozen_string_literal: true | ||
module Travis | ||
module Vcs | ||
class Base | ||
attr_reader :sh, :data | ||
|
||
def self.top | ||
raise NotImplementedError | ||
end | ||
|
||
def self.version | ||
raise NotImplementedError | ||
end | ||
|
||
def self.paths | ||
raise NotImplementedError | ||
end | ||
|
||
def self.defaults | ||
raise NotImplementedError | ||
end | ||
|
||
def initialize(sh, data) | ||
@sh = sh | ||
@data = data | ||
end | ||
|
||
def checkout | ||
raise NotImplementedError | ||
end | ||
|
||
end | ||
end | ||
end |
Oops, something went wrong.