5353import io .seqera .wave .cli .util .GptHelper ;
5454import io .seqera .wave .cli .util .YamlHelper ;
5555import io .seqera .wave .config .CondaOpts ;
56- import io .seqera .wave .config .SpackOpts ;
5756import io .seqera .wave .util .DockerIgnoreFilter ;
5857import io .seqera .wave .util .Packer ;
5958import org .slf4j .LoggerFactory ;
@@ -154,15 +153,6 @@ public class App implements Runnable {
154153 @ Option (names = {"--conda-channels" }, paramLabel = "''" , description = "Conda channels used to build the container (default: ${DEFAULT-VALUE})." )
155154 private String condaChannels = DEFAULT_CONDA_CHANNELS ;
156155
157- @ Option (names = {"--spack-file" }, paramLabel = "''" , description = "A Spack file used to build the container e.g. /some/path/spack.yaml." )
158- private String spackFile ;
159-
160- @ Option (names = {"--spack-package" }, paramLabel = "''" , description = "One or more Spack packages used to build the container e.g. cowsay." )
161- private List <String > spackPackages ;
162-
163- @ Option (names = {"--spack-run-command" }, paramLabel = "''" , description = "Dockerfile RUN commands used to build the container." )
164- private List <String > spackRunCommands ;
165-
166156 @ Option (names = {"--log-level" }, paramLabel = "''" , description = "Set the application log level. One of: OFF, ERROR, WARN, INFO, DEBUG, TRACE and ALL" )
167157 private String logLevel ;
168158
@@ -304,7 +294,7 @@ protected void validateArgs() {
304294 if ( !isEmpty (image ) && !isEmpty (containerFile ) )
305295 throw new IllegalCliArgumentException ("Argument --image and --containerfile conflict each other - Specify an image name or a container file for the container to be provisioned" );
306296
307- if ( isEmpty (image ) && isEmpty (containerFile ) && isEmpty (condaFile ) && condaPackages ==null && isEmpty ( spackFile ) && spackPackages == null && isEmpty (prompt ) )
297+ if ( isEmpty (image ) && isEmpty (containerFile ) && isEmpty (condaFile ) && condaPackages ==null && isEmpty (prompt ) )
308298 throw new IllegalCliArgumentException ("Provide either a image name or a container file for the Wave container to be provisioned" );
309299
310300 if ( isEmpty (towerToken ) && !isEmpty (buildRepository ) )
@@ -326,45 +316,14 @@ protected void validateArgs() {
326316 if ( condaPackages !=null && !isEmpty (containerFile ) )
327317 throw new IllegalCliArgumentException ("Option --conda-package and --containerfile conflict each other" );
328318
329- // -- check spack options
330- if ( !isEmpty (spackFile ) && spackPackages !=null )
331- throw new IllegalCliArgumentException ("Option --spack-file and --spack-package conflict each other" );
332-
333- if ( !isEmpty (spackFile ) && !isEmpty (image ) )
334- throw new IllegalCliArgumentException ("Option --spack-file and --image conflict each other" );
335-
336- if ( !isEmpty (spackFile ) && !isEmpty (containerFile ) )
337- throw new IllegalCliArgumentException ("Option --spack-file and --containerfile conflict each other" );
338-
339- if ( spackPackages !=null && !isEmpty (image ) )
340- throw new IllegalCliArgumentException ("Option --spack-package and --image conflict each other" );
341-
342- if ( spackPackages !=null && !isEmpty (containerFile ) )
343- throw new IllegalCliArgumentException ("Option --spack-package and --containerfile conflict each other" );
344-
345319 if ( !isEmpty (outputFormat ) && !List .of ("json" ,"yaml" ).contains (outputFormat ) ) {
346320 final String msg = String .format ("Invalid output format: '%s' - expected value: json, yaml" , outputFormat );
347321 throw new IllegalCliArgumentException (msg );
348322 }
349323
350- if ( condaPackages !=null && spackPackages !=null )
351- throw new IllegalCliArgumentException ("Option --conda-package and --spack-package conflict each other" );
352-
353- if ( condaPackages !=null && !isEmpty (spackFile ) )
354- throw new IllegalCliArgumentException ("Option --conda-package and --spack-file conflict each other" );
355-
356- if ( !isEmpty (condaFile ) && spackPackages !=null )
357- throw new IllegalCliArgumentException ("Option --conda-file and --spack-package conflict each other" );
358-
359- if ( !isEmpty (condaFile ) && !isEmpty (spackFile ) )
360- throw new IllegalCliArgumentException ("Option --conda-file and --spack-file conflict each other" );
361-
362324 if ( !isEmpty (condaFile ) && !Files .exists (Path .of (condaFile )) )
363325 throw new IllegalCliArgumentException ("The specified Conda file path cannot be accessed - offending file path: " + condaFile );
364326
365- if ( !isEmpty (spackFile ) && !Files .exists (Path .of (spackFile )) )
366- throw new IllegalCliArgumentException ("The specified Spack file path cannot be accessed - offending file path: " + spackFile );
367-
368327 if ( !isEmpty (contextDir ) && isEmpty (containerFile ) )
369328 throw new IllegalCliArgumentException ("Option --context requires the use of a container file" );
370329
@@ -588,11 +547,6 @@ private CondaOpts condaOpts() {
588547 ;
589548 }
590549
591- private SpackOpts spackOpts () {
592- return new SpackOpts ()
593- .withCommands (spackRunCommands );
594- }
595-
596550 protected String containerFileBase64 () {
597551 return !isEmpty (containerFile )
598552 ? encodePathBase64 (containerFile )
@@ -618,20 +572,6 @@ protected PackagesSpec packagesSpec() {
618572 ;
619573 }
620574
621- if ( !isEmpty (spackFile ) ) {
622- return new PackagesSpec ()
623- .withType (PackagesSpec .Type .SPACK )
624- .withSpackOpts (spackOpts ())
625- .withEnvironment (encodePathBase64 (spackFile ));
626- }
627-
628- if ( !isEmpty (spackPackages ) ) {
629- return new PackagesSpec ()
630- .withType (PackagesSpec .Type .SPACK )
631- .withSpackOpts (spackOpts ())
632- .withEntries (spackPackages );
633- }
634-
635575 if ( !isEmpty (prompt ) ) {
636576 return GptHelper .grabPackages (prompt .stream ().collect (Collectors .joining (" " )));
637577 }
0 commit comments