The following sample script shows how you can run printenv
commands in branch container...
$ cat run_command_in_a_running_branch.sh
#!/bin/bash
JWT_TOKEN=`cat JWT_TOKEN.txt`
AUTH_HEADER="authorization: Bearer $JWT_TOKEN"
ORGANIZATION_HEADER="tenant: api-1620640441-org"
curl -s -X POST \
'https://api.site.devpanel.com/dev-v1/sites/60993039c25947001370c/branches/6099303bc25947001370c/commands' \ 'http://localhost:8080/api/sites/60993039c25947001370c/branches/6099303bc25947001370c/commands' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'auth-mode: cognito' \
-H "$AUTH_HEADER" \
-H "$ORGANIZATION_HEADER" \
--data-raw '{ "commands": ["printenv"] }' | jq -r ".result"
PATH=/home/www/.composer/vendor/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=master-wscyl-54c7979-pcntl
TERM=xterm
DB_HOST=devpanel-cluster-vvybh.cso9f6tlh.us-west-2.rds.amazonaws.com
DB_NAME=namecvgj
DB_USER=usercvgj
DB_PASSWORD=pwdcvgj
DEVPANEL_HOSTNAME=dev-1370ca04-1370ca0a-1370c.app.devpanel.com
APP_ROOT=/var/www/html/
WEB_ROOT=/var/www/html/web
CODES_ENABLE=yes
FEATURE2_WSCYL_PORT=tcp://172.20.20.197:80
FEATURE2_WSCYL_PORT_80_TCP_PORT=80
FEATURE2_YBQSXFL_CODESERVER_PORT=tcp://172.20.89.83:8080
CM_ACME_HTTP_SOLVER_R8VPK_SERVICE_PORT_HTTP=8089
CM_ACME_HTTP_SOLVER_R8VPK_PORT_8089_TCP_ADDR=172.20.178.27
FEATURE2_WSCYL_SERVICE_PORT_HTTP=80
FEATURE2_WSCYL_CODESERVER_PORT_8080_TCP=tcp://172.20.167.241:8080
MASTER_WSCYL_SERVICE_HOST=172.20.238.200
FEATURE2_WSCYL_SERVICE_PORT=80
KUBERNETES_PORT_443_TCP_PORT=443
KUBERNETES_PORT_443_TCP_ADDR=172.20.0.1
CM_ACME_HTTP_SOLVER_R8VPK_PORT=tcp://172.20.178.27:8089
FEATURE2_WSCYL_PMA_PORT_80_TCP=tcp://172.20.216.56:80
FEATURE2_WSCYL_CODESERVER_SERVICE_PORT=8080
MASTER_WSCYL_PMA_SERVICE_PORT_HTTP=80
MASTER_WSCYL_PORT_80_TCP_ADDR=172.20.238.200
FEATURE2_WSCYL_SERVICE_HOST=172.20.20.197
MASTER_WSCYL_CODESERVER_SERVICE_PORT_CODESERVER=8080
FEATURE2_YBQSXFL_CODESERVER_SERVICE_HOST=172.20.89.83
CM_ACME_HTTP_SOLVER_R8VPK_PORT_8089_TCP=tcp://172.20.178.27:8089
CM_ACME_HTTP_SOLVER_R8VPK_PORT_8089_TCP_PORT=8089
FEATURE2_YBQSXFL_PMA_PORT_80_TCP_PORT=80
FEATURE2_YBQSXFL_PMA_PORT_80_TCP_ADDR=172.20.51.75
MASTER_WSCYL_CODESERVER_SERVICE_HOST=172.20.165.39
FEATURE2_WSCYL_CODESERVER_SERVICE_HOST=172.20.167.241
FEATURE2_YBQSXFL_PMA_PORT=tcp://172.20.51.75:80
FEATURE2_YBQSXFL_PMA_PORT_80_TCP_PROTO=tcp
KUBERNETES_SERVICE_HOST=172.20.0.1
MASTER_WSCYL_CODESERVER_PORT_8080_TCP_PORT=8080
CM_ACME_HTTP_SOLVER_R8VPK_SERVICE_HOST=172.20.178.27
MASTER_WSCYL_PORT_80_TCP_PORT=80
FEATURE2_WSCYL_PORT_80_TCP=tcp://172.20.20.197:80
KUBERNETES_PORT_443_TCP=tcp://172.20.0.1:443
MASTER_WSCYL_CODESERVER_PORT=tcp://172.20.165.39:8080
FEATURE2_YBQSXFL_CODESERVER_SERVICE_PORT=8080
FEATURE2_YBQSXFL_PORT=tcp://172.20.187.26:80
FEATURE2_YBQSXFL_SERVICE_PORT_HTTP=80
FEATURE2_YBQSXFL_PORT_80_TCP_PROTO=tcp
FEATURE2_YBQSXFL_PORT_80_TCP_ADDR=172.20.187.26
KUBERNETES_PORT_443_TCP_PROTO=tcp
MASTER_WSCYL_CODESERVER_SERVICE_PORT=8080
FEATURE2_YBQSXFL_CODESERVER_PORT_8080_TCP_PORT=8080
FEATURE2_WSCYL_CODESERVER_PORT=tcp://172.20.167.241:8080
FEATURE2_YBQSXFL_SERVICE_PORT=80
FEATURE2_YBQSXFL_PORT_80_TCP_PORT=80
FEATURE2_YBQSXFL_CODESERVER_PORT_8080_TCP=tcp://172.20.89.83:8080
FEATURE2_YBQSXFL_CODESERVER_PORT_8080_TCP_PROTO=tcp
FEATURE2_YBQSXFL_CODESERVER_PORT_8080_TCP_ADDR=172.20.89.83
MASTER_WSCYL_PMA_PORT_80_TCP=tcp://172.20.163.172:80
FEATURE2_YBQSXFL_CODESERVER_SERVICE_PORT_CODESERVER=8080
FEATURE2_WSCYL_CODESERVER_SERVICE_PORT_CODESERVER=8080
FEATURE2_WSCYL_PORT_80_TCP_PROTO=tcp
FEATURE2_YBQSXFL_PMA_SERVICE_PORT_HTTP=80
FEATURE2_WSCYL_PMA_PORT_80_TCP_ADDR=172.20.216.56
FEATURE2_YBQSXFL_SERVICE_HOST=172.20.187.26
KUBERNETES_PORT=tcp://172.20.0.1:443
MASTER_WSCYL_CODESERVER_PORT_8080_TCP=tcp://172.20.165.39:8080
FEATURE2_WSCYL_PMA_PORT_80_TCP_PROTO=tcp
FEATURE2_WSCYL_PMA_PORT_80_TCP_PORT=80
MASTER_WSCYL_PMA_SERVICE_HOST=172.20.163.172
MASTER_WSCYL_PMA_PORT_80_TCP_PROTO=tcp
MASTER_WSCYL_PMA_PORT_80_TCP_ADDR=172.20.163.172
FEATURE2_YBQSXFL_PMA_PORT_80_TCP=tcp://172.20.51.75:80
MASTER_WSCYL_PMA_PORT_80_TCP_PORT=80
CM_ACME_HTTP_SOLVER_R8VPK_SERVICE_PORT=8089
FEATURE2_WSCYL_PMA_SERVICE_HOST=172.20.216.56
FEATURE2_WSCYL_PMA_SERVICE_PORT=80
FEATURE2_WSCYL_CODESERVER_PORT_8080_TCP_ADDR=172.20.167.241
KUBERNETES_SERVICE_PORT_HTTPS=443
FEATURE2_WSCYL_CODESERVER_PORT_8080_TCP_PORT=8080
MASTER_WSCYL_PORT_80_TCP=tcp://172.20.238.200:80
FEATURE2_WSCYL_PORT_80_TCP_ADDR=172.20.20.197
CM_ACME_HTTP_SOLVER_R8VPK_PORT_8089_TCP_PROTO=tcp
FEATURE2_WSCYL_CODESERVER_PORT_8080_TCP_PROTO=tcp
FEATURE2_YBQSXFL_PORT_80_TCP=tcp://172.20.187.26:80
MASTER_WSCYL_SERVICE_PORT_HTTP=80
MASTER_WSCYL_PORT_80_TCP_PROTO=tcp
MASTER_WSCYL_CODESERVER_PORT_8080_TCP_ADDR=172.20.165.39
FEATURE2_WSCYL_PMA_PORT=tcp://172.20.216.56:80
MASTER_WSCYL_PMA_SERVICE_PORT=80
MASTER_WSCYL_PORT=tcp://172.20.238.200:80
MASTER_WSCYL_SERVICE_PORT=80
FEATURE2_YBQSXFL_PMA_SERVICE_HOST=172.20.51.75
FEATURE2_YBQSXFL_PMA_SERVICE_PORT=80
KUBERNETES_SERVICE_PORT=443
MASTER_WSCYL_CODESERVER_PORT_8080_TCP_PROTO=tcp
FEATURE2_WSCYL_PMA_SERVICE_PORT_HTTP=80
MASTER_WSCYL_PMA_PORT=tcp://172.20.163.172:80
PHPIZE_DEPS=autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c
PHP_INI_DIR=/usr/local/etc/php
PHP_EXTRA_CONFIGURE_ARGS=--enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
PHP_LDFLAGS=-Wl,-O1 -Wl,--hash-style=both -pie
GPG_KEYS=42670A7FE4D0441C8E4632349E4FDC074A4
PHP_VERSION=7.4.3
PHP_URL=https://www.php.net/get/php-7.4.3.tar.xz/from/this/mirror
PHP_ASC_URL=https://www.php.net/get/php-7.4.3.tar.xz.asc/from/this/mirror
PHP_SHA256=cf1f856d877c268124ded1ede40c9fb61
PHP_MD5=
USER=www
GROUP=www
UID=1000
GID=1000
SHELL=/bin/bash
PHP_CUSTOM_INI=/var/www/html//php.ini
PHP_EXT_DIR=/usr/local/etc/php/conf.d
PHP_CLEAR_ENV=false
PHP_MEMORY_LIMIT=2048M
PHP_UPLOAD_MAX_FILESIZE=64M
PHP_POST_MAX_SIZE=64M
PHP_MAX_EXECUTION_TIME=600
CODES_PORT=8080
CODES_WORKING_DIR=/var/www/html/
GIT_BRANCH=master
PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sysvmsg sysvsem sysvshm xsl zip pcntl
HOME=/home/www