diff options
author | Chris Baumbauer <cab@cabnetworks.net> | 2018-11-06 10:55:18 +0300 |
---|---|---|
committer | Chris Baumbauer <cab@cabnetworks.net> | 2018-11-06 10:55:18 +0300 |
commit | 97441486ceb3522fc5d3ff9e52a9d93e07bc8961 (patch) | |
tree | bc7774f06c43b3b6131b2e036cd3e1695f0b226c /lib/gitlab/kubernetes | |
parent | 1435fe60752728790544ed07bf4c95fc3ba39efe (diff) |
Fix issue with missing knative cluster role binding, and cleanup tests
Diffstat (limited to 'lib/gitlab/kubernetes')
-rw-r--r-- | lib/gitlab/kubernetes/helm/install_command.rb | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/lib/gitlab/kubernetes/helm/install_command.rb b/lib/gitlab/kubernetes/helm/install_command.rb index 09a4e494b64..28173b65cb6 100644 --- a/lib/gitlab/kubernetes/helm/install_command.rb +++ b/lib/gitlab/kubernetes/helm/install_command.rb @@ -4,16 +4,17 @@ module Gitlab class InstallCommand include BaseCommand - attr_reader :name, :files, :chart, :version, :repository, :script + attr_reader :name, :files, :chart, :version, :repository, :preinstall, :postinstall - def initialize(name:, chart:, files:, rbac:, version: nil, repository: nil, script: nil) + def initialize(name:, chart:, files:, rbac:, version: nil, repository: nil, preinstall: nil, postinstall: nil) @name = name @chart = chart @version = version @rbac = rbac @files = files @repository = repository - @script = script + @preinstall = preinstall + @postinstall = postinstall end def generate_script @@ -21,8 +22,9 @@ module Gitlab init_command, repository_command, repository_update_command, - script_command, - install_command + preinstall_command, + install_command, + postinstall_command ].compact.join("\n") end @@ -50,9 +52,15 @@ module Gitlab command.shelljoin + " >/dev/null\n" end - def script_command - unless script.nil? - script.shelljoin + " >/dev/null\n" + def preinstall_command + unless preinstall.nil? + preinstall.join("\n") + end + end + + def postinstall_command + unless postinstall.nil? + postinstall.join("\n") end end |