Skip to content

Commit fa13d46

Browse files
author
Matthew Fisher
committed
Merge pull request #651 from bacongobbler/650-handle-no-builds
fix(api): pass if no builds are associated with the release
2 parents 0cb2f02 + 69ee1bf commit fa13d46

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

rootfs/api/management/commands/load_db_state_to_k8s.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ def handle(self, *args, **options):
2424
# deploy applications
2525
print("Deploying available applications")
2626
for application in App.objects.all():
27-
rel = application.release_set.latest()
28-
application.deploy(rel)
27+
try:
28+
rel = application.release_set.latest()
29+
application.deploy(rel)
30+
except EnvironmentError as e:
31+
if str(e) != 'No build associated with this release':
32+
raise
33+
print('WARNING: {} has no build associated with '
34+
'its latest release. Skipping deployment...'.format(application))
35+
pass
2936

3037
print("Done Publishing DB state to kubernetes.")

0 commit comments

Comments
 (0)