Commit Graph

229 Commits

Author SHA1 Message Date
Grzegorz Bizon 22f1b04637 Update merge request pipeline even if if has errors 2017-08-18 14:12:40 +02:00
Grzegorz Bizon accaf7eaf2 Make create pipeline service specs more readable 2017-08-18 13:53:11 +02:00
Lin Jen-Shin 412db1874f Fix some tests and report the error message 2017-08-09 21:41:45 +08:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Robert Speicher 9513bd18c4 Ensure all project factories use `:repository` trait or `:empty_project` 2017-08-01 14:51:52 -04:00
Shinya Maeda d608aa5846 fix 2017-08-01 17:42:05 +09:00
Shinya Maeda dca9bd9e69 Expand pipeline_trigger_service_spec by godfat request 2017-07-28 18:46:04 +09:00
Shinya Maeda b59abf5b44 Use let(:params) instead of def param 2017-07-28 18:13:30 +09:00
Shinya Maeda 48389e9944 Fix pipeline 2017-07-28 18:13:29 +09:00
Shinya Maeda 56418e85ac init 2017-07-28 18:13:29 +09:00
Rémy Coutable ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Lin Jen-Shin 43aa8866bc Merge remote-tracking branch 'upstream/master' into 30634-protected-pipeline
* upstream/master: (130 commits)
  Change auto-retry count to a correct value in docs
  Fix background migration cleanup specs
  Fix CI/CD job auto-retry specs
  Fix JS; make buttons sr accessibile; fix overlay
  remove redundant changelog entries
  Merge branch '24570-use-re2-for-user-supplied-regexp-9-3' into 'security-9-3'
  Merge branch '33303-404-for-unauthorized-project' into 'security-9-3'
  Merge branch '33359-pers-snippet-files-location' into 'security-9-3'
  Merge branch 'bvl-remove-appearance-symlink' into 'security-9-3'
  Hide description about protected branches to non-member
  Update CHANGELOG.md for 9.0.11
  Update CHANGELOG.md for 9.1.8
  Update CHANGELOG.md for 8.17.7
  Update CHANGELOG.md for 9.2.8
  Update CHANGELOG.md for 9.3.8
  Respect blockquote line breaks in markdown
  35209 Add wip message to new navigation preference section
  Add github imported projects count to usage data
  Add versions to Prometheus metrics doc
  Add Bulgarian translations of Pipeline Schedules
  ...
2017-07-20 20:36:43 +08:00
Lin Jen-Shin e9862a9900 Use struct instead of hash 2017-07-20 20:17:42 +08:00
Kamil Trzciński 4766a77b1d Merge branch 'feature/gb/auto-retry-failed-ci-job' into 'master'
Make it possible to auto retry a failed CI/CD job

Closes #3442

See merge request !12909
2017-07-20 11:25:54 +00:00
Grzegorz Bizon d382ed5eb6 Fix CI/CD job auto-retry specs 2017-07-20 07:43:15 +02:00
Lin Jen-Shin a05bc477b9 Use hash to return multiple objects 2017-07-20 00:08:34 +08:00
Ben Kochie afba21f6a0 Update piplines created metric name
* Use `_total` naming convention.
* Add to metrics documentation.
2017-07-19 09:43:57 +02:00
Lin Jen-Shin 7bd5e57125 Instead of adding master, stub_not_protect_default_branch 2017-07-18 23:48:14 +08:00
Grzegorz Bizon 63137d4e5b Add specs for pipeline process with auto-retries
This also resolve a possible race condition - a next stage should not
start until are retries are done in a previous one.
2017-07-17 13:30:49 +02:00
Grzegorz Bizon a4d301eed0 Add specs seeding jobs with auto-retries configured 2017-07-17 13:10:32 +02:00
Lin Jen-Shin 56ea7a0cfe Merge allowed_to_create? into CreatePipelineService 2017-07-05 21:55:35 +08:00
Lin Jen-Shin 28553dbc05 Update tests due to permission changes 2017-07-04 21:56:41 +08:00
Lin Jen-Shin c6bed06533 Merge remote-tracking branch 'upstream/master' into 30634-protected-pipeline
* upstream/master: (1168 commits)
  Job details won't scroll horizontally to show long lines
  Bring back branches badge to main project page
  Limit OpenGraph image size to 64x64
  Improve changelog
  Split up MergeRequestsController
  Add parent_id back to the tests
  Make changelog more descriptive
  Improve tests text
  Rename members_count to members_count_with_descendants and expose only to group admins
  Fix a bug where an invalid sort param value was passed to Gitaly
  Drop default ORDER scope when calling a find method on a Sortable model
  Add tests for project import state transition: [:started] => [:finished]
  Add CHANGELOG
  Perform housekeeping only when an import of a fresh project is completed
  Strip trailing whitespace in relative submodule URL
  Adjust projects spec on namespace fields
  Add "members_count" and "parent_id" data on namespaces API
  Removes redundant pending delete checks
  Fix gitaly ref encoding bugs
  Add ProjectWiki#ensure_repository
  ...
2017-06-29 21:14:47 +08:00
Grzegorz Bizon 64e09a1b35 Fix pipeline status when allowed to fail jobs present 2017-06-20 15:32:29 +02:00
Robert Speicher a6ec5121f0 Correct RSpec/SingleLineHook cop offenses 2017-06-14 13:18:56 -05:00
Z.J. van de Weg ff1bc1778d Add test for prom metric gathering 2017-06-08 09:58:38 +02:00
Grzegorz Bizon 4edde47e73 Fix retry build service specs related to the stage 2017-06-07 10:26:37 +02:00
Lin Jen-Shin 6d17ddac5a Still allow legacy triggers, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11910#note_31632911
2017-06-06 23:52:57 +08:00
Grzegorz Bizon 602724fcfc Clone stage_id when retrying a CI/CD job 2017-06-06 15:29:02 +02:00
Lin Jen-Shin e86e1e515a Try to report why it's failing and fix tests 2017-06-06 21:19:07 +08:00
Lin Jen-Shin 9984f07a28 Disallow legacy trigger without a owner
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11910#note_31594492
https://gitlab.com/gitlab-org/gitlab-ce/issues/30634#note_31601001
2017-06-06 18:00:34 +08:00
Lin Jen-Shin 47b93fd761 Don't check permission, only protected ref if no user 2017-06-06 02:19:47 +08:00
Lin Jen-Shin 9ecb85a4f3 Forbid creating pipeline if it's protected and
cannot create the tag if it's a tag, and
cannot merge the branch if it's a branch.
2017-06-05 23:38:06 +08:00
Grzegorz Bizon 79380fe5fb Merge branch 'master' into feature/gb/persist-pipeline-stages
* master: (524 commits)
  Improve user experience around slash commands in instant comments
  Fix LFS timeouts when trying to save large files
  retryable? is now available for CommitStatus
  Resolve "Documentation of `.gitlab-ci.yml` states incorrect example for variables"
  Fix test failures
  Add slugify project path to CI enviroment variables
  Fixed typo: craeted -> created
  32118 Make New environment empty state btn lowercase
  Expose import_status in Projects API
  32832 Remove overflow from comment form for confidential issues and vertically aligns confidential issue icon
  Fix test failures
  Allow manual bypass of auto_sign_in_with_provider
  Fix keys seed
  Allow users to be hard-deleted from the API
  fixup some classnames and media queries
  Enable the Style/PreferredHashMethods cop
  Lint our factories creation in addition to their build
  Don’t schedule workers from inside transactions
  Allow scheduling from after_commit hooks
  Forbid Sidekiq scheduling in transactions
  ...

Conflicts:
	app/serializers/pipeline_entity.rb
	db/schema.rb
	spec/factories/ci/stages.rb
	spec/lib/gitlab/import_export/safe_model_attributes.yml
	spec/services/ci/create_pipeline_service_spec.rb
	spec/spec_helper.rb
2017-06-05 12:51:59 +02:00
Grzegorz Bizon 469975c783 Revert invalid changes in new pipeline service specs 2017-06-05 10:30:57 +02:00
Kamil Trzciński f71106425c Merge branch '25680-CI_ENVIRONMENT_URL' into 'master'
Add `$CI_ENVIRONMENT_URL` as a job variable

Closes #25680

See merge request !11695
2017-06-05 07:03:39 +00:00
Lin Jen-Shin 2fa766e107 Only deploy if environment exists; Update tests accordingly 2017-06-03 00:24:20 +08:00
Grzegorz Bizon 626cb8edc3 Fix invalid conditional in pipeline create service 2017-06-02 15:05:14 +02:00
Douwe Maan 94be44c568 Fix race condition between pipeline creation and MR diff_head_sha update 2017-06-01 13:31:52 -05:00
Grzegorz Bizon aa0d6b07b6 Merge branch 'feature/gb/migrate-pipeline-stages' into feature/gb/persist-pipeline-stages
* feature/gb/migrate-pipeline-stages:
  Use stage_id column in code that needs to know about it
2017-06-01 12:58:11 +02:00
Grzegorz Bizon 1a438e9f71 Use stage_id column in code that needs to know about it 2017-06-01 12:21:34 +02:00
Grzegorz Bizon eb728d37a7 Merge branch 'master' into 'trigger-source'
# Conflicts:
#   db/schema.rb
2017-05-31 21:15:40 +00:00
Kamil Trzcinski 161af17c1b Introduce source to pipeline entity 2017-05-31 14:17:49 +02:00
Grzegorz Bizon c9b653b4a0 Fix pipeline retry specs related to protected actions 2017-05-31 11:22:12 +02:00
Grzegorz Bizon c970702517 Fix job play service specs related to protected actions 2017-05-31 11:15:25 +02:00
Grzegorz Bizon f8eb8feae3 Fix pipeline processing specs related to protected actions 2017-05-31 10:40:52 +02:00
Grzegorz Bizon 1f1f570724 Implement CI/CD config attributes for persisted stages 2017-05-30 12:48:05 +02:00
Felipe Artur fe790c7543 Set head pipeline when creating merge requests 2017-05-29 15:37:56 -03:00
Felipe Artur 5b9e801e81 Sanity check pipeline sha before saving merge request head pipeline 2017-05-23 18:58:02 -03:00
Valery Sizov 268b1c79e9 [Spec optimization] Joining one-line 'it' blocks 2017-05-15 12:39:56 +03:00