The shell is based on the Spring Shell project. One of the shell’s best features is tab-completion and colorization of commands. Use the 'help' command or the --help
argument when starting the shell to get help information.
The output of using the --help
argument is shown below
Skipper Options: --spring.cloud.skipper.client.serverUri=<uri> Address of the Skipper Server [default: http://localhost:7577]. --spring.cloud.skipper.client.username=<USER> Username of the Skipper Server [no default]. --spring.cloud.skipper.client.password=<PASSWORD> Password of the Skipper Server [no default]. --spring.cloud.skipper.client.credentials-provider-command=<COMMAND> Executes an external command which must return an OAuth Access Token [no default]. --spring.cloud.skipper.client.skip-ssl-validation=<true|false> Accept any SSL certificate (even self-signed) [default: no]. --spring.shell.historySize=<SIZE> Default size of the shell log file [default: 3000]. --spring.shell.commandFile=<FILE> Skipper Shell executes commands read from the file(s) and then exits. --help This message.
The shell can be started either in interactive or non-interactive mode.
In the case of the non-interactive mode, command line arguments are executed as Skipper commands and then the shell exits.
If there are any arguments that do not have the prefix spring.cloud.skipper.client
, they will be considered as skipper commands to execute.
For example,
java -jar spring-cloud-skipper-shell-1.0.0.RC2.jar --spring.cloud.skipper.client.serverUri=http://localhost:9123/api
Will bring up the interactive shell and connect to localhost:9123/api
.
However, the command
$ java -jar spring-cloud-skipper-shell-1.0.0.RC2.jar --spring.cloud.skipper.client.serverUri=http://localhost:9123/api search
Will connect to localhost:9123/api
, execute the search
command and then exit.
A more common use case would be to update a package from within a CI job. For example, in a Jenkins Stage.
stage ('Build') { steps { checkout([ $class: 'GitSCM', branches: [ [name: "*/master"] ], userRemoteConfigs: [ [url: "https://github.com/markpollack/skipper-samples.git"] ] ]) sh ''' VERSION="1.0.0.M1-$(date +%Y%m%d_%H%M%S)-VERSION" mvn org.codehaus.mojo:versions-maven-plugin:2.3:set -DnewVersion="${VERSION}" mvn install java -jar /home/mpollack/software/skipper.jar upgrade --package-name helloworld --release-name helloworld-jenkins --properties version=${VERSION} ''' } }