Comments (13)
I changed my mind overnight a little :) I think I will just pass through whatever response I get from OpenShift also when forwarding a webhook request...
from ods-core.
@gerardcl OK for me. I am not sure about if this is still needed, see my last comment. Seems not to be needed for 1.2 at least ...
from ods-core.
Thanks @clemensutschig.
What's the context? We are building a simple multi-repo orchestration engine that would integrate with ODS components through the webhook. Naturally, if B depends on A, we want to know that A has finished before kicking off B. Here, A could be a repo containing infrastructure as code.
from ods-core.
I tried it with curl
$ curl -X POST -k https://...../oapi/v1/namespaces/ods28-cd/buildconfigs/be-docker-plain-master/webhooks/............../generic % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1583 100 1583 0 0 2110 0 --:--:-- --:--:-- --:--:-- 2110 {"kind":"Build","apiVersion":"build.openshift.io/v1","metadata":{"name":"be-docker-plain-master-23","namespace":"ods28-cd","selfLink":"/apis/build.openshift.io/v1/namespaces/ods28-cd/buildconfigs/be-docker-plain-master-23/instantiate","uid":"c8e9c214-85fc-11e9-9b41-0050569e63cb","resourceVersion":"129839908","creationTimestamp":"2019-06-03T12:40:36Z","labels":{"buildconfig":"be-docker-plain-master","openshift.io/build-config.name":"be-docker-plain-master","openshift.io/build.start-policy":"Serial"},"annotations":{"openshift.io/build-config.name":"be-docker-plain-master",**"openshift.io/build.number":"23"**},"ownerReferences":[{"apiVersion":"build.openshift.io/v1","kind":"BuildConfig","name":"be-docker-plain-master","uid":"aaf71a4d-6db1-11e9-9bbe-0050569e63cb","controller":true}]},"spec":{"serviceAccount":"builder","source":{"type":"Git","git":{"uri":"..../ods28/ods28-be-docker-plain.git","ref":"master"},"status":{"phase":"New","config":{"kind":"BuildConfig","namespace":"ods28-cd","name":"be-docker-plain-master"},"output":{}}} { "kind": "Status", "apiVersion": "v1", "metadata": { }, "status": "Success", "message": "invalid Content-Type on payload, ignoring payload and continuing with build", "code": 200 }
a curl against
https://..../apis/build.openshift.io/v1/namespaces/ods28-cd/builds/be-docker-plain-master-23 "status": { "phase": "Pending", "config": { "kind": "BuildConfig", "namespace": "ods28-cd", "name": "be-docker-plain-master" }, "output": {does the rest then
from ods-core.
playing with this uncovered openshift/api#331
from ods-core.
@oalyman - can you pick this up - or wait until @michaelsauter is back (3 weeks)
from ods-core.
completed looks this way
"status": { "phase": "Complete", "startTimestamp": "2019-02-18T17:18:20Z", "completionTimestamp": "2019-02-18T17:24:22Z", "config": { "kind": "BuildConfig", "namespace": "prov-cd", "name": "prov-app-test" }, "output": { }and pending
"status": { "phase": "Pending", "config": { "kind": "BuildConfig", "namespace": "prov-cd", "name": "ods-provisioning-app-dev" }, "output": { } }
from ods-core.
@clemensutschig @metmajer So if I understand this correctly, then you want one pipeline (the orchestrating one) to know about the status of other pipelines. If so, why should the webhook proxy answer that question? For me the proxy is simply the glue between Bitbucket and Jenkins. To me it looks like you can answer your question directly from a Jenkins pipeline as you can talk to the OpenShift API directly (via oc
commands). Right?
from ods-core.
As a first step, I will work on returning the build ID, such as be-docker-plain-master-23
when the webhook request is forwarded. Response will be:
{"buildId": "be-docker-plain-master-23"}
Next step would be to add some kind of subfolder, e.g. /oapi/namespaces/:NAMESPACE/builds/:ID
that queries for a build status. Here I would probably just pass on whatever OpenShift returns. Sounds good?
from ods-core.
As I understood it, the webhook proxy should act as the central gateway to a Jenkins instance running on OpenShift (see Clemens' first entry). @michaelsauter then what you suggest would be very convenient. Thanks!
from ods-core.
@clemensutschig Do we still need a way to query the build ID?
from ods-core.
@clemensutschig @michaelsauter moving this to 2.0 if it is not solved yet, if not feel free to close
from ods-core.
Closing due to no response, please open a new issue when a further feature is required.
from ods-core.
Related Issues (20)
- Update Containers Probes in Jenkins HOT 1
- Enable PR pipeline execution when opened HOT 3
- Remove sonar-crowd plugin in SonarQube HOT 2
- periodically build and publish jenkins-agent-base HOT 1
- outdated snyk version in ci workflow HOT 1
- outdated helm version in Jenkins base agent
- Outdated git-lfs version
- CI Workflows error out on Ubuntu 18 use
- Removal of Centos and deprecation of ODSBox HOT 2
- SonarQube maintenance
- Update and align Aqua version with cli
- SonarQube Rust support
- webhook proxy feature for jenkins idling HOT 1
- Jenkins maintenance
- auto-update (PR) github actions
- tests/go.mod,go.sum maintenance
- Trivy into Jenkins Agents
- Nexus maintenance
- Error adding ALLOWED_CHANGE_REF_TYPES as env variable HOT 2
- Configuration mismatch on Prov-app and ods-core repositories
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ods-core.