Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tristancacqueray/zuul-gateway
https://github.com/tristancacqueray/zuul-gateway
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tristancacqueray/zuul-gateway
- Owner: TristanCacqueray
- License: apache-2.0
- Created: 2019-05-27T04:27:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-04T05:25:03.000Z (over 5 years ago)
- Last Synced: 2024-10-11T01:39:53.850Z (27 days ago)
- Language: Python
- Size: 18.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zuul-gateway: convert external events to git based trigger
Proof of concept that generates virtual git references to trigger zuul events
from non git events.## Setup
Add to zuul.conf:
```
[connection virtual]
driver=pagure
server=localhost:5000
baseurl=http://localhost:5000
```To main.yaml:
```
- tenant:
name: local
source:
virtual:
untrusted-projects:
- gateway
```To a check pipeline:
```
- pipeline:
name: check
trigger:
virtual:
- event: pg_pull_request
action:
- opened
success:
virtual:
status: 'success'
failure:
virtual:
status: 'failure'
```## Run the gateway
```
FLASK_APP=gateway.py flask run
```## Trigger a job
```
$ cat <zuul.yaml
- project:
check:
jobs:
- rpm-lint
vars:
rpm_url: http://koji.example.com/test.rpm
EOF
$ curl -X POST --header "Content-Type: application/yaml" \
--data-binary @zuul.yaml http://127.0.0.1:5000/jobs/rpm-lint-test
{"status":"pending"}
$ curl http://127.0.0.1:5000/jobs
{"rpm-lint-test": {"comment": "Build succeeded.\n\n- [rpm-lint](https://sftests.com/logs/1/1/None/check/rpm-lint/5125e93/) : SUCCESS in 40s\n", "status": "success"}
```