vmware-tanzu / apps-cli-plugin

Apps Plugin for the Tanzu CLI
Apache License 2.0
18 stars 16 forks source link

--local-path supports jar/zip #29

Closed heyjcollins closed 2 years ago

heyjcollins commented 2 years ago

Description of problem

There are processes/pipelines being utilized today which generate a jar/zip file artifact.

These pipelines will often pull in additional assets which aren't included in the application code itself, but which are necessary for the application function. A subsequent next step is for the jar/zip of the app to be pushed to and run on a target environment. Popular platforms such as Cloud Foundry support this workflow today (via the cf CLI).

The apps plugin for the Tanzu CLI does not support creating/updating/applying a workload from a local jar or zip directly. The file must be unzipped beforehand. Requiring the jar be unzipped is not an expected step, it creates toil without value, and decreases efficiency.

Proposed solution

Given I've got a JAR (or zipped) file containing all assets required to create a workload and I'm targeting a TAP-enabled workload cluster
When I run `tanzu apps workload create myapp -f path/to/my/myapp.jar...`
Then my workload create command exits 0 and I can validate the workload has run through the supply chain by viewing the workload details via `tanzu apps workload get...`

@danfein to provide UX here

Additional context

heyjcollins commented 2 years ago

Is there value in supporting other compression formats such as TAR files? @matthewmcnew @jigsheth57

matthewmcnew commented 2 years ago

At this time pack/kp only support the zip format. So, I don't believe it is necessary to support other components in the apps plugin.

danfein commented 2 years ago

Help text update proposed

 --local-path path                path to a directory, .zip, or .jar file containing workload source code 

current help text

 --local-path path                path on the local file system to a directory of source code to build for the workload