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
OpenEdx
configuration
Commits
f101adcf
Commit
f101adcf
authored
Sep 11, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1527 from edx/jarv/migration-check-for-sandbox-clone
Jarv/migration check for sandbox clone
parents
f2e7721e
aff10ef1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
10 deletions
+38
-10
playbooks/edx-east/edxapp_migrate.yml
+13
-1
util/jenkins/check-migrations.sh
+24
-8
util/jenkins/get-rc-branches.sh
+1
-1
No files found.
playbooks/edx-east/edxapp_migrate.yml
View file @
f101adcf
...
...
@@ -4,9 +4,10 @@
gather_facts
:
False
vars
:
db_dry_run
:
"
--db-dry-run"
syncdb
:
false
tasks
:
# Syncdb with migrate when the migrate user is overridden in extra vars
-
name
:
syncdb and
migrate
-
name
:
migrate
shell
:
>
chdir={{ edxapp_code_dir }}
python manage.py {{ item }} migrate --noinput {{ db_dry_run }} --settings=aws_migrate
...
...
@@ -16,3 +17,14 @@
with_items
:
-
lms
-
cms
-
name
:
syncdb
shell
:
>
chdir={{ edxapp_code_dir }}
python manage.py {{ item }} syncdb --noinput --settings=aws_migrate
environment
:
DB_MIGRATION_USER
:
"
{{
COMMON_MYSQL_MIGRATE_USER
}}"
DB_MIGRATION_PASS
:
"
{{
COMMON_MYSQL_MIGRATE_PASS
}}"
when
:
syncdb
with_items
:
-
lms
-
cms
util/jenkins/check-migrations.sh
View file @
f101adcf
#!/usr/bin/env bash
set
-x
if
[[
-z
$WORKSPACE
||
-z
$environment
||
-z
$deployment
]]
;
then
if
[[
-z
$WORKSPACE
]]
;
then
echo
"Environment incorrect for this wrapper script"
env
exit
1
...
...
@@ -13,7 +9,7 @@ fi
env
cd
$WORKSPACE
/edx-platform
cd
"
$WORKSPACE
/edx-platform"
# install requirements
# These requirements will be installed into the shinginpanda
...
...
@@ -27,23 +23,43 @@ pip install --exists-action w -r requirements/edx/repo.txt
pip install
--exists-action
w
-r
requirements/edx/github.txt
pip install
--exists-action
w
-r
requirements/edx/local.txt
cd
$WORKSPACE
/configuration/playbooks/edx-east
if
[[
$openid_workaround
==
"true"
]]
;
then
sed
-i
-e
's/claimed_id = models.TextField(max_length=2047, unique=True/claimed_id = models.TextField(max_length=2047/'
"
$VIRTUAL_ENV
/lib/python2.7/site-packages/django_openid_auth/models.py"
fi
cd
"
$WORKSPACE
/configuration/playbooks/edx-east"
if
[[
-f
${
WORKSPACE
}
/configuration-secure/ansible/vars/
${
deployment
}
.yml
]]
;
then
extra_var_args+
=
" -e@
${
WORKSPACE
}
/configuration-secure/ansible/vars/
${
deployment
}
.yml"
fi
if
[[
-z
$syncdb
]]
;
then
syncdb
=
"false"
fi
if
[[
$db_dry_run
==
"false"
]]
;
then
# Set this to an empty string if db_dry_run is
# not set. By default the db_dry_run var is
# set to --db-dry-run
extra_var_args+
=
" -e db_dry_run=''"
else
# always skip syncdb unless dry run is unchecked
syncdb
=
"false"
fi
if
[[
-f
${
WORKSPACE
}
/configuration-secure/ansible/vars/
${
environment
}
-
${
deployment
}
.yml
]]
;
then
extra_var_args+
=
" -e@
${
WORKSPACE
}
/configuration-secure/ansible/vars/
${
environment
}
-
${
deployment
}
.yml"
fi
extra_var_args+
=
" -e@
${
WORKSPACE
}
/configuration-secure/ansible/vars/
${
environment
}
-
${
deployment
}
.yml"
for
extra_var
in
$extra_vars
;
do
extra_var_args+
=
" -e@
${
WORKSPACE
}
/configuration-secure/ansible/vars/
$extra_var
"
done
extra_var_args+
=
" -e edxapp_app_dir=
${
WORKSPACE
}
"
extra_var_args+
=
" -e edxapp_code_dir=
${
WORKSPACE
}
/edx-platform"
extra_var_args+
=
" -e edxapp_user=jenkins"
extra_var_args+
=
" -e syncdb=
$syncdb
"
# Generate the json configuration files
ansible-playbook
-c
local
$extra_var_args
--tags
edxapp_cfg
-i
localhost,
-s
-U
jenkins edxapp.yml
...
...
util/jenkins/get-rc-branches.sh
View file @
f101adcf
...
...
@@ -62,7 +62,7 @@ fi
$noop
cd
"/var/tmp/
$repo_basename
"
if
[[
-z
$noop
]]
;
then
for
branch
in
$(
git branch
-a
|
grep
"
$filter
"
| sort
-r
| tr
-d
' '
)
;
do
for
branch
in
$(
git branch
-a
|
sort
-r
| tr
-d
' '
|
grep
-P
"
$filter
"
)
;
do
echo
"origin/
${
branch
}
"
done
else
...
...
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