Closed Alin-Dumitrescu closed 2 months ago
A few things:
TRACE=1
or something. That code is here.SendEnv
only works if you allow the variable to be sent in your /etc/sshd_config
file via an AcceptEnv
directive. See this stackoverflow answer for more details.I'll follow-up with silencing that error, but otherwise I hope the above helps.
See below
Thank you, Alin Dumitrescu Azure DevOps Consultant phone (425) 279-3465
From: Jose Diaz-Gonzalez @.> Sent: Monday, September 23, 2024 4:21 PM To: dokku/github-action @.> Cc: Alin Dumitrescu @.>; Author @.> Subject: Re: [dokku/github-action] Dokku push action does not update app variable. (Issue #88)
A few things:
The error message "Invalid IP address" is written to stderr and can be ignored. We can probably just silence it unless TRACE=1 or something. That code is herehttps://github.com/dokku/ci-docker-image/blob/50f9df45efa3e8b006095cbf70e959172dbbe879/bin/parse-ssh-host#L16. I think the code should not check for IP if the string is a valid FQDN.
SendEnv only works if you allow the variable to be sent in your /etc/sshd_config file via an AcceptEnv directive. See this stackoverflow answerhttps://serverfault.com/a/482909 for more details.
Dokku will not automatically use passed environment variables as environment variables for your app. You would also need to somehow add that to the app via a custom plugin. That is outside the scope of this particular project, but we have docshttps://dokku.com/docs/development/plugin-creation/ on writing custom plugins. Funny, MS copilot thinks this should work, so I assume there are some posts out there that suggest that(see screenshot below). What is the point to pass env variables via GIT_SSH_COMMAND, if you cannot use it on a new build? I was able to manually update the dokku var with a ssh call before the push, but it is not an elegant solution...
@. @.
I'll follow-up with silencing that error, but otherwise I hope the above helps.
— Reply to this email directly, view it on GitHubhttps://github.com/dokku/github-action/issues/88#issuecomment-2369298817, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AETLUKKEDY5XB6IP2RBGANTZYBZ4PAVCNFSM6AAAAABOV2HKMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRZGI4TQOBRG4. You are receiving this because you authored the thread.Message ID: @.**@.>>
It's a bit hard to read your response since it came from mail, but I'll respond as I understand it:
sshd_config
and that Dokku wouldn't ever just set all of it's environment variables as variables for apps. Again, you'll need to change the sshd_config
and build a plugin for what you want.GIT_SSH_COMMAND
can be used to increase verbosity or set other options for the ssh
call, such as when tunneling through a bastion server. However, just because you can set an env var in GIT_SSH_COMMAND
, doesn't mean dokku will necessarily do anything with it (as mentioned before).
Description of problem
I have set an application variable APP_VERSION for the app web on the dokku server. When using the git-action, the process is NOT updating the APP_VERSION variable as expected. There is an unexpected "Invalid IP address" message in the logs.
How reproducible
Every time.
Steps to Reproduce
APP_VERSION
variable,GIT_SSH_COMMAND
add git-hub action:APP_VERSION is not updated (keeps the old value of 4.0.2) - see line 1433 in the attached log.
Expected Results
APP_VERSION is updated to 4.0.2-30
Environment Information
dokku report APP_NAME
outputHow (deb/make) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:
Digital Ocean dokku droplet
Additional information
dokku ps:inspect web
job-logs.txt