-
-
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.
* preparing to test extracting fs Signed-off-by: vsoch <vsoch@users.noreply.github.com>
- Loading branch information
Showing
25 changed files
with
25,443 additions
and
920 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
__author__ = "Vanessa Sochat" | ||
__copyright__ = "Copyright 2022, Vanessa Sochat" | ||
__license__ = "MPL 2.0" | ||
|
||
import sys | ||
import json | ||
import os | ||
|
||
import container_guts.utils as utils | ||
from ..main import ManifestGenerator | ||
|
||
|
||
def main(args, parser, extra, subparser): | ||
|
||
# Show args to the user | ||
print(" image: %s" % args.image) | ||
print(" outfile: %s" % args.outfile) | ||
print(" outdir: %s" % args.outdir) | ||
print("container tech: %s" % args.container_tech) | ||
print(" database: %s" % args.database) | ||
|
||
print("This command is not fully implemented yet, come back soon!") | ||
sys.exit() | ||
|
||
# Derive an initial manifest | ||
cli = ManifestGenerator(tech=args.container_tech) | ||
manifests = cli.diff(args.image, database=args.database) | ||
outfile = None | ||
|
||
# Default to using outfile first, then outdir if defined | ||
if args.outfile: | ||
outfile = args.outfile | ||
elif args.outdir: | ||
outfile = os.path.join(args.outdir, "%s.json" % cli.save_path(args.image)) | ||
dirname = os.path.dirname(outfile) | ||
if not os.path.exists(dirname): | ||
os.makedirs(dirname) | ||
|
||
# If we have an output file, make sure to set step output | ||
if outfile: | ||
print(f"Saving to {outfile}...") | ||
print(f"::set-output name=outfile::{outfile}") | ||
utils.write_json(manifests, outfile) | ||
else: | ||
print(json.dumps(manifests, indent=4)) |
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,6 @@ | ||
__author__ = "Vanessa Sochat" | ||
__copyright__ = "Copyright 2021-2022, Vanessa Sochat" | ||
__license__ = "MPL 2.0" | ||
|
||
# Default database for base image | ||
database = "https://github.com/singularityhub/shpc-guts" |
Oops, something went wrong.