woodpecker: Unable to specify the backend engine using the CLI argument '--backend-engine'

Component

agent

Describe the bug

When running woodpacker-agent without a configuration file but only command-line arguments, the backend engine cannot be defined. Somehow the argument --backend-engine does not work and it falls back to local.

  • The following command does not select the docker backend:

    exec /usr/local/bin/woodpecker-agent --grpc-token abcdef0123456789 --backend-engine docker --backend-docker-ipv6 false --backend-docker-host unix://run/podman/podman.sock --backend-docker-tls-verify false --grpc-skip-insecure true --healthcheck true --hostname woodpecker-agent --log-level info --grpc-secure false
    
  • While the agent starts, it immediately prints the following message to the logs (backend 'local'):

    9:57AM INF Starting Woodpecker agent with version '2.1.1' and backend 'local' using platform 'linux/amd64' running up to 1 pipelines in parallel
    
  • When I export the environment variable DOCKER_HOST and run the same command again, the correct backend is selected:

    export DOCKER_HOST="unix://run/podman/podman.sock"
    
    exec /usr/local/bin/woodpecker-agent --grpc-token abcdef0123456789 --backend-engine docker --backend-docker-ipv6 false --backend-docker-host unix://run/podman/podman.sock --backend-docker-tls-verify false --grpc-skip-insecure true --healthcheck true --hostname woodpecker-agent --log-level info --grpc-secure false
    
  • The log output is (backend 'docker'):

    10:07AM INF Starting Woodpecker agent with version '2.1.1' and backend 'docker' using platform 'linux/amd64' running up to 1 pipelines in parallel
    

System Info

Additional context

No response

Validations

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (12 by maintainers)

Most upvoted comments

@qwerty287 I’ve added an equal sign to all long options and it seems to work. Thanks a lot for your help. I will close this ticket. Cheers.

PS. Tested with version 2.7.1

Can you try --backend-docker-ipv6=false?

Is it possible for you to try this out and check if it fixes the bug? Or do you still have this issue?

@qwerty287 Yes, certainly. Thanks for your efforts. Please give me a few days, but I should be able to send you a feedback hopefully this week.