summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/build/step.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/ci/build/step.rb')
-rw-r--r--lib/gitlab/ci/build/step.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/gitlab/ci/build/step.rb b/lib/gitlab/ci/build/step.rb
index 1877429ac46..ee034d9cc56 100644
--- a/lib/gitlab/ci/build/step.rb
+++ b/lib/gitlab/ci/build/step.rb
@@ -7,13 +7,12 @@ module Gitlab
WHEN_ALWAYS = 'always'.freeze
attr_reader :name
- attr_writer :script
- attr_accessor :timeout, :when, :allow_failure
+ attr_accessor :script, :timeout, :when, :allow_failure
class << self
def from_commands(job)
self.new(:script).tap do |step|
- step.script = job.commands
+ step.script = job.commands.split("\n")
step.timeout = job.timeout
step.when = WHEN_ON_SUCCESS
end
@@ -36,10 +35,6 @@ module Gitlab
@name = name
@allow_failure = false
end
-
- def script
- @script.split("\n")
- end
end
end
end