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
15acb811
Commit
15acb811
authored
Dec 16, 2013
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove cruft regarding flip repos.
We never used this function.
parent
ca797539
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
19 deletions
+1
-19
util/jenkins/monitor_repos.py
+1
-2
util/jenkins/stage_release.py
+0
-17
No files found.
util/jenkins/monitor_repos.py
View file @
15acb811
...
...
@@ -9,7 +9,7 @@ from git import Repo
from
os
import
path
from
pprint
import
pformat
from
pymongo
import
MongoClient
,
DESCENDING
from
stage_release
import
flip_repos
,
uri_from
from
stage_release
import
uri_from
def
releases
(
repo
):
"""
...
...
@@ -72,7 +72,6 @@ if __name__ == "__main__":
data
[
'last_check'
]
=
datetime
.
utcnow
()
all_plays
=
flip_repos
(
config
[
'repos'
])
# Find plays that are affected by this repo.
repos_with_changes
=
{}
for
repo
in
config
[
'repos'
]:
...
...
util/jenkins/stage_release.py
View file @
15acb811
...
...
@@ -81,20 +81,6 @@ def uri_from(doc_store_config):
hosts
=
","
.
join
(
host_uris
),
db
=
doc_store_config
[
'db'
])
def
flip_repos
(
repos
):
""" Take a dict mapping repos to plays and give a dict mapping plays to repos. """
all_plays
=
{}
for
repo
in
repos
:
plays
=
repos
[
repo
][
'plays'
]
for
play
in
plays
:
if
play
in
all_plays
:
all_plays
[
play
][
'repos'
]
.
append
(
repo
)
else
:
all_plays
[
play
]
=
{}
all_plays
[
play
][
'repos'
]
=
[
repo
]
return
all_plays
def
prepare_release
(
args
):
config
=
yaml
.
safe_load
(
open
(
args
.
config
))
client
=
MongoClient
(
uri_from
(
config
[
'DOC_STORE_CONFIG'
]))
...
...
@@ -109,8 +95,6 @@ def prepare_release(args):
update_repos
=
{
item
[
0
]:
item
[
1
]
for
item
in
var_array
}
log
.
info
(
"Update repos: {}"
.
format
(
pformat
(
update_repos
)))
all_plays
=
flip_repos
(
config
[
'repos'
])
release
=
{}
now
=
datetime
.
utcnow
()
release
[
'_id'
]
=
args
.
release_id
...
...
@@ -188,7 +172,6 @@ import requests
def
notify_abbey
(
abbey_url
,
abbey_token
,
deployment
,
all_plays
,
release_id
):
for
play_name
,
play
in
all_plays
.
items
():
for
env
,
ami
in
play
[
'amis'
]
.
items
():
log
.
info
(
"{}:{}"
.
format
(
env
,
ami
))
if
ami
is
None
:
params
=
[]
params
.
append
({
'name'
:
'play'
,
'value'
:
play_name
})
...
...
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