Page MenuHomeDevCentral

Create a wrapper for Jenkins CLI
Open, LowPublic

Description

Allow to use Jenkins CLI through SSH:

https://www.jenkins.io/doc/book/managing/cli/#ssh

Event Timeline

dereckson triaged this task as Low priority.
dereckson created this task.
jenkins CLI wrapper (proof of concept)
#!/bin/sh
#
# Usage: jenkins <container name> <command> [args]

CONTAINER_IP=$(sudo docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $1)
shift

ssh -l $USER -p 50022 $CONTAINER_IP $*