Skip to content

Commit f8c9e04

Browse files
authored
Merge branch 'master' into rhel8
2 parents 87c20db + 04a1963 commit f8c9e04

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1057
-88
lines changed

init.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def data
7474
end
7575

7676
def set_up_config(match_data)
77-
@build = build(match_data[:build])
77+
@build = build(match_data[:build].to_i)
7878
@job_number = match_data[:job].to_i - 1
7979
@compile_config = @build.jobs[@job_number].config
8080
end

lib/travis/build.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,15 @@ def config
1616
module_function :config
1717

1818
def top
19-
@top ||= Pathname.new(
20-
`git rev-parse --show-toplevel 2>/dev/null`.strip
21-
)
19+
::Travis::Vcs::Git::top
2220
end
2321

2422
module_function :top
2523

2624
class << self
2725
def version
2826
return @version if @version
29-
@version ||= `git describe --always --dirty --tags 2>/dev/null`.strip
27+
@version ||= ::Travis::Vcs::Git::version
3028
@version = nil unless $?.success?
3129
@version ||= ENV.fetch('BUILD_SLUG_COMMIT', nil)
3230
@version ||= top.join('VERSION').read if top.join('VERSION').exist?

lib/travis/build/addons/apt.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class Apt < Base
1515
xenial
1616
bionic
1717
focal
18+
jammy
1819
).freeze
1920

2021
attr_reader :safelisted, :disallowed_while_sudo

lib/travis/build/addons/artifacts/env.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
require 'core_ext/hash/deep_symbolize_keys'
22
require 'active_support/core_ext/hash/slice'
3+
require 'travis/vcs.rb'
34

45
module Travis
56
module Build
67
class Addons
78
class Artifacts < Base
89
class Env
910
DEFAULT = {
10-
paths: '$(git ls-files -o | tr "\n" ":")',
11+
paths: ::Travis::Vcs::paths,
1112
log_format: 'multiline'
1213
}
1314

lib/travis/build/addons/chrome.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def export_source_url
6060
sh.elif "$(uname) = 'Darwin'" do
6161
case version
6262
when 'stable'
63-
pkg_url = "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg"
63+
pkg_url = "https://dl.google.com/chrome/mac/universal/stable/GGRO/googlechrome.dmg"
6464
when 'beta'
65-
pkg_url = "https://dl.google.com/chrome/mac/beta/googlechrome.dmg"
65+
pkg_url = "https://dl.google.com/chrome/mac/universal/beta/googlechromebeta.dmg "
6666
end
6767
sh.export 'CHROME_SOURCE_URL', pkg_url
6868
end

lib/travis/build/addons/deploy/script.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,10 @@ def build_gem_locally_from(source, branch)
267267
sh.echo "Building dpl gem locally with source #{source} and branch #{branch}", ansi: :yellow
268268
cmd("gem uninstall -aIx dpl >& /dev/null", echo: false, assert: !allow_failure, timing: false)
269269
sh.cmd("pushd /tmp >& /dev/null", echo: false, assert: !allow_failure, timing: true)
270-
sh.cmd("git clone https://github.com/#{source} #{source}", echo: true, assert: !allow_failure, timing: true)
270+
sh.cmd(::Travis::Vcs::Git::clone_cmd('https://github.com',source), echo: true, assert: !allow_failure, timing: true)
271271
sh.cmd("pushd #{source} >& /dev/null", echo: false, assert: !allow_failure, timing: true)
272-
sh.cmd("git checkout #{branch}", echo: true, assert: !allow_failure, timing: true)
273-
sh.cmd("git rev-parse HEAD", echo: true, assert: !allow_failure, timing: true)
272+
sh.cmd(::Travis::Vcs::Git::checkout_cmd(branch), echo: true, assert: !allow_failure, timing: true)
273+
sh.cmd(::Travis::Vcs::Git::revision_cmd, echo: true, assert: !allow_failure, timing: true)
274274
cmd("gem build dpl.gemspec", echo: true, assert: !allow_failure, timing: true)
275275
sh.raw "for f in dpl-*.gemspec; do"
276276
sh.raw " base=${f%*.gemspec}"

lib/travis/build/addons/mariadb.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def after_prepare
2121
sh.else do
2222
sh.cmd "apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 #{MARIADB_GPG_KEY_NEW}", sudo: true
2323
end
24-
sh.cmd 'add-apt-repository "deb http://%p/mariadb/repo/%p/ubuntu $TRAVIS_DIST main"' % [MARIADB_MIRROR, mariadb_version], sudo: true
24+
sh.cmd 'add-apt-repository --yes "deb http://%p/mariadb/repo/%p/ubuntu $TRAVIS_DIST main"' % [MARIADB_MIRROR, mariadb_version], sudo: true
2525
sh.cmd 'travis_apt_get_update', retry: true, echo: true
2626
sh.cmd "PACKAGES='mariadb-server-#{mariadb_version}'", echo: true
2727
sh.cmd "if [[ $(lsb_release -cs) = 'precise' ]]; then PACKAGES=\"${PACKAGES} libmariadbclient-dev\"; fi", echo: true

lib/travis/build/addons/snaps.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class Snaps < Base
1313
xenial
1414
bionic
1515
focal
16+
jammy
1617
).freeze
1718

1819
def before_prepare?

lib/travis/build/appliances/agent.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
require 'base64'
22
require 'travis/build/appliances/base'
33
require 'travis/build/appliances/agent/jwt'
4-
require 'travis/build/git'
54

65
module Travis
76
module Build

lib/travis/build/appliances/checkout.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
require 'travis/build/appliances/base'
2-
require 'travis/build/git'
2+
require 'travis/vcs'
33

44
module Travis
55
module Build
66
module Appliances
77
class Checkout < Base
88
def apply
9-
Git.new(sh, data).checkout
9+
Travis::Vcs.checkout(sh, data)
1010
end
1111

1212
def apply?

0 commit comments

Comments
 (0)