Hide Forgot
Description of problem: In 4.0 postcommit are not support args, refer[1], so should not set the post-commit hook as a set of arguments to the default image entrypoint Version-Release number of selected component (if applicable): oc 4.0.0-0.148.0 How reproducible: always Steps to Reproduce: 1.oc set build-hook bc/ruby-hello-world --post-commit --help # Set the post-commit hook as a set of arguments to the default image entrypoint oc set build-hook bc/mybuild --post-commit -- arg1 arg2 2.example oc set build-hook bc/ruby-hello-world --post-commit -- arg1 arg2 postCommit: args: - arg1 - arg2 3. Actual results: display oc set build-hook bc/mybuild --post-commit -- arg1 arg2 Expected results: should delete the info in help, and when execute the command should give error info Additional info: [1]https://github.com/openshift/origin/pull/21389/files
Opened pull request https://github.com/openshift/origin/pull/21880 to address this issue
Pull request has merged.
Checked in version 4.0.0-0.nightly-2019-02-13-204401 registry.svc.ci.openshift.org/ocp/release@sha256:8168c9d2a331b6e8ca5e9b08f623d7f0ff50277bbc63fa71b1bc2a8c806f2ddf oc v4.0.0-0.173.0 steps: oc set build-hook bc/ruby-sample-build --post-commit --help Examples: # Clear post-commit hook on a build config oc set build-hook bc/mybuild --post-commit --remove # Set the post-commit hook to execute a test suite using a new entrypoint oc set build-hook bc/mybuild --post-commit --command -- /bin/bash -c /var/lib/test-image.sh # Set the post-commit hook to execute a shell script oc set build-hook bc/mybuild --post-commit --script="/var/lib/test-image.sh param1 param2 && /var/lib/done.sh" ----------- and tested it with script, build complete. verified the bug $ oc set build-hook bc/ruby-sample-build --post-commit --script="bundle exec rake test" -n wewang3 [wewang@Desktop ~]$ oc get builds -n wewang3 --watch NAME TYPE FROM STATUS STARTED DURATION ruby-sample-build-1 Source Git@787f1be Complete 14 minutes ago 1m51s ruby-sample-build-2 Source Git@787f1be Complete 9 minutes ago 2m32s
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:0758