diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-01-14 17:52:59 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-01-20 23:12:48 +0100 |
commit | c45a6bf3ba13cbd532852dfcc48ef3fd7aa545e4 (patch) | |
tree | 1482a8d5a7e705bf1d19c37e690ff6b0a13b0fbd /lib | |
parent | 714f95b2ff68c02eeee9151c9b456bb2afe7eaff (diff) | |
download | gitlab-ce-c45a6bf3ba13cbd532852dfcc48ef3fd7aa545e4.tar.gz |
Added cache:key to .gitlab-ci.yml allowing to fine tune the cachingci/cache-key
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ci/gitlab_ci_yaml_processor.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index bcdfd38d292..1a3f662811a 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -115,6 +115,10 @@ module Ci end if @cache + if @cache[:key] && !validate_string(@cache[:key]) + raise ValidationError, "cache:key parameter should be a string" + end + if @cache[:untracked] && !validate_boolean(@cache[:untracked]) raise ValidationError, "cache:untracked parameter should be an boolean" end @@ -198,6 +202,10 @@ module Ci end def validate_job_cache!(name, job) + if job[:cache][:key] && !validate_string(job[:cache][:key]) + raise ValidationError, "#{name} job: cache:key parameter should be a string" + end + if job[:cache][:untracked] && !validate_boolean(job[:cache][:untracked]) raise ValidationError, "#{name} job: cache:untracked parameter should be an boolean" end |