Skip to content

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ cache:
- $HOME/.composer/cache
- repos/wordpress

before_install:
Copy link
Member

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 using ssh for the remote.

Copy link
Author

Choose a reason for hiding this comment

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

install does the installation of Composer packages which are actually part of this software.
before_install does the prerequisites for running CI.
I hope that is clear :)

- eval "$(ssh-agent -s)"
- echo -n "${base64_4950820e8b20_key}" | base64 --decode | ssh-add -

install: travis_retry composer install --no-dev --prefer-dist

script: bin/build
Expand All @@ -22,9 +26,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