-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Save Docker image hash in RTD environment.json file (#3880)
* Save docker image hash to consider when auto wiping the environment (#3793) * Remove obsolete code Now, we can access `self.config.build_image` directly. * Move container_image selection to the init At initialization time we have the project and we already know if the project has the build image override so we can decide at that point and save it as a instance attribute. Then we can use this values from other places inside the same class. * Save Docker Image hash in readthedocs-environment.json The hash is used to know if the environment is obsolete and auto-wipe it if necessary. * Simplify the class naming * Save the image hash in the json file * Lint * Remove invalid properties from YAML config in tests * Add test for save_environment_json * Improve docstring * Handle obsolete cases better * when the file is corrupted or we don't have access, we return that it's OBSOLETE * when there is a new setting that we need to compare and it's not in the JSON file, we return OBSOLETE * Test case for build image in the config but not in the JSON
- Loading branch information
Showing
3 changed files
with
166 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters