App requirements are described here.
Out of given spec is removal of --token
option. Token is moved to system variables along with API endpoint,
described in Requirements. There are several reasons for that:
- Passing global options (options before command name) are not supported in Spring Shell 2.x onwards because it causes confusion if the options are intended for SpringBoot or Shell app. More about it here.
- From UX perspective it would be cumbersome for user to enter token for each call. This way it is set once and reused seamlessly.
- Seven Bridges Client library docs recommend storing this piece of information in system variables.
App is created in Spring Boot, using Spring Shell project, GraalVM Native Image Support and Seven Bridges Client library. It can be built with any Java SDK, but in order to build native app GraalVM SDK must be used.
Building executable jar:
./mvnw -Pnative native:compile
Building native app:
./mvnw clean compile package
After building native app executable called cgc-cli
can be found in target
folder.
-
SB_AUTH_TOKEN
- Token acquired from Cancer Genomics Cloud Platform -
SB_API_ENDPOINT
- Endpoint URI that can be found on the same page
If these variables are not set in the environment application will warn you about that on each attempt to interact with the service.