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
53010872
Commit
53010872
authored
Jan 15, 2014
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass the mongo uri to abbey.
parent
3dfb7023
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
util/jenkins/stage_release.py
+6
-3
No files found.
util/jenkins/stage_release.py
View file @
53010872
...
...
@@ -83,7 +83,8 @@ def uri_from(doc_store_config):
def
prepare_release
(
args
):
config
=
yaml
.
safe_load
(
open
(
args
.
config
))
client
=
MongoClient
(
uri_from
(
config
[
'DOC_STORE_CONFIG'
]))
mongo_uri
=
uri_from
(
config
[
'DOC_STORE_CONFIG'
])
client
=
MongoClient
(
mongo_uri
)
db
=
client
[
config
[
'DOC_STORE_CONFIG'
][
'db'
]]
# Get configuration repo versions
...
...
@@ -152,7 +153,8 @@ def prepare_release(args):
release
[
'plays'
]
=
all_plays
release_coll
.
insert
(
release
)
# All plays that need new AMIs have been updated.
notify_abbey
(
config
[
'abbey_url'
],
config
[
'abbey_token'
],
args
.
deployment
,
all_plays
,
args
.
release_id
)
notify_abbey
(
config
[
'abbey_url'
],
config
[
'abbey_token'
],
args
.
deployment
,
all_plays
,
args
.
release_id
,
mongo_uri
)
def
ami_for
(
db
,
env
,
deployment
,
play
,
configuration
,
configuration_secure
,
ansible_vars
):
...
...
@@ -169,7 +171,7 @@ def ami_for(db, env, deployment, play, configuration,
return
db
.
amis
.
find_one
(
ami_signature
)
import
requests
def
notify_abbey
(
abbey_url
,
abbey_token
,
deployment
,
all_plays
,
release_id
):
def
notify_abbey
(
abbey_url
,
abbey_token
,
deployment
,
all_plays
,
release_id
,
mongo_uri
):
for
play_name
,
play
in
all_plays
.
items
():
for
env
,
ami
in
play
[
'amis'
]
.
items
():
if
ami
is
None
:
...
...
@@ -179,6 +181,7 @@ def notify_abbey(abbey_url, abbey_token, deployment, all_plays, release_id):
params
.
append
({
'name'
:
'environment'
,
'value'
:
env
})
params
.
append
({
'name'
:
'vars'
,
'value'
:
yaml
.
dump
(
play
[
'vars'
],
default_flow_style
=
False
)})
params
.
append
({
'name'
:
'release_id'
,
'value'
:
release_id
})
params
.
append
({
'name'
:
'mongo_uri'
,
'value'
:
mongo_uri
})
build_params
=
{
'parameter'
:
params
}
log
.
info
(
"Need ami for {}"
.
format
(
pformat
(
build_params
)))
...
...
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