docker-openwisp icon indicating copy to clipboard operation
docker-openwisp copied to clipboard

[bug/ci] Make auto-install.sh capable of running in non-interactive mode

Open nemesifier opened this issue 4 months ago • 0 comments

Describe the bug
When running deploy/auto-install.sh in a CI environment (GitHub Actions) with input piped via heredoc or printf, the script hangs waiting for user input. This appears to be due to prompts reading from /dev/tty instead of standard input, which is not available in non-interactive environments. As a result, automation steps that previously worked now get stuck indefinitely.

Steps To Reproduce

See https://github.com/openwisp/docker-openwisp/pull/487.

  1. Set up a GitHub Actions job on ubuntu-24.04 runner.
  2. Run a step that pipes input to auto-install.sh, for example:
    printf "edge\n./.env\n" | sudo -E ./deploy/auto-install.sh
    
  3. Observe that the script starts, prints the welcome message, but hangs at the first prompt for input.

Expected behavior The script should:

Accept piped input from stdin in addition to /dev/tty.

Or allow passing all required inputs via command-line arguments or environment variables (e.g., --version, --env-file) so it can run fully non-interactively in CI environments.

System Information:

OS: Ubuntu 24.04 LTS (GitHub Actions ubuntu-24.04 runner) Docker version: 27.0.3, build 7d4bcd8 Browser: N/A

nemesifier avatar Aug 06 '25 17:08 nemesifier