Skip to content

Commit

Permalink
Don't create the hydra.license if $HydraLicense is empty (#2858)
Browse files Browse the repository at this point in the history
The sbt-hydra checks if a hydra.license file exists to decide whether it should
enable itself. Therefore, if the $HydraLicense is empty, it's important not to
create the hydra.license file.

The reason why the $HydraLicense can be empty is because its content is a
secret, hence it is available only to PRs created from within the repository.
Otherwise, the secret would be easily leaked.

This commit is a followup fix for 8069e09
  • Loading branch information
dotta authored and kailuowang committed May 24, 2019
1 parent 8069e09 commit 4c2b6ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ scala_version_213: &scala_version_213 2.13.0-RC1

before_install:
- export PATH=${PATH}:./vendor/bundle
- mkdir -p /home/travis/.triplequote/metrics/config && echo "$HydraLicense" > "/home/travis/.triplequote/hydra.license" && cp hydra-metrics-service.conf /home/travis/.triplequote/metrics/config/metrics-service.conf
- if [[ ! -z "$HydraLicense" ]]; then
mkdir -p /home/travis/.triplequote/metrics/config && echo "$HydraLicense" > "/home/travis/.triplequote/hydra.license" && cp hydra-metrics-service.conf /home/travis/.triplequote/metrics/config/metrics-service.conf;
fi

stages:
- name: styling
Expand Down

0 comments on commit 4c2b6ff

Please sign in to comment.