Bug 1272481 - [RFE]Allow passing of parameters via Generic Webhooks
Summary: [RFE]Allow passing of parameters via Generic Webhooks
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OKD
Classification: Red Hat
Component: Build
Version: 3.x
Hardware: All
OS: All
unspecified
high
Target Milestone: ---
: ---
Assignee: Cesar Wong
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-16 13:48 UTC by Dave McCormick
Modified: 2015-10-26 19:29 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-26 19:29:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dave McCormick 2015-10-16 13:48:59 UTC
Description of problem:

We wish to use an STI or custom builder to assemble images for Java applications that have already been built and their artefacts uploaded to a repository, such as Nexus.  I don't want to use openshift to perform the whole build from source, where we have an existing CI platform doing this work well. I want the openshift build to be triggered by a generic webhook from our CI server and do job of packaging the built artefacts into a docker container.

When triggering the build, we would like to pass the build version as a parameter (perhaps on the call URL or in the json of the payload) so that the assemble script can use this to locate the application in the repository, e.g.: -

http://nexus.iggroup.local:8081/nexus/service/local/artifact/maven/redirect?g=com.iggroup.wt.activityreport&a=wt-activityreport-war&v=2.0.190&r=ig.release&e=war

If I could pass a parameter 'version' with the value '2.0.19' to my assemble script then I have all the information I need to download the artefacts into our customised tomcat container.

Version-Release number of selected component (if applicable):
3.0.2.0 Openshift Enterprise

How reproducible:
Feature does not exist.

Actual results:
Feature does not exist.

Expected results:
Allow something like this: -
http://<openshift_api_host:port>/osapi/v1/namespaces/<namespace>/buildconfigs/<name>/webhooks/<secret>/generic?param1=value1&param2=value2 etc..

Or allow parameters to be defined in the webhook payload
{
  "type": "Generic",
  "generic": {
    "secret": "secret101"
  }
  "parameters":  [
   { "name": "param1", "value": "value1"},
   { "name": "param2", "value": "value2"}
  ]
}

Each parameter is added as environment variable when starting the builder container. e.g.

PARAM1=VALUE1
PARAM2=VALUE2

Additional info:
NA

Comment 1 Ben Parees 2015-10-26 19:29:05 UTC
converted this to a trello card on our backlog:
https://trello.com/c/Zrpyi5sK/741-allow-parameters-on-generic-webhook-build-trigger-call


Note You need to log in before you can comment on or make changes to this bug.