Commit Graph

172 Commits

Author SHA1 Message Date
Tortue Torche
f702bcb032 Update --masked-variables flag help 2020-01-17 12:56:01 +00:00
Tortue Torche
a186b30e8f Add -t flag to timeout calls 2020-01-17 12:56:01 +00:00
Tortue Torche
43935fb3c6 Add "login" action 2020-01-17 12:56:01 +00:00
Tortue Torche
6b65ab626e Add --auth-token flag
This will avoid multiple login requests when using
psu in a CI tool.
2020-01-17 12:56:01 +00:00
Tortue Torche
e373965987 Rename AUTH_TOKEN to PORTAINER_AUTH_TOKEN 2020-01-17 12:56:01 +00:00
Tortue Torche
c502679056 Change version to 0.2.0-alpha.16 2020-01-17 12:56:01 +00:00
Tortue Torche
542e2149d5 Mask AUTH_TOKEN value 2020-01-17 12:56:01 +00:00
Tortue Torche
ad2f8affd8 Change --masked-variables flag default value to "false" 2020-01-17 12:56:01 +00:00
Tortue Torche
13d51a3b60 Change version to 0.2.0-alpha.15 2020-01-17 12:56:01 +00:00
Tortue Torche
f2da35e813 Rename 'system' action to 'system:info' 2020-01-17 12:56:01 +00:00
Tortue Torche
7b39a06913 Bring back --compose-file flag and make --stack-file flag an alias 2020-01-17 12:56:01 +00:00
Tortue Torche
01a110b161 Separate auth token from it's related JSON response 2020-01-17 12:56:01 +00:00
Tortue Torche
c615ef737f Enhance options printing 2020-01-17 12:56:01 +00:00
Tortue Torche
55b45769d3 Add sensible information masking through --masked-variables flag
In debug and/or verbose mode, the value of sensitive variables will be hidden,
useful to avoid leaking passwords or tokens in your logs.

Possible values: true|extended|false. Defaults to 'true'.
Useful when running 'psu' in a CI tool, to avoid leaking passwords or tokens
in the logs.
2020-01-17 12:56:01 +00:00
Tortue Torche
18827605c8 Change version to 0.2.0-alpha.10 2020-01-17 12:56:01 +00:00
Tortue Torche
ebe6e907c5 Update FIXME comments 2020-01-17 12:56:01 +00:00
Tortue Torche
60c2bd1dfd Add 'system' action to get Docker info of the Portainer instance 2020-01-17 12:56:01 +00:00
Tortue Torche
2d55a3638f Extract endpoint docker inspection to a function 2020-01-17 12:56:01 +00:00
Tortue Torche
e67a7b4440 Change version to 0.2.0-alpha.9 2020-01-17 12:56:01 +00:00
Tortue Torche
11c1b98d60 Add filter to skip services with replicas set to 0 2020-01-17 12:56:01 +00:00
Tortue Torche
8082eb7823 Extract services stack filter to a local variable 2020-01-17 12:56:01 +00:00
Tortue Torche
d4c11ec5eb Remove '--arg state "$state"' from tasks filter when $state is not set 2020-01-17 12:56:01 +00:00
Tortue Torche
50a5fa17ca Add PASSWORD and TOKEN variables hiding FIXMEs 2020-01-17 12:56:01 +00:00
Tortue Torche
52ed1a5538 Add --detect-job as an optional flag to status, tasks and tasks:healthy actions 2020-01-17 12:56:01 +00:00
Tortue Torche
617c17482d Update deprecation messages for --secure flag 2020-01-17 12:56:01 +00:00
Tortue Torche
13b466d2f4 Ad '--compose-file' flag which deprecates --stack-file flag 2020-01-17 12:56:01 +00:00
Tortue Torche
8f3aa9b254 Change version to 0.2.0-alpha.6 2020-01-17 12:56:01 +00:00
Tortue Torche
8f5a8d4986 Add deprecation verbose message for --action flag 2020-01-17 12:56:01 +00:00
Tortue Torche
2a7979caf7 Fix 'status' action 2020-01-17 12:56:01 +00:00
Tortue Torche
ae55db2675 Add experimental aliased action and better help messages
You can run: 'psu <action> --help' to display help of the given action
2020-01-17 12:56:01 +00:00
Tortue Torche
d24836e4ed Add deprecation verbose message for --secure flag 2020-01-17 12:56:01 +00:00
Tortue Torche
2a89465b90 Rename ROLLOUT_STATUS_TIMEOUT to TIMEOUT 2020-01-17 12:56:01 +00:00
Tortue Torche
4c9b09dd51 Change version to 0.2.0-alpha.5 2020-01-17 12:56:01 +00:00
Tortue Torche
331dd1d633 Better 'help' and 'actions' messages 2020-01-17 12:56:01 +00:00
Tortue Torche
0406b36020 Change version to 0.2.0-alpha.4 2020-01-17 12:56:01 +00:00
Tortue Torche
8413e5148f Add parallel requests TODO 2020-01-17 12:56:01 +00:00
Tortue Torche
b39f017d00 Update help for --timeout flag 2020-01-17 12:56:01 +00:00
Tortue Torche
867357401c Reorder flags in help 2020-01-17 12:56:01 +00:00
Tortue Torche
d3fe9898cf Reduce help margin 2020-01-17 12:56:01 +00:00
Tortue Torche
31947b4702 Add the "actions" action
To list the available actions of psu
2020-01-17 12:56:01 +00:00
Tortue Torche
7dd1c16a8d Rename tasks_healthy to tasks:healthy 2020-01-17 12:56:01 +00:00
Tortue Torche
85ccf0c94b Change version to 0.2.0-alpha.2 2020-01-17 12:56:01 +00:00
Tortue Torche
7f94f8b5da Cleaner way to handle special actions 'help' and 'version' 2020-01-17 12:56:01 +00:00
Tortue Torche
3b6a8bf7e6 Fix a comment 2020-01-17 12:56:01 +00:00
Tortue Torche
0ae5f96a4e Fix version 2020-01-17 12:56:01 +00:00
Tortue Torche
63c5a727b8 Remove commented code 2020-01-17 12:56:01 +00:00
Tortue Torche
4dbe06e99d Add containers action
It prints the containers of a stack (or specific
service, if the `--service=service_name` option is set)
2020-01-17 12:56:01 +00:00
Tortue Torche
53f4bde4eb Change VERSION to "0.2.0-alpha1" 2020-01-17 12:56:01 +00:00
Tortue Torche
540d3678b0 Change VERSION to "0.2.0-alpha" to follow Semantic Versioning 2.0.0
See https://semver.org/spec/v2.0.0.html
2020-01-17 12:56:01 +00:00
Tortue Torche
7e20c52b6e Several changes
- Add "list" action to print all stacks.
- Add "info" action to print information about a stack.
- Add "services" action to print a list of stack services.
- Add "tasks" action to print a list of stack service tasks.
- Add "PORTAINER_SERVICE_NAME" environment variable (string) to specify which stack service tasks wil be printed.
- Add "-S, --service" flag (string) to specify which stack service tasks wil be printed.
- Add "tasks_healthy" action. Like "tasks", but only prints **healthy** stack service tasks.
- Add "status" action to print stack tasks statuses.
- Add "AUTO_DETECT_JOB" environment variable (true|false) to autodetect services which are jobs.
- Add "-j, --detect-job" flag (true|false) to autodetect services which are jobs.
- Add quiet mode to limit output to the minimal.
  - In "list", "info", "services" actions shows only stack/service name.
  - In "tasks", "tasks_healthy" actions shows only task name.
- Add "QUIET_MODE" environment variable (true|false) to enable/disable quiet mode.
- Add "-q, --quiet" flag (true|false) to enable/disable quiet mode.
- Add "ROLLOUT_STATUS_TIMEOUT" environment variable to set a maximum waiting time for requests.
- Add "-T, --timeout" flag to set a maximum waiting time for requests.
- Add "-i, --insecure" flag (bool) to replace "-s, --secure" flag.
- Add "version" action to print script version.
- Add "-V, --version" flag (bool) to print script version.
- Add "help" action to print script usage.
- Add "--action", "--secure", "--strict", "--debug", "--verbose", "--prune", "--endpoint", "--env-file", "--compose-file", "--name", "--url", "--password" and "--user" long name version flags for existing "-a", "-s", "-t", "-d", "-v", "-r", "-e", "-g", "-c", "-n", "-l", "-p" and "-u" flags.
- Add argument to specify the action to execute without the need to use the "-a, --action" flag.
2020-01-17 12:56:01 +00:00