Skip to content
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 travis:encrypt command #140

Closed
wants to merge 4 commits into from
Closed

Conversation

ryansch
Copy link

@ryansch ryansch commented Jun 24, 2014

I took a pass at implementing the feature discussed in #8.

I exposed the --add and --override options to allow the end user to control edits to .travis.yml.

private

def command
%(travis encrypt #{travis_options} --split "#{vars}")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does --split do? Should it be the default even though it isn't in the travis CLI?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say let's pass our ENV variables as Travis accepts by default. I believe that's space separated. Unless there's an issue with that approach.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the approach I started with and ran into issues with encrypt throwing exceptions because the data to be encrypted was too large. We have a lot of env vars.

@laserlemon
Copy link
Owner

This looks really good, thank you! 👏 I've been looking forward to this ability for a while now. I left some comments for us to discuss.

@ryansch
Copy link
Author

ryansch commented Jul 4, 2014

I'll sync on this today.

@ryansch
Copy link
Author

ryansch commented Jul 4, 2014

Instead of documenting all of the various travis encrypt options and being responsible for keeping them in sync with the parent project, I've instructed thor to pass any unknown options directly to the encrypt command.

@ryansch
Copy link
Author

ryansch commented Jul 4, 2014

Apparently old versions of rails require thor 0.14.x. The feature I'm using to pass unknown options was only added in 0.17.0.

Do we really want to support any version of rails older than 3.2?

@ryansch
Copy link
Author

ryansch commented Aug 30, 2014

The travis guys have taken things in a different direction with their new env var implementation. In lieu of this functionality, I've added a simple 'print' command to spit out a figaro environment's variables. I can then add them to .travis.yml, the website, or with travis env set.

@ryansch ryansch closed this Aug 30, 2014
@ryansch ryansch deleted the travis-command branch October 22, 2014 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants