Commit Graph

60 Commits

Author SHA1 Message Date
GitLab Bot 3c55affa66 Add latest changes from gitlab-org/gitlab@master 2023-10-19 15:07:55 +00:00
GitLab Bot b491556459 Add latest changes from gitlab-org/gitlab@master 2023-09-28 06:10:23 +00:00
GitLab Bot e97635ea6c Add latest changes from gitlab-org/gitlab@master 2023-02-16 00:09:15 +00:00
GitLab Bot 31522c5182 Add latest changes from gitlab-org/gitlab@master 2022-08-18 09:11:27 +00:00
GitLab Bot 2d096b1a9b Add latest changes from gitlab-org/gitlab@master 2022-07-28 00:09:28 +00:00
GitLab Bot 7eca3f5662 Add latest changes from gitlab-org/gitlab@master 2022-05-13 15:07:43 +00:00
GitLab Bot 85a825bbbf Add latest changes from gitlab-org/gitlab@master 2021-11-25 12:10:23 +00:00
GitLab Bot eb1755b2d9 Add latest changes from gitlab-org/gitlab@master 2021-03-02 21:11:07 +00:00
GitLab Bot e14148b7ed Add latest changes from gitlab-org/gitlab@master 2020-09-17 15:09:24 +00:00
GitLab Bot 0ca5c1a237 Add latest changes from gitlab-org/gitlab@master 2020-07-29 18:09:50 +00:00
GitLab Bot 829e846dd5 Add latest changes from gitlab-org/gitlab@master 2020-07-28 09:09:41 +00:00
GitLab Bot d6348d22dd Add latest changes from gitlab-org/gitlab@master 2020-06-24 09:08:32 +00:00
Marius Bobin 65b20f35dc Ensure CI matching operator receives an object
Ensure the evaluation of right-hand side expression always
results in the returning of an object or an empty String
2019-08-21 18:48:16 +00:00
Thong Kuah f540ffcef6 Add frozen_string_literal to spec/lib (part 1)
Using the sed script from
https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-07-26 13:25:07 +12:00
drew cimino 0ca1e51cf5 Removing ci_variables_complex_expressions feature flag and deprecated code branches 2019-07-12 20:20:44 -04:00
drew cimino 396348dd17 Return boolean from Lexeme::Matches#evaluate 2019-06-14 17:58:42 -04:00
drew cimino cfaac75322 && and || operators for CI Pipeline expressions.
Refactored regex pattern matching to eagerly return tokens

Packaged behind a default-enabled feature flag and added operator documentation.
2019-06-04 19:03:24 -05:00
Kamil Trzciński 8fa1ab4c33 Support negative matches
This adds support for != and !~ operators
giving more flexibility in comparing values
2019-04-23 14:19:06 +02:00
Kamil Trzciński b22287f00f Make CI refs matching to to use UntrustedRegexp
This makes ref validation to use always `UntrustedRegexp`.
This also splits the existing RubySyntax into separate
class.
2019-03-15 14:38:28 +01:00
Takuya Noguchi e902f462c2 Eliminate duplicated words
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2018-11-22 01:01:23 +09:00
Grzegorz Bizon af9b0bfbae Simplify untrusted regexp factory method 2018-05-18 10:14:10 +02:00
Grzegorz Bizon 61d55b56ab Update variables expressions statement specs 2018-05-17 12:55:19 +02:00
Grzegorz Bizon 8b3e21b66b Add variables expression pattern validation support 2018-05-17 12:44:46 +02:00
Grzegorz Bizon a1f1e08670 Add anti-corruption layer above expressions pattern matching 2018-05-17 12:35:20 +02:00
Grzegorz Bizon f52de2f73c Make variables expression pattern case-sensitivity explicit 2018-05-15 15:18:18 +02:00
Grzegorz Bizon 7babc59e47 Use parameterized RSpec to improve variables expressions specs 2018-05-15 13:15:38 +02:00
Grzegorz Bizon 65f4e7b2a1 Add support for pattern matching in variables expressions 2018-05-15 13:04:18 +02:00
Grzegorz Bizon 475d2edf04 Reorganize exceptions in pipeline expressions module 2018-05-15 12:37:09 +02:00
Grzegorz Bizon f16f2b5994 Add pattern matching variables expression lexeme 2018-05-14 15:03:10 +02:00
Grzegorz Bizon ac65257c40 Raise variables statement exception if pattern is invalid 2018-05-14 14:38:08 +02:00
Grzegorz Bizon b784a985f2 Do not raise if variable expression can not be evaluated 2018-05-14 14:27:07 +02:00
Grzegorz Bizon 8b736c91fc Implement variables expression untrusted pattern lexeme 2018-05-11 13:29:05 +02:00
Grzegorz Bizon 8a2bc9b445 Integration variables collections with expressions 2018-03-23 13:44:12 +01:00
Grzegorz Bizon f2ec6c1c34 Merge branch 'backstage/gb/populating-pipeline-refactoring' into feature/gb/variables-expressions-in-only-except
* backstage/gb/populating-pipeline-refactoring: (860 commits)
  Add specs for extracted pipeline-related methods
  Bring seeds size method back to CI/CD pipeline class
  Improve YAML processor specs and remove unused code
  Fix static analysis and tests related to YAML processing
  Add specs for pipeline chain that builds stages and jobs
  Do not select included stage seeds in populate chain
  Decouple YAML processor from pipeline objects
  Move policy related specs our of YAML processor tests
  Fix rubocop offense in pipeline build seed class
  Add a guard clause to avoid creating empty stages
  Evaluate only/except policies outside of YAML processor
  Make it easier to test pipeline stage seeds
  Reduce stage seeds coupling between pipeline and YAML
  Add specs for chain element that populates a pipeline
  Populate pipeline with objects before creating it
  Remove legacy service for creating pipeline stages
  Decouple pipeline stage seeds from building environments
  Support building all pipeline resource before saving
  Introduce pipeline build seeds
  Start building abstraction over pipeline seeds
  ...

Conflicts:
	lib/gitlab/ci/yaml_processor.rb
	spec/lib/gitlab/ci/yaml_processor_spec.rb
2018-03-23 12:13:44 +01:00
Grzegorz Bizon 511046f9eb Make max tokens in expressions lexer a class-level attribute 2018-03-01 14:42:11 +01:00
Grzegorz Bizon 26167c24f6 Improve pipeline expressions lexer 2018-03-01 12:16:58 +01:00
Grzegorz Bizon 1926eca04d Add method that checks if pipeline expression is truthy 2018-02-28 12:10:32 +01:00
Grzegorz Bizon 64e86dab62 Allow using an empty string with pipeline expressions 2018-02-28 12:06:50 +01:00
Grzegorz Bizon 6eeb837f3d Merge branch 'feature/gb/pipeline-variable-expressions' into feature/gb/variables-expressions-in-only-except
* feature/gb/pipeline-variable-expressions:
  Do not use keyword args to pass expression variables
2018-02-28 10:54:16 +01:00
Grzegorz Bizon c52255884e Add support for only/except: variables CI/CD config 2018-02-28 10:50:02 +01:00
Grzegorz Bizon 886988c9e1 Do not use keyword args to pass expression variables 2018-02-27 12:36:30 +01:00
Grzegorz Bizon df66e91129 Improve specs for pipeline expression statement 2018-02-27 10:38:16 +01:00
Grzegorz Bizon 85333aed42 Add support for single quoted string in pipeline expressions 2018-02-27 10:27:22 +01:00
Grzegorz Bizon 84c14a4ac2 Add missing specs for pipeline expression lexemes 2018-02-23 11:23:18 +01:00
Grzegorz Bizon ba70e50ec3 Adds specs for pipeline expressions raw token 2018-02-23 10:58:44 +01:00
Grzegorz Bizon 227e18ea43 Add support for evaluating pipeline expression variables 2018-02-23 10:41:10 +01:00
Grzegorz Bizon 8c7374cafc Add operator / value types in pipeline expressions 2018-02-23 10:13:43 +01:00
Grzegorz Bizon 8517627410 Move pipeline expression lexemes to a separate module 2018-02-23 10:01:27 +01:00
Grzegorz Bizon 5ee43097fd Simplify pipelines expression parser 2018-02-23 09:52:34 +01:00
Grzegorz Bizon 6fe4d2c6f0 Build a recursive parser for pipeline expressions 2018-02-22 16:04:18 +01:00