Commit Graph

125 Commits

Author SHA1 Message Date
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
Grzegorz Bizon 47fa9f33ca Move job variables config entry to new CI config 2016-07-18 13:09:00 +02:00
Grzegorz Bizon 1bf9e34713 Move except and only job nodes to new CI config 2016-07-18 12:37:42 +02:00
Grzegorz Bizon 27e88efceb Move job image and services nodes to new CI config 2016-07-18 09:54:38 +02:00
Grzegorz Bizon bbda05863f Merge branch 'master' into refactor/ci-config-move-job-entries
* master: (522 commits)
  Fix CI yaml example
  Align cancel and retry buttons
  Remove deploy to production button
  Fix a bug where the project's repository path was returned instead of the wiki path
  Don't fail to highlight when Rouge doesn't have a lexer
  Revert "Merge branch 'gl-dropdown-issuable-form' into 'master'"
  Update tests
  Don't fail when Ci::Pipeline doesn't have a project
  Don't fail when a LegacyDiffNote didn't store the right diff
  Update CHANGELOG
  Use cattr_accessor instead duplicating code on NoteOnDiff concern
  Fix mentioned users list on diff notes
  Don't ask Heather to review documentation MR's
  add project name and namespace to filename on project export
  navbar_icon was renamed to custom_icon in:
  use %(...) and %[...] in favor of %<...>
  Fix spec Don't attempt to disable statement timeout on a MySQL DB
  Disable statement timeout outside of transaction and during adding concurrent index
  Disable PostgreSQL statement timeout during migrations
  Add visibility icon
  ...
2016-07-18 09:37:51 +02:00
Kamil Trzcinski 22c2814b09 Refactor gitlab_ci_yaml_processor variables tests 2016-07-17 13:03:57 +02:00
Kamil Trzcinski 0793370c1a Fix gitlab_ci_yaml_processor_spec.rb 2016-07-16 22:16:38 +02:00
Kamil Trzcinski 50b54951e8 Fix gitlab_ci_yaml_processor_spec.rb 2016-07-16 20:53:24 +02:00
Kamil Trzcinski 9912ad261f Store when and yaml variables in builds table 2016-07-16 20:25:30 +02:00
Grzegorz Bizon 615c9730e7 Remove job cache configfrom legacy yaml processor 2016-07-14 16:01:18 +02:00
Grzegorz Bizon 3e16b015b9 Revert logical validation in CI job stage entry 2016-07-14 15:45:07 +02:00
Grzegorz Bizon 56ae9f6ba9 Improve CI job entry validations in new config 2016-07-14 13:14:09 +02:00
Robert Speicher adc6ec4a9c Avoid `describe`-ing symbols in specs 2016-07-12 10:27:58 -05:00
Grzegorz Bizon 8c9c3eda7a Prevalidate CI entries recursively on processed 2016-07-12 12:56:21 +02:00
Grzegorz Bizon 500b61e14f Move after script CI job confg to new processor 2016-07-10 14:41:14 +02:00
Grzegorz Bizon 3c5b1da2a1 Add before_script node to CI job entry config 2016-07-10 13:54:39 +02:00
Grzegorz Bizon ccbdb4022a Integrate CI job stage entry into CI configuration 2016-07-09 14:56:41 +02:00
Grzegorz Bizon 4491bf28e1 Move CI job config validations to new classes 2016-07-06 14:08:19 +02:00
Grzegorz Bizon dbab56a951 Create composite job entries in new CI config 2016-07-05 14:48:17 +02:00
Rémy Coutable 06c7d6f3a8 Merge branch 'refactor/ci-config-move-global-entries' into 'master'
Move global ci entries handling from legacy to new config

## What does this MR do?

This MR moves responsibility of handling global CI config entries (like `image`, `services`), from legacy `GitlabCiYamlProcessor` to new CI Config

## Why was this MR needed?

This is the next iteration of CI configuration refactoring

## What are the relevant issue numbers?

#15060

## Does this MR meet the acceptance criteria?

- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)

See merge request !4820
2016-07-05 08:37:16 +00:00
Grzegorz Bizon bfad4c61f1 Add minor improvements in readability in CI config 2016-07-04 18:36:06 +02:00
Grzegorz Bizon 9e211091a8 Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
Grzegorz Bizon f4421817de Add global cache config entry to new CI config 2016-06-29 09:48:52 +02:00
Grzegorz Bizon 2846f95d2a Merge branch 'master' into refactor/ci-config-move-global-entries
* master: (352 commits)
  Display last commit of deleted branch in push events (!4699)
  add changelog
  add missing attribute to attr_encrypted so it is fully backwards-compatible
  Add "GitLab team members only" to diagram link
  doc: note that .gitattributes uses default branch
  use the conf lexer so we have highlighted comments
  first draft of docs
  support cgi style options, such as erb?parent=json
  move the path alias to a more appropriate location
  make #custom_language private
  appease rubocop
  add an alias for Snippet#path
  appease rubocop
  check the tag so that an instance will pass too
  fix the spec, using project.change_head
  Revert "bump the master sha for gitlab-test!9"
  bump the master sha for gitlab-test!9
  add custom highlighting via .gitattributes
  Rename Licenses API to License Templates API
  Check for conflict with wiki projects when creating a new project.
  ...
2016-06-28 14:38:05 +02:00
Rémy Coutable 7ca3685959 Merge branch 'test-gitlab-ci-ymls' into 'master'
Test templates and GitLabCI parser againts each other

## What does this MR do?

Test the available templates against the preprocessor and vice versa

## Are there points in the code the reviewer needs to double check?

The dynamic creation of tests seems a little hacked. Is there a cleaner way?

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added -- Seems unneeded
- [x] All builds are passing
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)

See merge request !4898
2016-06-27 15:16:19 +00:00
Z.J. van de Weg cf8a19b13c Test templates and GitLabCI parser againts each other 2016-06-27 09:27:01 +02:00
Grzegorz Bizon 823970b570 Fix ci config cache validation in legacy processor 2016-06-24 08:25:10 +02:00
Grzegorz Bizon 29b96d92c1 Move CI stages configuration to new CI config 2016-06-23 13:51:07 +02:00
Grzegorz Bizon 2240807c1a Assume that unspecified CI config is undefined
We assume that when someone adds a key for the configuration entry, but
does not provide a valid value, which causes entry to be `nil`, then
entry should be considered as the undefined one. We also assume this is
semantically correct, this is also backwards compatible with legacy CI
config processor.

See issue #18775 for more details.
2016-06-23 10:22:41 +02:00
Grzegorz Bizon 05ce8a1187 Handle CI environment variables in a new CI config 2016-06-22 11:22:53 +02:00
Grzegorz Bizon d399128955 Handle after script CI config in new classes
This also makes Script to return an array of commands instead of
concatented command, which is our current direction.
2016-06-21 13:02:14 +02:00
Grzegorz Bizon fc00c545b2 Handle CI services config in new CI config classes 2016-06-21 12:40:52 +02:00
Grzegorz Bizon cd6a2afbbb Move CI image configuration entry to new CI config 2016-06-21 12:10:13 +02:00
Grzegorz Bizon 9510d31b4d Merge branch 'master' into refactor/ci-config-add-entry-error
* master: (345 commits)
  use rails root join
  fixed a couple of errors spotted in production
  Fix RangeError exceptions when referring to issues or merge requests outside of max database values
  Fix bug in `WikiLinkFilter`.
  Small frontend code fixes and restore 8a2d88f commit
  Warn about admin privilege to disable GitHub Webhooks
  Listing GH Webhooks doesn't stop import process for non GH admin users
  fixup! updated docs for api endpoint award emoji
  Update CHANGELOG
  Ensure Todos counters doesn't count Todos for projects pending delete
  Add endpoints for award emoji on notes
  Sort API endpoints and implement feedback
  Add endpoints for Award Emoji
  Fixed issue with assignee dropdown not selecting correctly
  Removed update method Re-structured controller spec Renamed issuable param to issuable_id
  Fix clibpoard buttons on "Check out branch" modal.
  Track method call times/counts as a single metric
  Cache todo counters (pending/done)
  Fix a 'wrong number of arguments' error
  Added missing mount point for Sidekiq Metrics API, after it got lost on rebase.
  ...
2016-06-20 10:38:46 +02:00
Rémy Coutable ae4491b421 Merge branch 'fix/error-when-job-variables-not-defined-but-specified' into 'master'
Fix error when CI job variables key used but not specified

## What does this MR do?

This MR fixes a an error when CI job variables specified, but not defined:

```yaml
image: ruby:2.2

test:
  variables:
  script:
     - rspec
```

## What are the relevant issue numbers?

Closes #18764  
Follow up discussion in: #18775 

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !4745
2016-06-17 15:10:06 +00:00
Grzegorz Bizon eaa91cbe12 Fix error when CI job variables not specified 2016-06-17 14:14:55 +02:00
Grzegorz Bizon 2a87a55f87 Merge branch 'master' into refactor/ci-config-add-entry-error
* master: (189 commits)
  Update CHANGELOG for !4659
  Center the header logo for all Devise emails
  Add previews for all customized Devise emails
  Customize the Devise `unlock_instructions` email
  Customize the Devise `reset_password_instructions` email
  Customize the Devise `password_change` emails
  Use gitlab-git 10.2.0
  Use Git cached counters on project show page
  Fix indentation scss-lint errors
  Added title attribute to enties in tree view Closes #18353
  Banzai::Filter::ExternalLinkFilter use XPath
  Reduce queries in IssueReferenceFilter
  Use gitlab_git 10.1.4
  Fixed ordering in Project.find_with_namespace
  Fix images in emails
  Banzai::Filter::UploadLinkFilter use XPath
  Turn Group#owners into a has_many association
  Make project_id nullable
  ...
2016-06-17 12:25:43 +02:00
Kamil Trzcinski aef6214c42 Validate only and except regexp
Currently the RegexpError can be raised when processing next stage which leads to 500 in different places of code base.
This adds early check that regexps used in only and except are valid.
2016-06-17 11:52:22 +02:00
Grzegorz Bizon 95520dfc72 Add prototype of CI config node validator
This makes use of `ActiveModel::Validations` encapsulated in a separate
class that is accessible from a node object.
2016-06-16 15:46:03 +02:00
Grzegorz Bizon 76aea978c6 Add class that encapsulates error in new Ci config 2016-06-15 14:09:21 +02:00
Kamil Trzcinski 006b650988 Merge remote-tracking branch 'origin/master' into environments-and-deployments
# Conflicts:
#	db/schema.rb
2016-06-14 16:19:29 +02:00
Kamil Trzcinski e8f09f02bf Validate environment name with regex 2016-06-14 13:04:21 +02:00
Kamil Trzcinski 72f6f46e11 Merge remote-tracking branch 'origin/master' into artifacts-expire-date 2016-06-13 18:58:55 +02:00