Skip to content

Commit a8a1eda

Browse files
committed
Add cosa imageupload-<platform> subcommands
Previously `cosa buildextend-aws --upload` would both build AND upload to AWS EC2. Now that we are building using OSbuild it makes more sense to split these stages a bit so we have `cosa osbuild aws` and then `cosa imageupload-aws` for the uploading part. `cosa buildextend-aws` is now just a symlink to `cosa osbuild aws` so we need these new `imageupload-<platform>` subcommands for the uploading part.
1 parent d31cd4c commit a8a1eda

6 files changed

Lines changed: 11 additions & 0 deletions

File tree

src/cmd-imageupload-aliyun

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cmd-ore-wrapper

src/cmd-imageupload-aws

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cmd-ore-wrapper

src/cmd-imageupload-azure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cmd-ore-wrapper

src/cmd-imageupload-gcp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cmd-ore-wrapper

src/cmd-imageupload-powervs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cmd-ore-wrapper

src/cmd-ore-wrapper

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Each target has its own sub options. To access them us:
3535
sys_target = None
3636
default_replicate = False
3737
default_build_artifact = False
38+
default_upload_artifact = False
3839

3940
self_basename = os.path.basename(sys.argv[0])
4041

@@ -47,6 +48,10 @@ Each target has its own sub options. To access them us:
4748
log.info("symlink is for a build and publish command")
4849
default_build_artifact = True
4950

51+
if str(self_basename).startswith("cmd-imageupload-"):
52+
log.info("symlink is for a publish command")
53+
default_upload_artifact = True
54+
5055
# previous cmd-buildextend-<target> used symlinks
5156
for k in cloud_clis():
5257
if k in self_basename:
@@ -81,6 +86,7 @@ Each target has its own sub options. To access them us:
8186
parser.add_argument("--help", action='store_true',
8287
help="Print this message")
8388
parser.add_argument("--upload", action='store_true',
89+
default=default_upload_artifact,
8490
help="Upload the disk to the ore target")
8591
parser.add_argument("--replicate", action='store_true',
8692
default=default_replicate,

0 commit comments

Comments
 (0)