Commit Graph

167 Commits

Author SHA1 Message Date
Kamil Trzciński 828d81ee1f Optimise trace handling code to use streaming instead of full read 2017-04-06 16:20:27 +00:00
Grzegorz Bizon 66dd209661 Ignore job by default if it is a manual action
This makes it possible to maintain backwards compatibility with configs
created when manual actions were non-blocking.

From now manual actions are blocking if configured with `allow_failure:
false`, otherwise manual actions are optional, and their status is
ignored.
2017-03-06 12:01:33 +01:00
Douwe Maan 56de781a2c Revert "Enable Style/DotPosition"
This reverts commit e00fb2bdc2090e9cabeb1eb35a2672a882cc96e9.

# Conflicts:
#	.rubocop.yml
#	.rubocop_todo.yml
#	lib/gitlab/ci/config/entry/global.rb
#	lib/gitlab/ci/config/entry/jobs.rb
#	spec/lib/gitlab/ci/config/entry/factory_spec.rb
#	spec/lib/gitlab/ci/config/entry/global_spec.rb
#	spec/lib/gitlab/ci/config/entry/job_spec.rb
#	spec/lib/gitlab/ci/status/build/factory_spec.rb
#	spec/lib/gitlab/incoming_email_spec.rb
2017-02-23 09:33:19 -06:00
Douwe Maan 1fe7501b49 Revert "Prefer leading style for Style/DotPosition"
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
2017-02-23 09:33:05 -06:00
Douwe Maan 7d4b52b27d Enable Style/WordArray 2017-02-23 09:32:41 -06:00
Douwe Maan 206953a430 Prefer leading style for Style/DotPosition 2017-02-23 09:32:22 -06:00
Douwe Maan c10064aad5 Enable Style/SpaceInsideBrackets 2017-02-23 09:31:56 -06:00
Douwe Maan 3dadf306dd Enable Style/DotPosition 2017-02-23 09:31:56 -06:00
Lin Jen-Shin 9eb8133145 Make sure our current .gitlab-ci.yml is valid
This could prevent errors described in:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8970

Everything we're using right now, should be valid of course.
2017-02-10 16:33:10 +08:00
Grzegorz Bizon 7c271fb549 Fix Rubocop offense in legacy CI/CD config specs 2017-02-06 10:46:21 +01:00
Grzegorz Bizon 149f67cc2e Remove coverage entry from global CI/CD options 2017-02-04 23:04:17 +01:00
Leandro Camargo 8fe708f4a2 Make more code improvements around the '/' stripping logic 2017-01-25 01:07:45 -02:00
Leandro Camargo be7106a145 Force coverage value to always be surrounded by '/' 2017-01-25 01:07:44 -02:00
Leandro Camargo f8bec0d1fb Improve specs styles/organization and add some more specs 2017-01-25 01:07:44 -02:00
Leandro Camargo 6323cd7203 Comply to more requirements and requests made in the code review 2017-01-25 01:07:44 -02:00
Leandro Camargo f1e920ed86 Simplify coverage setting and comply to some requests in code review 2017-01-25 01:07:44 -02:00
Leandro Camargo 0713a7c3a9 Add specs to cover the implemented feature and fix a small bug 2017-01-25 01:07:44 -02:00
Douwe Maan 764fc0dd69 Merge branch 'zj-unadressable-url-variables' into 'master'
Do not check for valid url for .gitlab-ci.yml

Closes #22970

See merge request !8451
2017-01-12 18:19:11 +00:00
Z.J. van de Weg 6ef6f9f205 Do not check for valid url for .gitlab-ci.yml
Until this commit, GitLab would check if the URL in your .gitlab-ci.yml
would be valid and adressable. However, this approach is rather limited.

To begin, the URL couldn't be http://example:$PORT/my-project, as the
PORT value would be interpolated after checking if the URL was valid,
which its not. Also this gem will limit the amount of protocols allowed.

This commit doesn't check, at all, if the URL is valid. This is now the
responsablilty of the user. In my opion this is right, as the user
ultimately benefits from a correct URL, but also, its impossible to
cover all cases.
2017-01-05 19:59:10 +01:00
Jared Deckard 44b0b97cf0 Test newline and carraige return groups 2016-12-28 16:32:45 -06:00
Lin Jen-Shin 05bc71c856 Convert CI YAML variables keys into strings
So that this would be more consistent with the other variables,
which all of them are string based.

Closes #25554
2016-12-15 17:05:53 +08:00
Grzegorz Bizon 65724301e6 Make CI job script a required configuration entry 2016-11-18 14:14:41 +01:00
Kamil Trzcinski ad85928752 Add logical validation to gitlab-ci.yml 2016-10-18 12:22:51 +02:00
Kamil Trzcinski bebfceb1df Fix specs 2016-10-17 23:42:49 +02:00
Kamil Trzcinski cf6a35f09a Improve JwtController implementation 2016-09-20 19:15:13 +02:00
Kamil Trzcinski 0672c5a92e Post-merge improve of CI permissions 2016-09-20 15:41:41 +02:00
Kamil Trzcinski 967eb8fb55 Merge branch 'master' into per-build-token 2016-09-19 13:31:42 +02:00
Kamil Trzcinski b51ededc5f Don't leak build tokens in build logs 2016-09-19 12:38:10 +02:00
Kamil Trzcinski 8fe05d83ac Fix validation regexs (+1 squashed commit)
Squashed commits:
[f9a9315] Use : to test invalid environment name
2016-09-19 10:07:15 +02:00
Grzegorz Bizon 2ad7753d34 Fix CI job environment configuration attributes 2016-09-19 10:07:14 +02:00
Kamil Trzcinski 6b97968745 Update support for dynamic environments 2016-09-19 10:07:13 +02:00
Katarzyna Kobierska dac4c5bb53 Fix invalid curl command 2016-09-07 12:19:36 +02:00
Katarzyna Kobierska 0d81fd05b9 Code refactor 2016-09-07 12:10:49 +02:00
Katarzyna Kobierska 1a7a900d8e Improve code 2016-09-07 12:10:49 +02:00
Katarzyna Kobierska 2c8b830fdb Code refactoring 2016-09-07 12:10:49 +02:00
Katarzyna Kobierska bbba62fa51 Fix errors and grammar 2016-09-07 12:10:49 +02:00
Katarzyna Kobierska cc06eab237 Change class method name 2016-09-07 12:10:49 +02:00
Katarzyna Kobierska 9e313c1294 Add class method to encapsulate exception 2016-09-07 12:10:49 +02:00
Kamil Trzcinski 4ccf39cde7 Fix test failures, that did occur because of missing previously used `reload_status!` call 2016-08-11 22:54:25 +02:00
Kamil Trzcinski 6a6a69f4af Use state machine for pipeline event processing 2016-08-11 21:32:16 +02:00
Kamil Trzcinski 39203f1adf Pre-create all builds for Pipeline when a trigger is received
This change simplifies a Pipeline processing by introducing a special new status: created.
This status is used for all builds that are created for a pipeline.
We are then processing next stages and queueing some of the builds (created -> pending) or skipping them (created -> skipped).
This makes it possible to simplify and solve a few ordering problems with how previously builds were scheduled.
This also allows us to visualise a full pipeline (with created builds).

This also removes an after_touch used for updating a pipeline state parameters.
Right now in various places we explicitly call a reload_status! on pipeline to force it to be updated and saved.
2016-08-11 15:22:35 +02:00
tiagonbotelho 519275c110 fixes part1 of files to start using active tense 2016-08-09 15:06:23 +01:00
Grzegorz Bizon 65871dfda5 Remove empty context from CI config processor specs 2016-08-05 08:11:01 +02:00
Grzegorz Bizon c7b31e4029 Enable some Rubocop cops related to new lines 2016-08-03 12:02:41 +02:00
Grzegorz Bizon dff10976da Move job dependencies entry to the new CI config 2016-07-20 14:15:18 +02:00
Grzegorz Bizon 795c9f2241 Merge branch 'master' into refactor/ci-config-move-job-entries
* master: (321 commits)
  Fix the Sentry spam from CSP violations by disabling it.
  Limit git rev-list output count to one in forced push check
  Ensure Owners are included in the scope for authorized_projects
  Fix alignment of icons on project page
  Fix ci_status_helper_spec to look for new SVGs
  use 2.0.5, actually (2.0.4 was a bad release)
  upgrade rouge to 2.0.4
  Fix help page paths to make sure shortcuts and the UI help page work.
  fixes an issue cause by a bad merge
  Vertically align status icon within table
  Add new icons for every CI status
  Add global style for running icon
  Align running icon in merge request
  Add new running icon; add a bunch of styles to get svg to match existing fa icons
  Improve code design
  Fix broken builds_for_ref
  Move when tests before to make it no conflict with manual-actions
  Use value of `yaml_variables` and `when` from config_processor if undefined
  Add CHANGELOG entry
  CHANGELOG item
  ...

Conflicts:
	lib/ci/gitlab_ci_yaml_processor.rb
	spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
2016-07-20 10:44:01 +02:00
Grzegorz Bizon bb8bf6427d Move job environment validation to new CI config 2016-07-19 13:08:28 +02:00
Grzegorz Bizon 943ae747ea Move tags and allow_failure CI entries to new config 2016-07-18 16:33:20 +02:00
Grzegorz Bizon 24b686ebb6 Move job artifacts configuration new CI config code 2016-07-18 15:21:53 +02:00
Kamil Trzcinski 7d0fe1f04e Add implementation of manual actions 2016-07-18 14:44:21 +02:00