Skip to content
Snippets Groups Projects

Ci Project migrate

Merged Kamil Trzcińśki requested to merge ci-project-migrate into master
  • This doesn't migrate: allow_git_fetch, coverage_regex, timeout. Since this are project configuration settings I would propose to migrate them to .gitlab-ci.yml.
  • This requires offline migrations.
  • It simplifies database models making all CI objects to be attached to: Project.
  • It removes Ci::Project, but makes /ci/projects working by adding method: Project.find_by_ci_id for backward compatibility (badges, triggers).
  • We should add default timeout to Application Settings.
  • It misses specs.
  • It is based on ci-services-migrate for now.
  • It removes CI events.
  • It removes administrator CI projects overview.
  • It removes CI application settings.

In 8.4 or 8.5 we can remove redundant tables and columns.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Douwe Maan
    Douwe Maan @DouweM started a thread on the diff
  • 20 20 class Commit < ActiveRecord::Base
    21 21 extend Ci::Model
    22 22
    23 belongs_to :gl_project, class_name: '::Project', foreign_key: :gl_project_id
    24 has_many :statuses, dependent: :destroy, class_name: 'CommitStatus'
    23 belongs_to :project, class_name: '::Project', foreign_key: :gl_project_id
    24 has_many :statuses, class_name: 'CommitStatus'
  • Douwe Maan
    Douwe Maan @DouweM started a thread on the diff
  • 193 187
    194 188 def config_processor
    195 189 return nil unless ci_yaml_file
    196 @config_processor ||= Ci::GitlabCiYamlProcessor.new(ci_yaml_file, gl_project.path_with_namespace)
    190 @config_processor ||= Ci::GitlabCiYamlProcessor.new(ci_yaml_file, project.path_with_namespace)
  • Douwe Maan
    Douwe Maan @DouweM started a thread on the diff
  • 37 37 %thead
    38 38 %tr
    39 39 %th Status
    40 %th Build ID
    40 %th Runner
    • I'm not sure a regular user cares about the specific runner. The Build ID links to the build page, so I'm more interested in that. In any case, the commit_statuses/_commit_status partial still shows the build ID, so right now the column head is wrong.

    • Author Maintainer

      This is random invalid change. Sorry about that.

  • Leaving this up to @DouweM for review

  • He has a better focus for big changes set

  • Kamil Trzcińśki Added 284 commits:

    Added 284 commits:

    • 1e867f26...8c83e6ba - 283 commits from branch ci-services-migrate
    • 0395a395 - Migrate CI::Project to Project
  • Kamil Trzcińśki Added 46 commits:

    Added 46 commits:

    • 0395a395...dc4e2744 - 40 commits from branch ci-services-migrate
    • 89d94324 - Migrate CI::Project to Project
    • 15f56300 - Add runners token
    • d08b0741 - Remove ci_ prefix from all ci related things
    • 34d31e9d - Reimplement Trigger API
    • 587a522c - Rename columns and rename migrations
    • 46b09ea9 - Fix triggers tests
  • Added 1 commit:

    • ff3293ca - Finishing touches
  • Kamil Trzcińśki Added 12 commits:

    Added 12 commits:

    • ff3293ca...71e6a93d - 2 commits from branch ci-services-migrate
    • a9120cf4 - Migrate CI::Project to Project
    • 5ab8e229 - Add runners token
    • 67c09c63 - Remove ci_ prefix from all ci related things
    • e0132fb3 - Reimplement Trigger API
    • 1169a926 - Rename columns and rename migrations
    • 9adb6d93 - Fix triggers tests
    • 7e65823d - Finishing touches
    • faba4256 - Update badge
    • ab723892 - Fix errors
    • f9daf43f - Fix after column rename
  • Added 1 commit:

    • 31b71ac3 - Fix specs
  • Douwe Maan
    Douwe Maan @DouweM started a thread on the diff
  • 84 84 new_build.options = build.options
    85 85 new_build.commands = build.commands
    86 86 new_build.tag_list = build.tag_list
    87 new_build.gl_project_id = build.gl_project_id
  • Added 1 commit:

    • d59dd19b - Fix last specs
  • Douwe Maan
    Douwe Maan @DouweM started a thread on the diff
  • 25 25
    26 26 has_many :builds, class_name: 'Ci::Build'
    27 27 has_many :runner_projects, dependent: :destroy, class_name: 'Ci::RunnerProject'
    28 has_many :projects, through: :runner_projects, class_name: 'Ci::Project'
    28 has_many :projects, through: :runner_projects, class_name: '::Project', foreign_key: :gl_project_id
  • Author Maintainer

    Note about: gl_project_id and project_id:

    All ci_ tables have project_id column creates relation to ci_projects, we have no way to rename it, or remove it right now, nor is that desired.

  • Kamil Trzcińśki Added 14 commits:

    Added 14 commits:

  • Added 1 commit:

    • fc1e2f89 - Run builds from projects with enabled CI
  • Author Maintainer

    @douwe Your comments are fixed.

  • @ayufan Awesome. Remove the WIP prefix and feel free to merge :)

  • Kamil Trzcińśki Title changed from WIP: Ci Project migrate to Ci Project migrate

    Title changed from WIP: Ci Project migrate to Ci Project migrate

  • Added 1 commit:

    • baa38f0d - Fix runners admin view [ci skip]
  • Kamil Trzcińśki Target branch changed from ci-services-migrate to master

    Target branch changed from ci-services-migrate to master

  • mentioned in commit c8102343

  • Kamil Trzcińśki Status changed to merged

    Status changed to merged

  • mentioned in merge request !4925 (merged)

  • Jacob Schatz mentioned in commit 0bbf47da

    mentioned in commit 0bbf47da

  • Douwe Maan Mentioned in commit 87991030

    Mentioned in commit 87991030

  • Douwe Maan Mentioned in commit 62ba6805

    Mentioned in commit 62ba6805

  • Mentioned in merge request !6757 (closed)

  • Please register or sign in to reply
    Loading