-
Notifications
You must be signed in to change notification settings - Fork 1
Simple Travis secret #3
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,12 @@ cache: | |
| - $HOME/.composer/cache | ||
| - repos/wordpress | ||
|
|
||
| before_install: | ||
| - eval "$(ssh-agent -s)" | ||
| - echo -n "${base64_4950820e8b20_key}" | base64 --decode >.travis/key | ||
| - chmod 600 .travis/key | ||
| - ssh-add .travis/key | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If extracting the key to a secret (which seems to be what you're suggesting here), then the encrypted key in the repo is no longer needed either since
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
|
|
||
| install: travis_retry composer install --no-dev --prefer-dist | ||
|
|
||
| script: bin/build | ||
|
|
@@ -22,9 +28,3 @@ deploy: | |
| script: bin/deploy | ||
| on: | ||
| branch: master | ||
|
|
||
| before_script: | ||
| - openssl aes-256-cbc -K $encrypted_4950820e8b20_key -iv $encrypted_4950820e8b20_iv -in .travis/key.enc -out .travis/key -d | ||
| - eval "$(ssh-agent -s)" | ||
| - chmod 600 .travis/key | ||
| - ssh-add .travis/key | ||
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.
Why change this to
before_install? The install step only runs Composer, which does not require SSH (only the script does). The key is actually really only needed for the deploy step but I seem to recall the git clone would fail without it usingsshfor the remote.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.
installdoes the installation of Composer packages which are actually part of this software.before_installdoes the prerequisites for running CI.I hope that is clear :)