Skip to content

Commit f4a6117

Browse files
committed
chore(release): append release summary
1 parent c15b425 commit f4a6117

6 files changed

Lines changed: 17 additions & 4 deletions

File tree

rootfs/api/models/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def pipeline(self, release, force_deploy=False, rollback_on_failure=True):
255255
except Exception as e:
256256
release.state = "crashed"
257257
release.failed = True
258-
release.summary = "{} pipeline a release that failed".format(self.owner)
258+
release.summary += "{} pipeline a release that failed".format(self.owner)
259259
release.exception = "error: {}".format(str(e))
260260
self.log(f"{prefix} pipeline runtime error: {release.exception}", logging.ERROR)
261261
release.save()

rootfs/api/models/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def create_release(self, user, *args, **kwargs):
9090
new_release = self.app.release_set.latest()
9191
new_release.state = "crashed"
9292
new_release.failed = True
93-
new_release.summary = "{} deployed {} which failed".format(
93+
new_release.summary += "{} deployed {} which failed".format(
9494
self.owner, str(self.uuid)[:7])
9595
# Get the exception that has occured
9696
new_release.exception = "error: {}".format(str(e))

rootfs/api/models/release.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ def rollback(self, user, version=None):
223223
new_release = self.app.release_set.latest()
224224
new_release.state = "crashed"
225225
new_release.failed = True
226-
new_release.summary = "{} performed roll back to a release that failed".format(self.owner) # noqa
226+
new_release.summary += "{} performed roll back to a release that failed".format(
227+
self.owner)
227228
# Get the exception that has occured
228229
new_release.exception = "error: {}".format(str(e))
229230
new_release.save()

rootfs/api/settings/production.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,12 @@
301301

302302
IMAGE_PULL_POLICY = os.environ.get('IMAGE_PULL_POLICY', "IfNotPresent")
303303

304+
# Drycc filer image
305+
# Provide get and put operations for `drycc volumes:client`
306+
DRYCC_FILER_IMAGE = os.environ.get('DRYCC_FILER_IMAGE', 'registry.drycc.cc/drycc/filer:canary')
307+
DRYCC_FILER_DURATION = int(os.environ.get('DRYCC_FILER_DURATION', '3600'))
308+
DRYCC_FILER_WAITTIME = int(os.environ.get('DRYCC_FILER_WAITTIME', '1200'))
309+
304310
# True, true, yes, y and more evaluate to True
305311
# False, false, no, n and more evaluate to False
306312
# see the above for all available options

rootfs/api/urls.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@
110110
re_path(
111111
r"^apps/(?P<id>{})/volumes/(?P<name>[-_\w]+)/path/?$".format(settings.APP_URL_REGEX),
112112
views.AppVolumesViewSet.as_view({'patch': 'path'})),
113+
re_path(
114+
r"^apps/(?P<id>{})/volumes/(?P<name>[-_\w]+)/client/?$".format(settings.APP_URL_REGEX),
115+
views.AppVolumesViewSet.as_view({'get': 'client', 'post': 'client'})),
113116
# application resources
114117
re_path(r"^resources/services/?$", views.AppResourcesViewSet.as_view({'get': 'services'})),
115118
re_path(

rootfs/api/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def post_save(self, config):
415415
if 'release' in locals():
416416
release.state = "crashed"
417417
release.failed = True
418-
release.summary = "{} deployed a config that failed".format(self.request.user)
418+
release.summary += "{} deployed a config that failed".format(self.request.user)
419419
# Get the exception that has occured
420420
release.exception = "error: {}".format(str(e))
421421
release.save()
@@ -822,6 +822,9 @@ def get_object(self):
822822
app__id=self.kwargs['id'],
823823
name=self.kwargs['name'])
824824

825+
def client(self, request, **kwargs):
826+
pass
827+
825828
def expand(self, request, **kwargs):
826829
volume = self.get_object()
827830
volume.expand(request.data['size'])

0 commit comments

Comments
 (0)