Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
GitLab FOSS
GitLab FOSS
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Packages
    • Packages
    • Container Registry
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Merge Requests
  • !21955

Project 'gitlab-org/gitlab-ce' was moved to 'gitlab-org/gitlab-foss'. Please update any links and bookmarks that may still have the old path.
Merged
Opened Sep 27, 2018 by Thong Kuah@tkuah🌏8 of 8 tasks completed8/8 tasks
  • Report abuse
Report abuse

Support db migration and initialization for Auto DevOps

Pre-requisite

  • ⚠ requires charts/auto-deploy-app!7 (merged)
  • ⚠ requires gitlab-ci-yml!201 (merged)

What does this MR do?

if $DB_INITIALIZE is present, deploy an initial release where only $DB_INITIALIZE is run in a special job (and deployments are not rendered/loaded). This is then followed by second release with deployments as usual.

if $DB_MIGRATE, set this value which will trigger a pre-upgrade helm hook.

Due to helm not supporting hook logs, this MR does not show the logs from the intialization and migration logs.

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/48004

Tasks

  • Document :

For an example Rails project :

  • We can set DB_INITIALIZE: cd /app && RAILS_ENV=production bin/setup and DB_MIGRATE: cd app && RAILS_ENV=production bin/update

  • /app is from herokuish buildpacks. Can use $APP_PATH too

  • Also, there is only one chance to run $DB_INITIALIZE. If the first deploy successfully completes, $DB_INITIALIZE will never be run again. If $DB_INITIALIZE is present during the first deploy though and it errors or fails, that doesn't cound as a successfully first deploy

Does this MR meet the acceptance criteria?

  • Changelog entry added, if necessary
  • Documentation created/updated
  • Tests added for this feature/bug
  • Conforms to the code review guidelines
  • Conforms to the merge request performance guidelines
  • Conforms to the style guides
  • Conforms to the database guides

Closes #48004 (closed)

Edited Oct 02, 2018 by Thong Kuah
  • Discussion 22
  • Commits 5
  • Pipelines 6
  • Changes 3
Assignee
Assign to
11.4
Milestone
11.4
Assign milestone
Time tracking
9
Labels
Configure [DEPRECATED] Deliverable application control panel auto devops devops::configure direction documentation feature group::orchestration
Assign labels
  • View project labels
Reference: gitlab-org/gitlab-foss!21955

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.