forked from fedora-copr/copr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpmbuild: specify snippets to mock config via copr-rpmbuild config file
This allows us to specify tpm fs size to rpmbuild in order to be able to automatically generate its size for performance builders. See fedora-copr#3268
- Loading branch information
Showing
8 changed files
with
64 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import os | ||
import yaml | ||
|
||
CONFIG_PATH = "/etc/copr-rpmbuild/copr-rpmbuild.yaml", | ||
|
||
class Config: | ||
def __init__(self): | ||
self.job_tag_to_mock_snippets = [] | ||
|
||
def load_config(self): | ||
if not os.path.exists(CONFIG_PATH): | ||
return | ||
|
||
with open(CONFIG_PATH, "r") as file: | ||
config_data = yaml.safe_load(file) or {} | ||
|
||
self.job_tag_to_mock_snippets = config_data.get('job_tag_to_mock_snippets', []) |
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
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