-
Notifications
You must be signed in to change notification settings - Fork 83
Description
My actions before raising this issue
- Followed the troubleshooting guide
- Read/searched the docs
- Searched past issues
When building a function with faas build , build fails with below error
ERROR: tox config file (either pyproject.toml, tox.ini, setup.cfg) not found
The command '/bin/sh -c if [ "$TEST_ENABLED" == "false" ]; then echo "skipping tests"; else eval "$TEST_COMMAND"; fi' returned a non-zero code: 1
[0] < Building test-tox done in 8.28s.
[0] Worker done.
Total build time: 8.28s
Errors received during build:
- [test-tox] received non-zero exit code from build, error: The command '/bin/sh -c if [ "$TEST_ENABLED" == "false" ]; then echo "skipping tests"; else eval "$TEST_COMMAND"; fi' returned a non-zero code: 1
Expected Behaviour
Function build should complete successfully.
Current Behaviour
Build completes in error. When TEST_ENABLED is set to false , build completes successfully. But default mode when TEST_ENABLED is set to true , the build fails to find tox.ini , although the file is created by default by the cli.
Possible Solution
Steps to Reproduce (for bugs)
- create a new function using python-flask-template repo "faas new --lang python3-http test-tox"
- Build function using faas build -f test-tox.yml
- Function build fails with above error
Context
trying to use new template format.
Your Environment
-
FaaS-CLI version ( Full output from:
faas-cli version):
version: 0.13.9 -
Docker version
docker version(e.g. Docker 17.0.05 ):
19.03.8 -
Are you using Docker Swarm or Kubernetes (FaaS-netes)?
Kubernetes -
Operating System and version (e.g. Linux, Windows, MacOS):
Linux (CentOS) -
Code example or link to GitHub repo or gist to reproduce problem:
n/A -
Other diagnostic information / logs from troubleshooting guide
Step 27/35 : ARG TEST_ENABLED=true
---> Using cache
---> c38444c37ac6
Step 28/35 : RUN if [ "$TEST_ENABLED" == "false" ]; then echo "skipping tests"; else eval "$TEST_COMMAND"; fi
---> Running in c1b290bd6c83
ERROR: tox config file (either pyproject.toml, tox.ini, setup.cfg) not found
The command '/bin/sh -c if [ "$TEST_ENABLED" == "false" ]; then echo "skipping tests"; else eval "$TEST_COMMAND"; fi' returned a non-zero code: 1
[0] < Building test-tox done in 2.11s.
[0] Worker done.
Total build time: 2.11s
Errors received during build:
- [test-tox] received non-zero exit code from build, error: The command '/bin/sh -c if [ "$TEST_ENABLED" == "false" ]; then echo "skipping tests"; else eval "$TEST_COMMAND"; fi' returned a non-zero code: 1
Next steps
You may join Slack for community support.