cancel
Showing results for 
Search instead for 
Did you mean: 
tgayda
Cadet
Cadet
  • 2,315 Views

Issue when addin post commit hook

Jump to solution

Failure to use file instead of direct script. --script=hook.py option fails. hook.py is treated as a command. Please, help

Labels (1)
Tags (2)
1 Solution

Accepted Solutions
dmis
Flight Engineer Flight Engineer
Flight Engineer
  • 2,273 Views

Hi! First of all your hook.py script must exist in directory.

Second hook.py file must be executable. ensure that is chmod +x hook.py

Or you can start python script manually with --command='python3 ./hook.py'

dmis.

View solution in original post

2 Replies
dmis
Flight Engineer Flight Engineer
Flight Engineer
  • 2,274 Views

Hi! First of all your hook.py script must exist in directory.

Second hook.py file must be executable. ensure that is chmod +x hook.py

Or you can start python script manually with --command='python3 ./hook.py'

dmis.

danielenegroni
Mission Specialist
Mission Specialist
  • 1,618 Views

This solution does not work.

I also tried something like this but still not working:

oc set build-hook bc/name --post-commit --script=”pyhon3 hook.py”

Help will be appreciated.

Join the discussion
You must log in to join this conversation.