Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

Add secret key generate to travis ci build to support forks #372

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rich-allen-gov
Copy link
Contributor

@rich-allen-gov rich-allen-gov commented Mar 12, 2018

Checklist

I have…

  • run the application locally (bin/rails server) and verified that my changes behave as expected.
  • run static code analysis (bin/rubocop) and vulnerability scan (bin/brakeman) against my changes.
  • run the test suite (bin/rake spec) and verified that all tests pass.
  • summarized below my changes and noted which issues (if any) this pull request fixes or addresses.
  • thoroughly outlined below the steps necessary to test my changes.
  • attached screenshots illustrating relevant behavior before and after my changes.
  • read, understand, and agree to the terms described in CONTRIBUTING.md.
  • added my name, email address, and copyright date to CONTRIBUTORS.md.

Summary of Changes

If you want to work with a fork of the project, the build fails for pull requests, most likely due to this limitation. https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions and not having the SECRET_KEY_BASE environment variable set up. This is a small change to the travis build which just generates a secret key base at build time.

Testing

  1. In travis ci delete the SECRET_KEY_BASE variable.
  2. Run the build. You should not receive errors related to not having that variable set.

Link with behavior:

before:
https://travis-ci.org/deptofdefense/move.mil/builds/352455122

after:
This pull request should pass testing with no secret key base env var needed in configuration.

@rich-allen-gov rich-allen-gov changed the title Feature/travis ci secret fix Add secret key generate to travis ci build to support forks Mar 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant