diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-02-21 14:17:01 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-02-21 14:17:01 +0100 |
commit | e6498efe0af5537ec4bd3cb3251030e8917d06e6 (patch) | |
tree | 037525e43e8b9ecb5d182bb981b5e1a928af5b67 /lib | |
parent | 2da569a2291922a2274a261d683f1570c7d60fb8 (diff) | |
download | gitlab-ce-e6498efe0af5537ec4bd3cb3251030e8917d06e6.tar.gz |
Make pipeline variables evaluation concept explicit
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/pipeline/expression/statement.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/gitlab/ci/pipeline/expression/statement.rb b/lib/gitlab/ci/pipeline/expression/statement.rb index 069e0ad91f7..35c3bb20608 100644 --- a/lib/gitlab/ci/pipeline/expression/statement.rb +++ b/lib/gitlab/ci/pipeline/expression/statement.rb @@ -17,13 +17,11 @@ module Gitlab def initialize(statement, pipeline) @pipeline = pipeline @lexer = Expression::Lexer.new(statement) - end - - def variables + @variables = pipeline.variables # TODO end def tokens - @lexer.tokenize + @tokens ||= @lexer.tokenize end def lexemes @@ -50,7 +48,7 @@ module Gitlab end def evaluate - parse_tree.evaluate # evaluate(variables) + parse_tree.evaluate(**@variables) end end end |