-
Name Previous Value Current Value Assignee
robin
wh
-
-
-
State changed as build OD-8026 (16.4.2) is successful
-
OneDev
changed state to 'Closed' 6 days ago
Previous Value Current Value Open
Closed
| Type |
Bug
|
| Priority |
Major
|
| Assignee | |
| Affected Versions |
16.4.1
|
| Labels |
No labels
|
Issue Votes (0)
Environment variables defined on a CommandStep under
envVarsare not present in the container when the job runs on a KubernetesExecutor. The same buildspec works on a RemoteDockerExecutor.Versions: OneDev 16.4.1, k8s-helper 4.2.0, k3s v1.35.5.
Reproduce:
echo "FOO=$FOO".Expected: FOO=bar Actual: FOO=
The server does send the variable to the pod.
/onedev-build/job-datainside the build pod contains the name and value but nothing applies it:/onedev-build/command/<step>.shcontains no exportIn KubernetesExecutor each container spec is built with
and commonEnvs only ever holds those three entries; the step's env vars are never merged in.
Impact: any job secret passed through envVars arrives empty, so steps fail in confusing ways (an empty SSH key gives
Load key: error in libcryptofollowed byPermission denied (publickey)), and deployment jobs can run with empty credentials rather than failing outright.Workaround: export the variables inline at the top of the command text, where
@secret:...@interpolation still works.