Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

RedHatQE/openshift-ci-job-re-trigger

Repository files navigation

Code is under ci-jobs-trigger repo

openshift-ci-job-trigger

A Flask-based webhook server for re-triggering openshift-ci jobs.
Only periodic jobs can be re-triggered (openShift-ci API limitation).
Re-triggering is done only if a job fails during setup (pre phase).
The job will be re-triggered only once.

How to call the server

curl -X POST  http://<url>:5000/openshift_ci_job_trigger -d '{"job_name":"'"$JOB_NAME"'", "build_id": "'"$BUILD_ID"'", "prow_job_id":"'"$PROW_JOB_ID"'", "token":  "'"$OPENSHIFT_CI_TOKEN"'"}' -H "Content-Type: application/json"
  • JOB_NAME - openshift-ci job name
  • BUILD_ID - openshift-ci job build id
  • PROW_JOB_ID - openshift-ci prow build id
  • OPENSHIFT_CI_TOKEN - openshift-ci gangway API token

Pre-build container images available in:

  • quay.io/redhat_msi/openshift-ci-job-trigger

Build container

Using podman:

podman build -t openshift-ci-job-trigger .

Using docker:

docker build -t openshift-ci-job-trigger .

Main Functionalities

Development

To run locally you need to export some os environment variables

poetry install

export FLASK_DEBUG=1  # Optional; to output flask logs to console.
export OPENSHIFT_CI_JOB_TRIGGER_PORT=5003  # Optional; to set a different port than 5000.
export OPENSHIFT_CI_JOB_TRIGGER_USE_RELOAD=1  # Optional; to re-load configuration when code is saved.

poetry run python openshift_ci_job_trigger/app.py

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published