Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
25a8e56e
Commit
25a8e56e
authored
Sep 06, 2016
by
Brian Beggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edxapp migrations to run are now seperated in to file per database
parent
39aee51b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
playbooks/continuous_delivery/run_migrations.yml
+7
-4
No files found.
playbooks/continuous_delivery/run_migrations.yml
View file @
25a8e56e
...
...
@@ -55,7 +55,7 @@
when
:
APPLICATION_NAME != "edxapp"
-
name
:
generate list of edxapp unapplied migrations
shell
:
'
{{
COMMAND_PREFIX
}}
{{
SUB_APPLICATION_NAME
}}
show_unapplied_migrations
--database
"{{
item
}}"
--output_file
"{{
temp_output_dir.stdout
}}/{{
unapplied_migrations_output
}}"
--settings
"{{
EDX_PLATFORM_SETTINGS
}}"'
shell
:
'
{{
COMMAND_PREFIX
}}
{{
SUB_APPLICATION_NAME
}}
show_unapplied_migrations
--database
"{{
item
}}"
--output_file
"{{
temp_output_dir.stdout
}}/{{
item
}}_{{
unapplied_migrations_output
}}"
--settings
"{{
EDX_PLATFORM_SETTINGS
}}"'
become_user
:
"
{{
APPLICATION_USER
}}"
when
:
APPLICATION_NAME == "edxapp" and item != "read_replica"
with_items
:
edxapp_databases.keys()
...
...
@@ -66,11 +66,15 @@
when
:
APPLICATION_NAME != "edxapp"
-
name
:
migrate to apply any edxapp unapplied migrations
shell
:
'
{{
COMMAND_PREFIX
}}
{{
SUB_APPLICATION_NAME
}}
run_migrations
"{{
temp_output_dir.stdout
}}/{{
unapplied_migrations_output
}}"
--database
"{{
item
}}"
--settings
"{{
EDX_PLATFORM_SETTINGS
}}"
--output_file
"{{
temp_output_dir.stdout
}}/{{
migration_output
}}"'
shell
:
'
{{
COMMAND_PREFIX
}}
{{
SUB_APPLICATION_NAME
}}
run_migrations
"{{
temp_output_dir.stdout
}}/{{
item
}}_{{
unapplied_migrations_output
}}"
--database
"{{
item
}}"
--settings
"{{
EDX_PLATFORM_SETTINGS
}}"
--output_file
"{{
temp_output_dir.stdout
}}/{{
migration_output
}}"'
become_user
:
"
{{
APPLICATION_USER
}}"
when
:
APPLICATION_NAME == "edxapp" and item != "read_replica"
with_items
:
edxapp_databases.keys()
-
name
:
List all migration files
action
:
"
command
ls
-1
{{
temp_output_dir.stdout
}}"
register
:
migration_files
-
name
:
Transfer artifacts to the proper place.
fetch
:
src
:
"
{{
temp_output_dir.stdout
}}/{{
item
}}"
...
...
@@ -79,8 +83,7 @@
fail_on_missing
:
True
mode
:
0700
with_items
:
-
"
{{
unapplied_migrations_output
}}"
-
"
{{
migration_output
}}"
-
"
{{
migration_files.stdout_lines
}}"
-
name
:
Send Hipchat notification cleanup has finished
hipchat_2_0_0_1
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment