Skip to content

Instantly share code, notes, and snippets.

@jjb
Created June 22, 2023 17:48
Show Gist options
  • Save jjb/f62c322cd3c21deab9b45c3410775aab to your computer and use it in GitHub Desktop.
Save jjb/f62c322cd3c21deab9b45c3410775aab to your computer and use it in GitHub Desktop.
Shipyard Shell
#!/usr/bin/env sh
# usage
# shipyard-shell PRNUMBER SERVICENAME
# shipyard-shell 6187 postgres
# shipyard-shell 6187 api
pr=$1
service=$2
identifier=`shipyard get environments | grep pr$pr | xargs | cut -w -f1` # xargs to remove leading and trailing whitespace
shipyard exec --env $identifier --service $service -- bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment