Hi,
using withEnv, trying to login & perform some activity i azure environment.
pipelineSteps.withEnv([‘PATH=$env.PATH:/usr/bin/az’]) {
pipelineSteps.sh “”"
az version
“”"
Getting an error on process:
process apparently never started in /var/lib/jenkins/workspace/my-test-deployment@tmp/durable-3f57ca09
If /usr/bin/az is a command, not a directory, you probably don’t need to add it to the path, since the PATH is for directories, not specific commands. Please try removing with withEnv and just have th command and see if it works (or try an ls in the sh).
+ apt install azure-cli
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
You need to look up how to install those tools on your agent. Normally, apt requires root permissions which the agent is probably not running as root (and should not be).
I don’t often use the word no, but no. The docker container specifically doesn’t run as root, runs as a user. You can tell kubernetes to run it as root (which I won’t help with and strongly discourage), but to add sudo you’d need to be root, and at that point, you don’t need sudo.
The solution is the same as when you asked it in your previous thread.
Extend the container, add what you need, and then use that container in helm.