NiklasRosenstein / flux-ci

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

Trigger using HTTP request #55

Open gsantner opened 6 years ago

gsantner commented 6 years ago

Currently flux ci misses support for triggering using HTTP requests (not using Git service - but manually e.g. using curl)

Here are two examples I know, and would be great if we are mostly compatible:

The goal would be to basically support those two styles of passing vars.

Thought: maybe something like https://mylux.ci/api/trigger/FLUXCI_USER/FLUXCI_PROJECT/pipeline?token=something ?

Return body could be json with ok/success flag and new pipeline-id.

This is specially getting interesting when one wants to trigger e.g. a release build for an application, but wants to specify some values.

I'm have not worked with any rest framework in python yet. maybe this is not too hard, dont know.

NiklasRosenstein commented 6 years ago

I do understand correctly that this would be basically the same as starting a new build via the Web Interface, only that you can specify some environment variables as well?

We should also get the ability to specify environment variables with the "New Build" option in the web as well.

gsantner commented 6 years ago

Yes, exactly. If user has the ability too on webui even better. Than we could already call API with given parameters instead of calling python methods.

The other thing - At ci-file level I have already implemented support for parsing things from file, but those are thought to be more or less fixed values you dont change often :D.

gsantner commented 6 years ago

I can give some ideas or feedback from what I know of GL and jenkins CI 's trigger API and Web-Trigger-View if something needed

gsantner commented 6 years ago

related to decisions of #49 too