A Flask-based webhook server to trigger ci jobs.
- zstream_trigger - Trigger ci jobs on a release of new OCP z-stream
- re_trigger - Re-trigger ci job on failure
- operators_iib_trigger - Trigger ci job on new operator index image
- addons_webhook_trigger - Trigger ci job when a new addon is released
- Default image tag is
latest, to use a different one setIMAGE_TAG=<tag> - Default image quay repository is
quay.io/redhat_msi/ci-jobs-trigger, to use a different one setIMAGE_REPOSITORY=<repository>
make buildmake push- To build and push custom tag and/or repository
IMAGE_TAG="test-image" IMAGE_REPOSITORY="quay.io/my-repo" make pushUse poetry to manage virtualenv.
pip install poetryAfter installation, run:
poetry installTo run locally you can export the following environment variables:
poetry install
export FLASK_DEBUG=1 # Optional; to output flask logs to console.
export CI_JOBS_TRIGGER_LISTEN_PORT=5003 # Optional; to set a different port than 5000.
export CI_JOBS_TRIGGER_USE_RELOAD=1 # Optional; to re-load configuration when code is saved.
export CI_JOBS_TRIGGER_LISTEN_IP="0.0.0.0" # Optional, to listen on all interfaces. Default is localhost only.
poetry run python ci_jobs_trigger/app.pyTests are located under tests dir
Code checks tools that are defined in pre-commit-config To install pre-commit:
pip install pre-commit --user
pre-commit installpre-commit will try to fix the error. If some error where fixed git add & git commit is needed again.
To run the tests and un-used code checks:
make tests