Commit Graph

469 Commits

Author SHA1 Message Date
Kamil Trzciński e00e62c2c8 Merge branch 'backstage/gb/migrate-stages-statuses' into 'master'
Migrate CI/CD stages statuses

Closes #33453

See merge request !12584
2017-08-21 11:47:44 +00:00
Grzegorz Bizon 1066d8ba77 Use usual method to retrieve CI/CD stage statuses 2017-08-16 13:30:49 +02:00
Grzegorz Bizon 32d0983a4e Merge branch 'master' into backstage/gb/migrate-stages-statuses
* master: (1000 commits)
  Fix username autocomplete group name with no avatar alignment
  Fix 'Projected tags' typo in protected_tags_spec.rb
  Many Repo Fixes
  Repo Editor Fixes
  Docs: New index for permissions
  link article from CI index
  link tech articles from the landing page
  new articles come first
  fix relative link
  fix date format
  Fixed changed files dropdown not being shown
  Update publication date
  Remove deprecated field from workhorse API responses
  Fix API responses when dealing with txt files
  Make sure MySQL would not use CURRENT_TIMESTAMP
  Add two more project templates
  Allow usage of any_projects? with an Array
  Copyedit Artifactory and GitLab article
  Rename Artifactory and GitLab article file
  Display GPG status loading spinner only when Ajax request is made
  ...
2017-08-16 13:18:03 +02:00
vanadium23 e99444bb2d Fix CI_PROJECT_PATH_SLUG slugify 2017-08-15 08:22:56 +03:00
Lin Jen-Shin bb5f79d43e Don't include EmailHelpers manually, pick with rspec
`:mailer` is needed to pick it easily, while
`type: :mailer` is needed for picking it automatically for
tests located in spec/mailers/*_spec.rb

It's a bit complicated in spec/services/notification_service_spec.rb
but we'll leave it alone for now.
2017-08-03 21:55:48 +08:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Grzegorz Bizon 8f1274ae03 Merge commit '9a3b283402b8cc1c86802c526f19a459ce09c2e3' into backstage/gb/migrate-stages-statuses
* commit '9a3b283402b8cc1c86802c526f19a459ce09c2e3': (270 commits)
  Add a note about EFS and GitLab log files
  Projects logo are not centered vertically on projects page
  Fix spec/features/projects/branches_spec
  Fixup POST /v3/:id/hooks and PUT /v3/:id/hooks/:hook_id
  Fix a spec that was assuming to be on the wrong page
  Add copy about search terms to ux guide
  Update documentation of user creation by replacing the 'confirm' param with 'skip_confirmation'
  Fix replying to commit comments on MRs from forks
  Fix 500 error when rendering avatar for deleted project creator
  Load and process at most 100 commits when pushing into default branch
  Ensure Gitlab::Application.routes.default_url_options are set correctly in Capybara + :js specs
  Add log messages to clarify log messages about API CSRF token verification failure
  Update gitlab_flow.md, Teatro seems to be completely dead, see also https://forum.gitlab.com/t/gitlab-flow-documentation-teatro/7774
  Fix diff commenting results just after changing view
  Update CHANGELOG.md for 9.4.2
  none is not a CSS Value for sizes ;-)
  Merge issuable "reopened" state into "opened"
  Make access level more compatible with EE
  Add link to JIRA article in docs
  Expand pipeline_trigger_service_spec by godfat request
  ...
2017-07-31 10:50:10 +02:00
Shinya Maeda 1ad4efe64e fix merge miss 2017-07-28 18:13:29 +09:00
Shinya Maeda 56418e85ac init 2017-07-28 18:13:29 +09:00
Rémy Coutable cddc5cacfb Use described_class when possible
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02: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
Keifer Furzland 7e113b6824 Remove superfluous type defs in specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:52 +02:00
Grzegorz Bizon 79a7f7b6e5 Merge branch 'master' into backstage/gb/migrate-stages-statuses
* master: (110 commits)
  Add missing colon
  Fix project wiki web_url spec
  Resolve "Memory usage notice doesn't link anywhere"
  Docs new topic "user/index"
  Implement GRPC call to RepositoryService
  Pending delete projects should not show in deploy keys
  Remove outdated ~Frontend label in CONTRIBUTING.md
  Fixes 500 error caused by pending delete projects in admin dashboard
  Add lower path index to redirect_routes
  Remove project_key from the Jira configuration
  Update CHANGELOG.md for 9.4.1
  Enable gitaly_post_upload_pack by default
  Add `api` prefix as a top level route in the spec.
  Move relative_path to the element that is being clicked
  Bumps Gitlab Omniauth LDAP version
  Add directives to Vue component ordering
  synchronize ukrainian translation in zanata again
  v3 API is unsupported after 9.5, but may not be removed
  Fix vertical alignment in firefox and safari for pipeline mini graph
  Adds link_to_gfm method instrumentation
  ...

Conflicts:
	db/schema.rb
2017-07-26 14:54:45 +02:00
Grzegorz Bizon 7d6538f2e2 Rename method responsible for updating stage status 2017-07-26 14:50:48 +02:00
Grzegorz Bizon d3814ad698 Adds some specs for stage optimistic locking 2017-07-24 11:22:01 +02:00
Grzegorz Bizon 0aefb51693 Merge branch 'master' into backstage/gb/migrate-stages-statuses
* master: (97 commits)
  Bulk update sidebar UI polish
  Fix margin in mini graph for commits box
  Add space between words in language dropdown
  Fix support for old CI API when image or services are not specified
  Short-circuit build coverage extraction for empty regexes
  Update VERSION to 9.5.0-pre
  Update CHANGELOG.md for 9.4.0
  Compress gitlab svg logo
  Fix the gcovr coverage regex by removing line separators before scanning
  Capitalize Sidekiq word in dev doc
  Add 1px to breadcrumbs min height
  Update nginx docs
  Use custom font SVG for logo
  Port spinach tests to rspec feature specs
  Merge branch 'fix-re2-infinite-loop-nick' into 'security-9-3'
  Copy-edit background migrations guidelines
  Add Traditional Chinese in Taiwan translations of Pipeline Schedules
  Fix new project selectors in GitLab QA
  Reword success to passing for pipeline badges
  Rename build to pipeline for status badges
  ...
2017-07-24 11:01:34 +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
Grzegorz Bizon bbdc35717c Implement method that updates a stage status 2017-07-20 13:30:48 +02:00
Grzegorz Bizon 0605cdd759 Implement proper associations with a persisted stage 2017-07-20 13:05:26 +02:00
Grzegorz Bizon 54efa041d7 Merge branch 'master' into backstage/gb/migrate-stages-statuses
* master: (319 commits)
  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
  Add Esperanto translations of Pipeline Schedules
  Add Traditional Chinese in HongKong translations of Pipeline Schedules
  Add Simplified Chinese translations of Pipeline Schedules
  Resolve "Clarify k8s service keys"
  ...

Conflicts:
	db/schema.rb
2017-07-20 11:48:23 +02:00
Grzegorz Bizon 2f620aa711 Change auto-retry count to a correct value in docs 2017-07-20 11:02:00 +02:00
Lin Jen-Shin 7bd5e57125 Instead of adding master, stub_not_protect_default_branch 2017-07-18 23:48:14 +08:00
Lin Jen-Shin 65e722ee97 Merge remote-tracking branch 'upstream/master' into 30634-protected-pipeline
* upstream/master: (638 commits)
  Simplify background migrations stealing code
  Expire cached user IDs that can see the performance after 5 minutes
  Promote visibility level helpers from Group to Namespace
  Fix off-by-one error in background migration retries
  Recover from all exceptions when stealing bg migration
  Fix label creation from new list for subgroup projects
  move click handler to button. when on the icon it wasn't triggered in firefox
  Fix incorrect AWS ELB metrics.
  Fix wrong link to docs in docs styleguide
  Update issue-related docs
  Refactor groups docs
  Add subgroups limitations to Pages docs
  Update Google launcher details
  Split docs on IP whitelist for monitoring access
  Update health check docs
  Bump fog-core to 1.44.3 and fog providers' plugins to latest
  Introduce have_gitlab_http_status
  Remove Repository#search_files
  Update Pipeline's badge count in Merge Request and Commits view to match real-time content
  Fixes the user order being overriden in the autocomplete controller
  ...
2017-07-17 22:38:37 +08:00
Grzegorz Bizon 7fde7012c9 Make it possible to auto retry a failed CI/CD job 2017-07-17 13:00:32 +02:00
Grzegorz Bizon 9bb7f19d15 Make it possible to count a number of job retries 2017-07-17 12:38:21 +02:00
Paul Charlton cb3b4a15e6 Support multiple Redis instances based on queue type 2017-07-11 03:35:47 +00:00
Grzegorz Bizon 6120dc261a Merge branch 'master' into backstage/gb/migrate-stages-statuses
* master: (587 commits)
  Increase GitLab QA screenshots size
  Fix QA test scenario for creating a new project
  Configure headless chrome screenshots correctly
  Allow passing exceptions when creating project services
  Also inject new route helpers into includers of GitlabRoutingHelper
  Remove many N+1 queries with merge requests API
  fix milestones finder failing spec
  Make wrong migrations idempotent
  Remove double border on last group row
  Update tests to test what the component renders and what the clicks calls
  Username and password are no longer stripped from import url on import
  Change `sign_out` usage to `gitlab_sign_out` in one spec
  Send Gitaly Repository with /api/internal/allowed
  Resolve "Liberation Mono weird font rendering on Fedora/openSUSE/other Linux distros"
  Force mobile view for admin projects
  fix spec
  Mark a subgroup-related spec as PostgreSQL-only
  Use vue .prevent to prevent the click
  Add members-list class to admin projects page
  Fix another typo in SHA attribute spec
  ...

Conflicts:
	db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb
	db/schema.rb
	lib/gitlab/background_migration/migrate_build_stage_id_reference.rb
	spec/migrations/migrate_stage_id_reference_in_background_spec.rb
2017-07-10 13:40:11 +02:00
Shinya Maeda e0c150da2f Merge from master(Fix conflicts) 2017-07-07 22:33:32 +09:00
Shinya Maeda 1ee9f7db83 Remove a spec: validate_uniqueness_of for key 2017-07-07 16:27:42 +09:00
Shinya Maeda 08fba1327f merge from master 2017-07-07 16:12:13 +09:00
Shinya Maeda 5b0954759c Basic BE change
Fix static-snalysis

Move the precedence of group secure variable before project secure variable. Allow project_id to be null.

Separate Ci::VariableProject and Ci::VariableGroup

Add the forgotton files

Add migration file to update type of ci_variables

Fix form_for fpr VariableProject

Fix test

Change the table structure according to the yorik advice

Add necessary migration files. Remove unnecessary migration spec.

Revert safe_model_attributes.yml

Fix models

Fix spec

Avoid self.variable. Use becomes for correct routing.

Use unique index on group_id and key

Add null: false for t.timestamps

Fix schema version

Rename VariableProject and VariableGroup to ProjectVariable and GroupVariable

Rename the rest of them

Add the rest of files

Basic BE change

Fix static-snalysis

Move the precedence of group secure variable before project secure variable. Allow project_id to be null.

Separate Ci::VariableProject and Ci::VariableGroup

Add the forgotton files

Add migration file to update type of ci_variables

Fix form_for fpr VariableProject

Fix test

Change the table structure according to the yorik advice

Add necessary migration files. Remove unnecessary migration spec.

Revert safe_model_attributes.yml

Fix models

Fix spec

Avoid self.variable. Use becomes for correct routing.

Use unique index on group_id and key

Add null: false for t.timestamps

Fix schema version

Rename VariableProject and VariableGroup to ProjectVariable and GroupVariable

Rename the rest of them

Add the rest of files

Implement CURD

Rename codes related to VariableGroup and VariableProject FE part

Remove unneccesary changes

Make Fe code up-to-date

Add protected flag to migration file

Protected group variables essential package

Update schema

Improve doc

Fix logic and spec for models

Fix logic and spec for controllers

 Fix logic and spec for views(pre feature)

Add feature spec

Fixed bugs. placeholder. reveal button. doc.

Add changelog

Remove unnecessary comment

godfat nice catches

Improve secret_variables_for arctecture

Fix spec

Fix StaticAnlysys & path_regex spec

Revert "Improve secret_variables_for arctecture"

This reverts commit c3216ca212322ecf6ca534cb12ce75811a4e77f1.

Use ayufan suggestion for secret_variables_for

Use find instead of find_by

Fix spec message for variable is invalid

Fix spec remove variable.group_id = group.id

godffat spec nitpicks

Use include Gitlab::Routing.url_helpers for presenter spec
2017-07-07 15:33:17 +09:00
Sean McGivern aff5c9f3e5 Add table for merge request commits
This is an ID-less table with just three columns: an association to the merge
request diff the commit belongs to, the relative order of the commit within the
merge request diff, and the commit SHA itself.

Previously we stored much more information about the commits, so that we could
display them even when they were deleted from the repo. Since 8.0, we ensure
that those commits are kept around for as long as the target repo itself is, so
we don't need to duplicate that data in the database.
2017-07-06 17:36:10 +01:00
Lin Jen-Shin d9435d6121 Backports for ee-2112
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2112
2017-07-06 16:25:03 +08:00
Shinya Maeda 8a950baf58 Improve test on spec/models/ci/pipeline_schedule_spec.rb 2017-07-06 01:24:20 +09:00
Lin Jen-Shin 33a5157ad4 Merge remote-tracking branch 'upstream/master' into 32815--Add-Custom-CI-Config-Path
* upstream/master: (149 commits)
  Revert change to design. Go back to scrollable page
  Fixes the column widths for the new navigation options in settings
  Migrate #submodule_url_for to Gitaly
  Add test example for external commit status retries
  Fix invalid Rails.logger call in lib/gitlab/health_checks/fs_shards_check.rb
  Fix build for !12300.
  Log rescued exceptions to Sentry
  Fix issues with non-UTF8 filenames by always fixing the encoding of tree and blob paths
  Revert "Merge branch 'revert-12499' into 'master'"
  Prevent accidental deletion of protected MR source branch by repeating checks before actual deletion
  Improve the overall UX for the new monitoring dashboard
  Document that GitLab 9.3 requires the TRIGGER permission on MySQL
  Instrument Unicorn with Ruby exporter
  Remove group modal like remove project modal. Closes #33130
  Update prometheus client gem
  Enables the option in user preferences to turn on the new navigation
  Add Jasmine tests for `OAuthRememberMe`
  Simplify authentication logic in the v4 users API for !12445.
  Use stub_application_setting when testing ApplicationHelper#support_url
  wait_for_requests is not needed when AJAX is not in play
  ...
2017-07-05 22:05:39 +08:00
Lin Jen-Shin 56ea7a0cfe Merge allowed_to_create? into CreatePipelineService 2017-07-05 21:55:35 +08:00
Lin Jen-Shin 9f5ac179d1 Rename ci_config_file to ci_config_path 2017-07-05 20:11:01 +08:00
Lin Jen-Shin 9f7e5e45df Add back Pipeline#ci_yaml_file_path due to all the troubles 2017-07-05 20:04:53 +08:00
Shinya Maeda dbd0111390 Revert unnecesarry changes 2017-07-05 21:00:22 +09:00
Shinya Maeda 1bfa818a1f zj nice catchies 3 2017-07-05 18:38:35 +09:00
Shinya Maeda 2f70f3fa35 Improve spec 2017-07-05 18:38:35 +09:00
Shinya Maeda 3acc91866b Fix spec 2017-07-05 18:38:35 +09:00
Shinya Maeda 324cfe0f9b Fix spec. Add PipelineScheduleVariable for import_export 2017-07-05 18:38:35 +09:00
Shinya Maeda d65d66e08b zj nice catches 2017-07-05 18:38:27 +09:00
Shinya Maeda 06f0107369 pipeline_schedule_variables model/db 2017-07-05 18:37:36 +09:00
Shinya Maeda bbbd5521d2 Improve spec 2017-07-05 18:36:19 +09:00
Shinya Maeda 17f34e5a74 Fix spec 2017-07-05 18:36:19 +09:00
Shinya Maeda b6f41544d8 Fix spec. Add PipelineScheduleVariable for import_export 2017-07-05 18:36:19 +09:00
Shinya Maeda 51730b3a15 zj nice catches 2017-07-05 18:36:18 +09:00
Shinya Maeda d278da48f8 pipeline_schedule_variables model/db 2017-07-05 18:36:18 +09:00