Skip to content

Commit 37c0781

Browse files
authored
Merge pull request #6810 from readthedocs/humitos/uploading-build-state
Show "Uploading" build state when uploading artifacts into storage
2 parents f56e8de + e2b8777 commit 37c0781

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

readthedocs/builds/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
BUILD_STATE_CLONING = 'cloning'
1010
BUILD_STATE_INSTALLING = 'installing'
1111
BUILD_STATE_BUILDING = 'building'
12+
BUILD_STATE_UPLOADING = 'uploading'
1213
BUILD_STATE_PUSHING_CACHE = 'pushing-cache'
1314
BUILD_STATE_FINISHED = 'finished'
1415

@@ -18,6 +19,7 @@
1819
(BUILD_STATE_CLONING, _('Cloning')),
1920
(BUILD_STATE_INSTALLING, _('Installing')),
2021
(BUILD_STATE_BUILDING, _('Building')),
22+
(BUILD_STATE_UPLOADING, _('Uploading')),
2123
(BUILD_STATE_PUSHING_CACHE, _('Pushing cache')),
2224
(BUILD_STATE_FINISHED, _('Finished')),
2325
)

readthedocs/projects/tasks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
BUILD_STATE_INSTALLING,
3636
BUILD_STATE_PULLING_CACHE,
3737
BUILD_STATE_PUSHING_CACHE,
38+
BUILD_STATE_UPLOADING,
3839
BUILD_STATUS_SUCCESS,
3940
BUILD_STATUS_FAILURE,
4041
LATEST,
@@ -719,6 +720,7 @@ def run_build(self, record):
719720
localmedia=bool(outcomes['localmedia']),
720721
pdf=bool(outcomes['pdf']),
721722
epub=bool(outcomes['epub']),
723+
environment=self.build_env,
722724
)
723725

724726
# Finalize build and update web servers
@@ -957,6 +959,7 @@ def store_build_artifacts(
957959
)
958960
return
959961

962+
environment.update_build(BUILD_STATE_UPLOADING)
960963
storage = get_storage_class(settings.RTD_BUILD_MEDIA_STORAGE)()
961964
log.info(
962965
LOG_TEMPLATE,

0 commit comments

Comments
 (0)