boxen / our-boxen

Copy me for your team.
https://github.com/boxen/our-boxen/
MIT License
2.58k stars 884 forks source link

FIX travis CI #861

Closed n0ts closed 6 years ago

n0ts commented 6 years ago

CI is passed! https://travis-ci.org/n0ts/our-boxen/builds/344193908

n0ts commented 6 years ago

CI is required environment variable $BOXEN_GITHUB_LOGIN and $BOXEN_GITHUB_TOKEN. Could you set $BOXEN_GITHUB_LOGIN and $BOXEN_GITHUB_TOKEN value? Because CI is failed.

jacobbednarz commented 6 years ago

Could you set $BOXEN_GITHUB_LOGIN and $BOXEN_GITHUB_TOKEN value?

The values were already intended to be exported via https://github.com/boxen/our-boxen/blob/master/.travis.yml#L15 (see https://docs.travis-ci.com/user/environment-variables#Defining-encrypted-variables-in-.travis.yml for details on how this works with a fork/PR context). However this has been a little flakey for testing, etc. for me in the past.

I did just re-look in the UI and you can now export "secure" environment variables which will address the initial issue I was trying to solve here so let me see if I can use that instead.

jacobbednarz commented 6 years ago

There is something going on with the env vars here that I don't fully understand. Leave it with me to look into.

jacobbednarz commented 6 years ago

@n0ts your changes reverting my debugging commits aren't going to fix it. I'm still looking into why the env isn't being populated correctly.

n0ts commented 6 years ago

@jacobbednarz Oh, sorry... Could you add boxentestuser user password secureenv ? ref: https://docs.travis-ci.com/user/environment-variables/#Encrypting-environment-variables

jacobbednarz commented 6 years ago

@n0ts as I mentioned in a couple of comments above (https://github.com/boxen/our-boxen/pull/861#issuecomment-368348309), they are already in there.

I'm awaiting to hear back from Travis on this one since the env is acting in a way I wouldn't expect and I'm after clarification on why that is.

n0ts commented 6 years ago

@jacobbednarz OK, I reverted env command. Thanks!!!

jacobbednarz commented 6 years ago

@n0ts I've heard back from Travis and as suspected, it is our doing why this doesn't work. The secure environment variables aren't available to forks or CI runs that are triggered from forks (which is what we have here and why it's not showing up).

There are a couple of ways to fix this:

  1. Add anyone that needs access to these secure environment variables to the repository and open PRs directly against this repository. I've done this and added you as a collaborator (so, congrats on becoming a collaborator 🎉)
  2. Have shared credentials available to all those who need to kick off builds. This option I'm not keen on and will actually create more security overhead than needed here.

To fix this now, I'm going to open a fresh PR with your commits and in future, you should just be able to open PRs directly against this repository.