-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import updater files from dependabot-core (#799)
- Loading branch information
1 parent
4f6d17b
commit 0879961
Showing
85 changed files
with
7,691 additions
and
14 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
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,26 @@ | ||
# frozen_string_literal: true | ||
|
||
$LOAD_PATH.unshift(__dir__ + "/../lib") | ||
|
||
$stdout.sync = true | ||
|
||
require "raven" | ||
require "dependabot/setup" | ||
require "dependabot/file_fetcher_command" | ||
require "debug" if ENV["DEBUG"] | ||
|
||
class UpdaterKilledError < StandardError; end | ||
|
||
trap("TERM") do | ||
puts "Received SIGTERM" | ||
error = UpdaterKilledError.new("Updater process killed with SIGTERM") | ||
tags = { update_job_id: ENV.fetch("DEPENDABOT_JOB_ID", nil) } | ||
Raven.capture_exception(error, tags: tags) | ||
exit | ||
end | ||
|
||
begin | ||
Dependabot::FileFetcherCommand.new.run | ||
rescue Dependabot::RunFailure | ||
exit 1 | ||
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,26 @@ | ||
# frozen_string_literal: true | ||
|
||
$LOAD_PATH.unshift(__dir__ + "/../lib") | ||
|
||
$stdout.sync = true | ||
|
||
require "raven" | ||
require "dependabot/setup" | ||
require "dependabot/update_files_command" | ||
require "debug" if ENV["DEBUG"] | ||
|
||
class UpdaterKilledError < StandardError; end | ||
|
||
trap("TERM") do | ||
puts "Received SIGTERM" | ||
error = UpdaterKilledError.new("Updater process killed with SIGTERM") | ||
tags = { update_job_id: ENV.fetch("DEPENDABOT_JOB_ID", nil) } | ||
Raven.capture_exception(error, tags: tags) | ||
exit | ||
end | ||
|
||
begin | ||
Dependabot::UpdateFilesCommand.new.run | ||
rescue Dependabot::RunFailure | ||
exit 1 | ||
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,20 @@ | ||
# TODO: Remove these hacks once we've deprecated npm 6 support as it no longer | ||
# spwans a child process to npm install git dependencies. | ||
|
||
# Only set our custom CA cert for npm because the system ca's + our custom ca | ||
# causes npm to blow up when installing git dependencies (E2BIG exception). This | ||
# happens because the ca-file contents are passed as a cli argument to npm | ||
# install from npm/cli/lib/pack.js as --ca="contents of ca file" - "ca" is | ||
# populated automatically by npm when setting "--cafile" and passed through in | ||
# when spawning the cli to install git dependencies. | ||
cafile=/usr/local/share/ca-certificates/dbot-ca.crt | ||
# Because npm doesn't pass through all npm config when doing git installs in | ||
# npm/cli/lib/pack.js we also need to disable audit here to prevent npm from | ||
# auditing git dependencies, we do this to sped up installs | ||
audit=false | ||
# Similarly, dry-run and ignore-scripts are also not passed through when doing | ||
# git installs in npm/cli/lib/pack.js so we set dry-run and ignore-scripts to | ||
# prevent any lifecycle hooks for git installs. dry-run disables "prepare" and | ||
# "prepack" scripts, ignore-scripts disables all other scripts | ||
dry-run=true | ||
ignore-scripts=true |
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,6 @@ | ||
# TODO: Remove these hacks once we've deprecated npm 6 support as it no longer | ||
# spwans a child process to npm install git dependencies. | ||
# yarn lockfile v1 | ||
|
||
# Tell yarn to use the system-wide CA bundle overriding the .npmrc cafile | ||
cafile "/etc/ssl/certs/ca-certificates.crt" |
Oops, something went wrong.