-
Notifications
You must be signed in to change notification settings - Fork 409
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
Add bare minimum encrypt-file spec and fix the command #715
Merged
Conversation
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
FakeAPI is stubbed to satisfy a very small number of calls that `encrypt-file` command requires.
BanzaiMan
force-pushed
the
ha-encrypt-file-fix
branch
from
March 4, 2020 19:47
bb3eddd
to
d718e1d
Compare
To avoid ArgumentError
See #678. |
BanzaiMan
changed the title
Bare minimal encrypt-file spec
Add bare minimum encrypt-file spec and fix the command
Mar 4, 2020
$ gem install travis
Fetching travis-1.8.11.gem
Successfully installed travis-1.8.11
1 gem installed
$ echo "bar" > food
$ travis encrypt-file food
encrypting food for travis-ci/travis.rb
storing result as food.enc
storing secure env variables for decryption
wrong number of arguments (given 1, expected 2)
for a full error report, run travis report --pro
$ travis report --pro
System
Ruby: Ruby 2.3.4-p301
Operating System: Mac OS X 10.15.3
RubyGems: RubyGems 3.0.3
CLI
Version: 1.8.11
Plugins: none
Auto-Completion: yes
Last Version Check: 2020-03-04 15:06:09 -0500
Session
API Endpoint: https://api.travis-ci.com/
Logged In: as "BanzaiMan"
Verify SSL: yes
Enterprise: no
Endpoints
org: https://api.travis-ci.org/ (access token)
com: https://api.travis-ci.com/ (access token, current)
staging-com: https://api-staging.travis-ci.com/ (access token)
staging-org: https://api-staging.travis-ci.org/ (access token)
Last Exception
An error occurred running `travis encrypt-file --pro`:
ArgumentError: wrong number of arguments (given 1, expected 2)
from /Users/asari/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/travis-1.8.11/lib/travis/cli/encrypt_file.rb:79:in `env_name'
from /Users/asari/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/travis-1.8.11/lib/travis/cli/encrypt_file.rb:70:in `decrypt_command'
from /Users/asari/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/travis-1.8.11/lib/travis/cli/encrypt_file.rb:42:in `run'
from /Users/asari/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/travis-1.8.11/lib/travis/cli/command.rb:198:in `execute'
from /Users/asari/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/travis-1.8.11/lib/travis/cli.rb:64:in `run'
from /Users/asari/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/travis-1.8.11/bin/travis:18:in `<top (required)>'
from /Users/asari/.rbenv/versions/2.3.4/bin/travis:23:in `load'
from /Users/asari/.rbenv/versions/2.3.4/bin/travis:23:in `<main>'
For issues with the command line tool, please visit https://github.com/travis-ci/travis.rb/issues.
For Travis CI in general, go to https://github.com/travis-ci/travis-ci/issues or email support@travis-ci.com.
$ pwd
/Users/asari/Development/src/travis-ci/travis.rb
$ gem build travis.gemspec
WARNING: open-ended dependency on backports (>= 0) is not recommended
use a bounded requirement, such as '~> x.y'
WARNING: open-ended dependency on rspec-its (>= 0, development) is not recommended
use a bounded requirement, such as '~> x.y'
WARNING: See http://guides.rubygems.org/specification-reference/ for help
Successfully built RubyGem
Name: travis
Version: 1.8.11
File: travis-1.8.11.gem
$ gem install ./travis-1.8.11.gem
Successfully installed travis-1.8.11
1 gem installed
$ travis encrypt-file food
encrypting food for travis-ci/travis.rb
storing result as food.enc
DANGER ZONE: Override existing food.enc? |no| yes
storing secure env variables for decryption
Please add the following to your build script (before_install stage in your .travis.yml, for instance):
openssl aes-256-cbc -K $encrypted_39ccb32d95ed_key -iv $encrypted_39ccb32d95ed_iv -in food.enc -out food -d
Pro Tip: You can add it automatically by running with --add.
Make sure to add food.enc to the git repository.
Make sure not to add food to the git repository.
Commit all changes to your .travis.yml. |
svenfuchs
approved these changes
Mar 4, 2020
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.
👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FakeAPI is stubbed to satisfy a very small number of calls that
encrypt-file
command requires.