cs10 / Alonzo

Alonzo is the helpful (and slightly sassy) bot for CS10. He's also our mascot.
http://alonzo.herokuapp.com
5 stars 2 forks source link

Figure out how to get heroku .env vars into travis #117

Closed aaaschmitt closed 8 years ago

aaaschmitt commented 8 years ago

@cycomachead you might have a better idea of how to do this than me. This will enable true CI for alonzo once we get this and then deploy hooks working.

cycomachead commented 8 years ago

Installing hk didn't do it?

Surely we aren't the first people with this problem. :stuck_out_tongue: I think I've seen some stuff around, let me look.

aaaschmitt commented 8 years ago

I got permission denied because it wanted to access usr/local/bin/hk to do the install. If we enable sudo in travis then we run on their old architecture I think and get slower build times :/

cycomachead commented 8 years ago

Alright, well I might try a few other things. There is heroku config --json which uses the old version, that might be avaiable through apt-get ?

Or we can run things on an OS X box and install through brew but that seems like a pain

aaaschmitt commented 8 years ago

Yeah I'm gonna look into it more too. Also just FYI hk is deprecated in favor of the heroku toolbelt. The problem is that heroku tool belt (command: heroku config) doesn't give you env variables in as nice of form. So text processing would need to be done before putting it into a text file. We should also think about how authentication will work on travis.

cycomachead commented 8 years ago

hk is deprecated?! Damn. I like it because it's fast.

The regular toolbelt actually does have a JSON option which I quite like and will try that soon. Now that I discovered it! 🙃

Michael Ball From my iPhone michaelball.co

On Feb 25, 2016, at 12:44 PM, Andy Schmitt notifications@github.com wrote:

Yeah I'm gonna look into it more too. Also just FYI hk is deprecated in favor of the heroku toolbelt. The problem is that heroku tool belt (command: heroku config) doesn't give you env variables in as nice of form. So text processing would need to be done before putting it into a text file. We should also think about how authentication will work on travis.

— Reply to this email directly or view it on GitHub.

aaaschmitt commented 8 years ago

nice! Yeah sudo is not really an option. I just tried to run a job and it's been sitting for like 10 mins now in a queue. Before adding sudo it took less than 5 mins to run.

aaaschmitt commented 8 years ago

but do we need sudo to install the heroku toolbelt?

cycomachead commented 8 years ago

We would, but I think it's available through apt-get so that would work.

Actually, the heroku API would probably work well too, because we can just curl something.

curl -n https://api.heroku.com/apps/alonzo/config-vars -H "Accept: application/vnd.heroku+json; version=3" I don't know what kind of auth we need though...it worked for me without auth, which seems scary AF, but I'm assuming there's cooking or something it used? o_O

aaaschmitt commented 8 years ago

Ok I think I was able to download heroku toolbelt on travis. They made it a special add on so you don't need sudo. If you could modify _dev-vars to use the toolbelt that would be good. On travis there is a HEROKU_API_KEY variable that should get used to authenticate (I think).

cycomachead commented 8 years ago

ok, yeah. I'll try to play around with this soon.

cycomachead commented 8 years ago

Also I think I know why deployments weren't working now so I might be able to fix that.

cycomachead commented 8 years ago

IT WORKED. IT WORKED.

aaaschmitt commented 8 years ago

YES