NiklasRosenstein / flux-ci

Flux is your own private & lightweight CI server.
MIT License
26 stars 10 forks source link

Build exec format error #28

Closed NiklasRosenstein closed 8 years ago

NiklasRosenstein commented 8 years ago
[2016-06-09 09:12:24,828 - INFO]: [Flux]: build NiklasRosenstein/flux-test-repo#0 started
[2016-06-09 09:12:24,828 - INFO]: [Flux]: GIT_SSH_COMMAND='ssh -oBatchMode=yes'
[2016-06-09 09:12:24,828 - INFO]: $ git clone https://github.com/NiklasRosenstein/flux-test-repo.git /home/niklas/flux/builds/NiklasRosenstein/flux-test-repo/0 --recursive
[2016-06-09 09:12:26,346 - INFO]: 
Cloning into '/home/niklas/flux/builds/NiklasRosenstein/flux-test-repo/0'...

[2016-06-09 09:12:26,347 - INFO]: $ git checkout b631a7377c6a6362dd2d9f68c14a4cb81d34bc4c
[2016-06-09 09:12:26,352 - INFO]: 
Note: checking out 'b631a7377c6a6362dd2d9f68c14a4cb81d34bc4c'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at b631a73... initial commit

[2016-06-09 09:12:26,357 - INFO]: [Flux]: executing .flux-build.sh
[2016-06-09 09:12:26,357 - INFO]: $ /home/niklas/flux/builds/NiklasRosenstein/flux-test-repo/0/.flux-build.sh
[2016-06-09 09:12:26,359 - INFO]: [Flux]: Zipping build directory...
[2016-06-09 09:12:26,360 - INFO]: [Flux]: Done
[2016-06-09 09:12:26,360 - ERROR]: [Errno 8] Exec format error
Traceback (most recent call last):
  File "/home/niklas/flux/flux/build.py", line 153, in do_build
    if do_build_(build, build_path, logger, logfile, terminate_event):
  File "/home/niklas/flux/flux/build.py", line 235, in do_build_
    stdout=logfile, stderr=subprocess.STDOUT, stdin=None)
  File "/usr/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.4/subprocess.py", line 1457, in _execute_child
    raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error
  1. .flux-build.sh should echo "This is from .flux-build.sh"
  2. Where does the Exec format error come from?
NiklasRosenstein commented 8 years ago

For one the "zipping build directory" is printed before the "Exec format error" because it's executed in a finally-block. The "Exec format error" comes from the fact that the .flux-build.sh does not have a shebang line.