-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stable/2023.1] Improve CI reliability (#1411)
Signed-off-by: Mohammed Naser <[email protected]> Co-authored-by: Mohammed Naser <[email protected]>
- Loading branch information
1 parent
dee7b9b
commit 0c1bdf9
Showing
11 changed files
with
80 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import sys | ||
import glob | ||
import yaml | ||
|
||
|
||
def main(): | ||
passed = True | ||
|
||
for file in glob.glob("zuul.d/container-images/*.yaml"): | ||
with open(file, "r") as file: | ||
configs = yaml.safe_load(file) | ||
|
||
for config in configs: | ||
if "job" in config: | ||
job = config["job"] | ||
|
||
# Check if build or upload jobs are missing 'atmosphere-buildset-registry' dependency | ||
if ( | ||
"build-container-image-" in job["name"] | ||
or "upload-container-image-" in job["name"] | ||
): | ||
deps = job.get("dependencies", []) | ||
if not any( | ||
dep.get("name") == "atmosphere-buildset-registry" | ||
for dep in deps | ||
): | ||
print( | ||
f"Job '{job['name']}' is missing 'atmosphere-buildset-registry' dependency." | ||
) | ||
passed = False | ||
|
||
if passed: | ||
print( | ||
"All build and upload jobs have 'atmosphere-buildset-registry' dependency." | ||
) | ||
else: | ||
print("Jobs missing 'atmosphere-buildset-registry' dependency.") | ||
sys.exit(1) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
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
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