Commit Graph

896 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
Shinya Maeda d6acd8ec2f Add validate: false. Add validates uniqueness. 2017-08-18 01:43:17 +09: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
Gabriel Mazetto abb878326c Rename many path_with_namespace -> full_path 2017-08-01 07:26:58 +02:00
Grzegorz Bizon 13a15e7009 Use update_column_in_batches helper in stages migration 2017-07-31 12:23:04 +02: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 b3b8b595a1 Remove if pipeline.variables in Ci::Build#variables 2017-07-28 18:13:29 +09: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
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 f4e01b597c Move enum specific code from a concern to CI stage 2017-07-26 14:48:32 +02:00
Grzegorz Bizon 865de49b08 Update related stage status when job status is changed 2017-07-24 11:34: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 470661e1a7 Change a method name which enumerates CI/CD statuses 2017-07-20 13:06:45 +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
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 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 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
Rémy Coutable 6b76c19b40 Merge branch 'fix/offline_runner_detection' into 'master'
Fix offline runner detection

See merge request !11751
2017-07-10 08:50:35 +00:00
Shinya Maeda e0c150da2f Merge from master(Fix conflicts) 2017-07-07 22:33:32 +09:00
Alessio Caiazza eec8a0b1f5 Fix offline runner detection 2017-07-07 09:25:45 +02: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
Shinya Maeda f8391bd782 Remove validates :key, uniqueness due to new validator covers the case 2017-07-07 02:49:24 +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
Douwe Maan ec3b10e078 Merge branch '34716-environment-specific-variables-ce' into 'master'
Backports for ee-2112

Closes #34716

See merge request !12671
2017-07-06 13:11:07 +00:00
Yorick Peterse e1a3bf30b6
Rename ActiverecordSerialize cop
This cop has been renamed to ActiveRecordSerialize to match the way
"ActiveRecord" is usually written.
2017-07-06 12:01:36 +02:00
Yorick Peterse 8fbbf41e29
Added Cop to blacklist the use of `dependent:`
This is allowed for existing instances so we don't end up 76 offenses
right away, but for new code one should _only_ use this if they _have_
to remove non database data. Even then it's usually better to do this in
a service class as this gives you more control over how to remove the
data (e.g. in bulk).
2017-07-06 12:01:36 +02: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 1acaf75d9f Implement ayufan validator 2017-07-06 00:45:26 +09:00
Shinya Maeda dafc341794 Revert "Implement Ci::NestedUniquenessValidator"
This reverts commit 8f0a2b6d78.
2017-07-06 00:23:28 +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 8f0a2b6d78 Implement Ci::NestedUniquenessValidator 2017-07-05 18:38:37 +09:00
Shinya Maeda 621f9307ff Implement uniqueness_of_in_memory_validator 2017-07-05 18:38:35 +09:00
Shinya Maeda d19f9a9675 Exclude schedule variables from Import/Export feature 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 5e7db4e36c Fix spec 2017-07-05 18:38:34 +09:00