Repository navigation
Help passing secrets to docker jobs #370
Unanswered
lgwapnitsky
asked this question in
Q&A
Replies: 2 comments
|
Please try using the latest xySat (v1.0.34), which was just released. I made a change to the Docker Plugin, so the "Command Extras" field (I assume you are using that) will evaluate inline shell variables. |
0 replies
|
thank you. will test later today or tomorrow
…On Tue, Jul 14, 2026 at 3:02 PM Joseph Huckaby ***@***.***> wrote:
Please try using the latest xySat (v1.0.34
<https://github.com/pixlcore/xysat/releases/tag/v1.0.34>), which was just
released. I made a change to the Docker Plugin, so the "Command Extras"
field (I assume you are using that) will evaluate inline shell variables.
—
Reply to this email directly, view it on GitHub
<#370?email_source=notifications&email_token=AAE6CFCVZ3N6NZVMC4ADKY35EZ7T7A5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZWGM4TOMRQUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVRTG633UMVZF6Y3MNFRWW#discussioncomment-17639720>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE6CFFA3LSAC7RLIJDHRHL5EZ7T7AVCNFSNUABJKJSXA33TNF2G64TZHMYTCMRUHAYTIMZYGE5UI2LTMN2XG43JN5XDWMJQGQYDOMBXHCQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AAE6CFAPS4KVO4X6TM4NXSL5EZ7T7A5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZWGM4TOMRQUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVJTG633UMVZF62LPOM>
and Android
<https://github.com/notifications/mobile/android/AAE6CFG7PU6WEXD7TLETGA35EZ7T7A5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZWGM4TOMRQUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Attempting a docker job but am unable to pass the secrets defined in xyops as DIODE_CLIENT_ID and DIODE_CLIENT_SECRET:
Launching docker: /usr/bin/docker run -i --rm --init --cpus 1 --memory 1GB --name xyops-job-jmrf76ki6v2y76z9 --net=host --rm -v /opt/orb:/opt/orb -e TINI_SUBREAPER=true -e DIODE_CLIENT_ID -e DIODE_CLIENT_SECRET -e LOG_LEVEL=Debug netboxlabs/orb-agent:latest run -c /opt/orb/agent.yaml
When running at the CLI, I have to variables declared:
declare -x DIODE_CLIENT_ID="orb-001"
declare -x DIODE_CLIENT_SECRET="BwQxxxxxxxxxxxxxxxx="
The docker run command then sets those variables using -e
I'm trying to avoid hard-setting those variables in the Shell plugin (I've tried without success so far).
This SHOULD work in the shell script, but it doesn't. It does work at the CLI
docker run --net=host --rm -v /opt/orb:/opt/orb -e DIODE_CLIENT_ID=$DIODE_CLIENT_ID -e DIODE_CLIENT_SECRET=$DIODE_CLIENT_SECRET -e LOG_LEVEL=Debug netboxlabs/orb-agent:latest run -c /opt/orb/ups.yaml
A regular 'export' command in the shell script shows the variables as being set:
DIODE_CLIENT_ID=diode-to-netbox
DIODE_CLIENT_SECRET=xuaxxxx=
JOB_ID=jmrf8ak48h22o04a
USER=root
script=#!/bin/sh
env
export
#docker run --net=host --rm -v /opt/orb:/opt/orb -e DIODE_CLIENT_ID=$DIODE_CLIENT_ID -e DIODE_CLIENT_SECRET=$DIODE_CLIENT_SECRET -e LOG_LEVEL=Debug netboxlabs/orb-agent:latest run -c /opt/orb/ups.yaml
HOME=/root
JOB_LOG=/opt/xyops/satellite/logs/jobs/job-jmrf8ak48h22o04a.log
pass=true
SYSTEMD_EXEC_PID=1280
JOB_BASE_URL=http://umitxyops01.umtownship.org:5522/
JOURNAL_STREAM=9:8510
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/system.slice/xysat.service/memory.pressure
USERNAME=root
PATH=/opt/xyops/satellite/bin:/root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin:/sbin
INVOCATION_ID=1f51de0f9367486ca4724499068fd816
LANG=en_US.UTF-8
JOB_NOW=1783705655.384
SHELL=/bin/bash
annotate=false
XYOPS=1.0.33
PWD=/opt/xyops/satellite/temp/jobs/jmrf8ak48h22o04a
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
__daemon=true
export DIODE_CLIENT_ID='diode-to-netbox'
export DIODE_CLIENT_SECRET='xuaxxxx='
export HOME='/root'
export INVOCATION_ID='1f51de0f9367486ca4724499068fd816'
export JOB_BASE_URL='http://umitxyops01.umtownship.org:5522/'
export JOB_ID='jmrf8ak48h22o04a'
export JOB_LOG='/opt/xyops/satellite/logs/jobs/job-jmrf8ak48h22o04a.log'
export JOB_NOW='1783705655.384'
export JOURNAL_STREAM='9:8510'
export LANG='en_US.UTF-8'
export MEMORY_PRESSURE_WATCH='/sys/fs/cgroup/system.slice/xysat.service/memory.pressure'
export MEMORY_PRESSURE_WRITE='c29tZSAyMDAwMDAgMjAwMDAwMAA='
export PATH='/opt/xyops/satellite/bin:/root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin:/sbin'
export PWD='/opt/xyops/satellite/temp/jobs/jmrf8ak48h22o04a'
export SHELL='/bin/bash'
export SYSTEMD_EXEC_PID='1280'
export USER='root'
export USERNAME='root'
export XYOPS='1.0.33'
export __daemon='true'
export annotate='false'
export pass='true'
export script='#!/bin/sh
All reactions