{"id":21452278,"url":"https://github.com/packit/hardly","last_synced_at":"2025-07-14T22:31:01.139Z","repository":{"id":38840473,"uuid":"368603395","full_name":"packit/hardly","owner":"packit","description":"Project is archived since Packit team agreed on prioritising work with more benefits and bigger user base.","archived":false,"fork":false,"pushed_at":"2024-08-26T22:53:36.000Z","size":280,"stargazers_count":0,"open_issues_count":8,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-08-27T01:42:31.033Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://packit.dev/source-git/status","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/packit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-18T16:47:56.000Z","updated_at":"2024-08-19T08:58:08.000Z","dependencies_parsed_at":"2023-02-16T15:35:34.123Z","dependency_job_id":"c5d9303d-35cc-45b3-b704-93fac7c48bd4","html_url":"https://github.com/packit/hardly","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packit%2Fhardly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packit%2Fhardly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packit%2Fhardly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packit%2Fhardly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/packit","download_url":"https://codeload.github.com/packit/hardly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226001602,"owners_count":17558007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T04:28:38.085Z","updated_at":"2024-11-23T04:28:38.724Z","avatar_url":"https://github.com/packit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hardly\n\n[![Build Status](https://zuul-ci.org/gated.svg)](https://softwarefactory-project.io/zuul/t/packit-service/project/github.com/packit/hardly)\n[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/pre-commit/pre-commit)\n\nCode for (Celery) worker used in our \"Stream service\".\nIt reuses [packit-service's worker](https://github.com/packit/packit-service/tree/main/packit_service/worker)\ncode and [implements new jobs as new handlers](https://github.com/packit/research/tree/main/split-the-stream#2-separate-workers).\n\n## Workflow\n\nThe service is similar to [Packit service](https://github.com/packit/packit-service),\nbut is expected to eventually follow [this workflow](https://github.com/packit/research/tree/main/split-the-stream#what-does-the-source-git-workflow-mean):\n\n##### Must have:\n\n- [x] If a user creates a merge-request on the source-git repository:\n  - [x] Create a matching merge-request to the dist-git repository.\n  - [x] Sync the CI results from the dist-git merge-request to the source-git merge-request.\n- [x] If the dist-git is updated, update the source-git repository by opening a PR.\n  - Implemented, but [not enabled yet](https://github.com/packit/hardly/issues/109).\n- [x] User is able to convert source-git change to the dist-git change locally via CLI.\n\n##### Should have:\n\n- [x] If the source-git merge-request is updated, update the dist-git merge-request.\n- [x] If the source-git merge-request is closed, close the dist-git merge-request.\n\n##### Could have:\n\n- [ ] User is able to re-trigger the dist-git CI from the source-git merge-request.\n- [ ] User is able to re-create the dist-git MR from the source-git merge-request.\n\n## Running it locally\n\n[Similar to packit-service](https://github.com/packit/packit-service/blob/main/CONTRIBUTING.md#running-packit-service-locally)\nwe have a [docker-compose.yml](docker-compose.yml) for fast prototyping.\n\nIt expects, that you have:\n\n- [.env.fedora-source-git](.env.fedora-source-git) or [env.stream](.env.stream)\n  copied or symlinked (`ln -s .env.fedora-source-git .env`) to `.env`.\n- `secrets/fedora-source-git/dev/` or `secrets/stream/dev/` populated (linked)\n  with secrets mostly taken from our internal repo.\n  \"Mostly\", because you should use your credential where possible.\n- `../ogr/`, `../packit/` and `../packit-service/` dirs with the respected repos cloned.\n  Those are mounted into the container, so you don't have to\n  rebuild the image each time you change anything in them.\n\nFollow the [packit-service's guide](https://github.com/packit/packit-service/blob/main/CONTRIBUTING.md#running-packit-service-locally)\nfor the other settings. Once you have it running (and see no errors), you can test (uses [HTTPie](https://httpie.io)) the webhook with:\n\n    cat tests/data/webhooks/gitlab/mr_event.json | http --verify=no https://service.localhost:8443/api/webhooks/gitlab\n\n## How to deploy\n\nTo deploy the service into Openshift cluster,\nclone the [deployment repo](https://github.com/packit/deployment) and:\n\n1. [create the variable files](https://github.com/packit/deployment/tree/main/vars) in [vars/stream/](https://github.com/packit/deployment/tree/main/vars/stream)\n2. link secrets into [secrets](https://github.com/packit/deployment/tree/main/secrets) / stream/{prod|stg}\n3. `SERVICE={fedora-source-git|stream} DEPLOYMENT={deployment} make deploy`\n\n## Image\n\n[The image](files/Containerfile) is currently based on the\n[packit-worker image](https://github.com/packit/packit-service/blob/main/files/docker/Dockerfile.worker)\nbut that might change in the future to decouple those.\n\nFor running locally with docker-compose, build it with `docker-compose build`.\n\nFor deploying in cluster, the image is\n[built and pushed](.github/workflows/rebuild-and-push-images.yml)\nto [Quay.io](https://quay.io/repository/packit/hardly) whenever you push to `main`.\nOr you can rebuild manually in\n[Actions](https://github.com/packit/hardly/actions/workflows/rebuild-and-push-images.yml).\n\n## Actual deployments\n\n- [Fedora](https://github.com/packit/deployment/blob/main/docs/deployment/specifics/fedora-source-git.md)\n- [CentOS Stream](https://github.com/packit/deployment/blob/main/docs/deployment/specifics/centos-stream-source-git.md)\n\n## Tests\n\nLocally: `make test-image` \u0026\u0026 `make check-in-container`\n\nCI: [Zuul](.zuul.yaml)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpackit%2Fhardly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpackit%2Fhardly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpackit%2Fhardly/lists"}