-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch from Logify to mixlib-log for logging #150
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,11 @@ echo "Restoring the bundle cache archive to vendor/bundle" | |
if [ -f bundle.tar.gz ]; then | ||
tar -xzf bundle.tar.gz | ||
fi | ||
bundle config --local path vendor/bundle | ||
|
||
git config --global user.email "[email protected]" | ||
git config --global user.name "Foo Bar" | ||
|
||
bundle config --local path vendor/bundle | ||
bundle install --jobs=7 --retry=3 | ||
bundle exec $1 | ||
|
||
|
@@ -41,4 +44,4 @@ echo "Uploading the tar.gz of the vendor/bundle directory to s3" | |
aws s3 cp bundle.tar.gz "s3://public-cd-buildkite-cache/${BUILDKITE_PIPELINE_SLUG}/${BUILDKITE_LABEL}/bundle.tar.gz" || echo 'Could not push the bundler directory to s3 for caching. Future builds may be slower if this continues.' | ||
|
||
echo "Uploading the sha256 hash of the vendor/bundle directory to s3" | ||
aws s3 cp bundle.sha256 "s3://public-cd-buildkite-cache/${BUILDKITE_PIPELINE_SLUG}/${BUILDKITE_LABEL}/bundle.sha256" || echo 'Could not push the bundler directory to s3 for caching. Future builds may be slower if this continues.' | ||
aws s3 cp bundle.sha256 "s3://public-cd-buildkite-cache/${BUILDKITE_PIPELINE_SLUG}/${BUILDKITE_LABEL}/bundle.sha256" || echo 'Could not push the bundler directory to s3 for caching. Future builds may be slower if this continues.' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.swp | ||
*.gem | ||
*.rbc | ||
.bundle | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ Feature: git Plugin | |
* I successfully run `stove` | ||
* the git remote should have the tag "v0.0.0" | ||
|
||
@wip | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I verified There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Issue: #154 |
||
Scenario: When using signed tags | ||
* I have a cookbook named "bacon" with git support | ||
* a GPG key exists | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,6 @@ | |
|
||
module Stove | ||
class Cli | ||
include Logify | ||
|
||
def initialize(argv, stdin=STDIN, stdout=STDOUT, stderr=STDERR, kernel=Kernel) | ||
@argv, @stdin, @stdout, @stderr, @kernel = argv, stdin, stdout, stderr, kernel | ||
end | ||
|
@@ -48,8 +46,8 @@ def execute! | |
|
||
# Useful debugging output for when people type the wrong fucking command | ||
# and then open an issue like it's somehow my fault | ||
log.info("Options: #{options.inspect}") | ||
log.info("ARGV: #{@argv.inspect}") | ||
Stove::Log.info("Options: #{options.inspect}") | ||
Stove::Log.info("ARGV: #{@argv.inspect}") | ||
|
||
# Make a new cookbook object - this will raise an exception if there is | ||
# no cookbook at the given path | ||
|
@@ -62,10 +60,11 @@ def execute! | |
# If we got this far, everything was successful :) | ||
@kernel.exit(0) | ||
rescue => e | ||
log.error('Stove experienced an error!') | ||
log.error(e.class.name) | ||
log.error(e.message) | ||
log.error(e.backtrace.join("\n")) | ||
Stove::Log.init($stderr) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tas50 @tyler-ball The problem wasn't in the cucumber tests, but the actual code to log |
||
Stove::Log.error('Stove experienced an error!') | ||
Stove::Log.error(e.class.name) | ||
Stove::Log.error(e.message) | ||
Stove::Log.error(e.backtrace.join("\n")) | ||
|
||
@kernel.exit(e.respond_to?(:exit_code) ? e.exit_code : 500) | ||
ensure | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,6 @@ | |
|
||
module Stove | ||
class Cookbook | ||
include Logify | ||
|
||
require_relative 'cookbook/metadata' | ||
|
||
# | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# Copyright:: 2019 Chef Software, Inc. | ||
# License:: Apache License, Version 2.0 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
require 'mixlib/log' | ||
|
||
module Stove | ||
class Log | ||
extend Mixlib::Log | ||
Mixlib::Log::Formatter.show_time = false | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,6 @@ | |
|
||
module Stove | ||
class Packager | ||
include Logify | ||
|
||
ACCEPTABLE_FILES = [ | ||
'.foodcritic', | ||
'README.*', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed this so that we don't show this WARN message anymore: