{"id":18510669,"url":"https://github.com/operator-framework/operator-courier","last_synced_at":"2025-05-07T08:25:32.521Z","repository":{"id":34158761,"uuid":"162432841","full_name":"operator-framework/operator-courier","owner":"operator-framework","description":"Build, verify and push operators","archived":false,"fork":false,"pushed_at":"2022-12-15T15:04:42.000Z","size":446,"stargazers_count":41,"open_issues_count":37,"forks_count":53,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-16T00:13:17.048Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/operator-framework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-19T12:13:58.000Z","updated_at":"2024-07-08T22:43:43.000Z","dependencies_parsed_at":"2023-01-15T04:58:52.662Z","dependency_job_id":null,"html_url":"https://github.com/operator-framework/operator-courier","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operator-framework%2Foperator-courier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operator-framework%2Foperator-courier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operator-framework%2Foperator-courier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operator-framework%2Foperator-courier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/operator-framework","download_url":"https://codeload.github.com/operator-framework/operator-courier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252840884,"owners_count":21812379,"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-06T15:24:21.324Z","updated_at":"2025-05-07T08:25:32.459Z","avatar_url":"https://github.com/operator-framework.png","language":"Python","readme":"# Notice \n\n:warning: **This project is deprecated and is no longer supported or maintained.**\n\nAppRegistry packaging format is no longer supported by [OLM](https://github.com/operator-framework/operator-lifecycle-manager).\nYou can use the [Bundle](https://github.com/operator-framework/operator-registry/blob/v1.19.5/docs/design/operator-bundle.md) format and [Operator Registry](https://github.com/operator-framework/operator-registry) instead.\n\n**What about `operator-courier verify`? How can I verify the manifests?**  \n\nAll tests and checks made by this project were moved to the project [operator-framwork/api](https://github.com/operator-framework/api) and specifically to the validator [OperatorHub](https://github.com/operator-framework/api/blob/v0.10.7/pkg/validation/internal/operatorhub.go). You can use the [operator-framwork/api](https://github.com/operator-framework/api) directly or [Operator-SDK](https://github.com/operator-framework/operator-sdk) to do these checks with the command `operator-sdk bundle validate ./bundle --select-optional name=operatorhub`([More info](https://sdk.operatorframework.io/docs/cli/operator-sdk_bundle_validate/)).\n\n# Operator Courier\n\n[![Build Status](https://travis-ci.org/operator-framework/operator-courier.svg?branch=master)](https://travis-ci.org/operator-framework/operator-courier)\n[![Coverage Status](https://coveralls.io/repos/github/operator-framework/operator-courier/badge.svg?branch=master)](https://coveralls.io/github/operator-framework/operator-courier?branch=master)\n\nThe Operator Courier is used to build, validate and push Operator Artifacts.\n\nOperator Courier is currently supported on Python 3.6 and above.\n\n## Installation\n\n- To install the latest version of operator-courier, just install the latest release from [PyPI](https://pypi.org/project/operator-courier/):\n\n  ```bash\n  $ pip3 install operator-courier\n  ```\n\n- To install a specific release, use the `==` operator and specify the version. For example:\n\n  ```bash\n  $ pip3 install operator-courier==2.0.1\n  ```\n\n- To upgrade an existing operator-courier release:\n\n  ```bash\n  $ pip3 install -U operator-courier\n  ```\n\n## Usage\n\n### Command Line Interface\n\nOnce the project is installed, you can run the `verify` command on a directory that adheres to the expected [Manifest format](https://github.com/operator-framework/operator-registry#manifest-format).\n\n```bash\n$ operator-courier verify $MANIFESTS_DIR\n```\n\nTo push the operator manifests to a quay.io app registry just use `operator-courier push`. Just pass the directory, namespace, repository, release version and quay.io authorization token needed to push.\n\n```bash\n$ operator-courier push $MANIFESTS_DIR $EXAMPLE_NAMESPACE $EXAMPLE_REPOSITORY $EXAMPLE_RELEASE \"$AUTH_TOKEN\"\n```\n\nOnce that is created, you should be able to view your pushed application on quay.io's Application page for your particular namespace, repo, and release version (https://quay.io/application/$EXAMPLE_NAMESPACE/$EXAMPLE_REPOSITORY?tab=$EXAMPLE_RELEASE)\n\nFor more info, run help on the main program or any of the subcommands\n\n```bash\n$ operator-courier -h\n$ operator-courier $SUBCOMMAND -h\n```\n\n### Debugging Validation Errors\nYou can optionally specify the `--verbose` flag to view detailed validation information during `verify` or `push`\n\n```bash\n$ operator-courier --verbose verify $MANIFESTS_DIR\n$ operator-courier --verbose push $MANIFESTS_DIR $EXAMPLE_NAMESPACE $EXAMPLE_REPOSITORY $EXAMPLE_RELEASE \"$AUTH_TOKEN\"\n```\n\nFor more information, please refer to the following docs about creating valid CSVs\n- [Building a Cluster Service Version (CSV) for the Operator Framework](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/design/building-your-csv.md#your-custom-resource-definitions)\n- [Required fields within your CSV](https://github.com/operator-framework/community-operators/blob/master/docs/required-fields.md#categories)\n\n\n### Authentication\nCurrently, the quay API used by the courier can only be authenticated using quay.io's basic account token authentication. In order to get this token to authenticate with quay, a request needs to be made against the login API. This requires a normal quay.io account, and takes a username and password as parameters. This will return an auth token which can be passed to the courier.\n\n```bash\n$ AUTH_TOKEN=$(curl -sH \"Content-Type: application/json\" -XPOST https://quay.io/cnr/api/v1/users/login -d '\n{\n    \"user\": {\n        \"username\": \"'\"${QUAY_USERNAME}\"'\",\n        \"password\": \"'\"${QUAY_PASSWORD}\"'\"\n    }\n}' | jq -r '.token')\n```\n\nExpecting future enhancements, this authentication process will change somewhat in future releases.\n\n## Library\nTo use the Operator Courier in your project, simply install the Operator Courier pip package. Then import the api module:\n\n```python\nfrom operatorcourier import api\n\ndef main():\n    api.build_verify_and_push(NAMESPACE, RESPOSITORY, RELEASE_VERSION, AUTH_TOKEN, source_dir=\"./my/folder/to/manifests/\")\n```\n\n## Building and running the tool locally with pip\n\n```bash\n$ pip3 install --user .\n$ operator-courier\n```\n\n## Building the docker image\n\n```sh\n$ docker build -f Dockerfile -t $TAG\n$ docker run $TAG operator-courier\n```\n\nFor further details, please see the [contribution guide](docs/contributing.md).\n\n## Testing\n\n### Unit tests\n\n[Install tox](https://tox.readthedocs.io/en/latest/install.html) and run:\n\n```bash\n$ tox\n```\n\nThis will run the tests with several versions of Python 3, measure coverage,\nand run flake8 for code linting.\n\n### Integration tests\n\nBefore running integration tests, you must have write access credentials to a [quay.io](https://quay.io) namespace. See the [authentication](#authentication) section for more information.\n\nFirst, build the integration docker images:\n\n```sh\n$ docker build -f tests/integration/dockerfiles/integration-base.Dockerfile -t operator-courier-integration-base:latest .\n$ docker build -f tests/integration/dockerfiles/integration.Dockerfile -t operator-courier-integration:latest .\n```\n\nThen run the tests inside a container using your access credentials:\n\n```sh\n$ docker run \\\n  -e QUAY_NAMESPACE=\"$QUAY_NAMESPACE\" \\\n  -e QUAY_ACCESS_TOKEN=\"$QUAY_ACCESS_TOKEN\" \\\n  operator-courier-integration:latest \\\n  tox -e integration\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foperator-framework%2Foperator-courier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foperator-framework%2Foperator-courier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foperator-framework%2Foperator-courier/lists"}