{"id":19351714,"url":"https://github.com/operable/cog-bundle-buildkite-plugin","last_synced_at":"2026-04-17T06:02:31.032Z","repository":{"id":90392697,"uuid":"78649483","full_name":"operable/cog-bundle-buildkite-plugin","owner":"operable","description":"Buildkite plugin for testing Cog Bundles in a Cog Server","archived":false,"fork":false,"pushed_at":"2019-02-08T16:58:23.000Z","size":21,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T10:36:41.294Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/operable.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":"2017-01-11T14:59:21.000Z","updated_at":"2017-01-17T16:21:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"a949d862-966b-47b8-b750-fce437bd6b99","html_url":"https://github.com/operable/cog-bundle-buildkite-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/operable/cog-bundle-buildkite-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operable%2Fcog-bundle-buildkite-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operable%2Fcog-bundle-buildkite-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operable%2Fcog-bundle-buildkite-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operable%2Fcog-bundle-buildkite-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/operable","download_url":"https://codeload.github.com/operable/cog-bundle-buildkite-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/operable%2Fcog-bundle-buildkite-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31917372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10T04:37:02.222Z","updated_at":"2026-04-17T06:02:31.015Z","avatar_url":"https://github.com/operable.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cog-bundle-buildkite-plugin\nBuildkite plugin for testing Cog Bundles in a Cog Server\n\n[![Build status](https://badge.buildkite.com/be17ba01fa3d366cea89f2f28bce33901ed8220d93943bb8a4.svg?branch=master)](https://buildkite.com/operable/cog-bundle-buildkite-plugin)\n\n**NOTE: Plugins only work with the as yet unlreleased 3.0 version of the Buildkite Agent!**\n\n**NOTE: This plugin is a work-in-progress. We use it internally at Operable to test our bundles. However, it may still blow up your systems; use at your own discretion!**\n\nThis plugin provides the following actions:\n* `build`: Build a Docker image based on a bundle's `config.yaml` file\n* `test`: Install the bundle in a real Cog server and perform integration tests against it.\n\nNote that this plugin currently supports testing of Docker-packaged bundles only; \"native\" command bundles are not supported.\n\nUsage examples are given below, but also see this plugin's [pipeline configuration](.buildkite/pipeline.sh) for other examples.\n\n# `build`\nBuild a Docker image for the bundle, optionally pushing it to your previously-configured Docker repository. When successful, the image tag is added to the pipeline's meta-data under the key `\"operable-bundle-testing-image\"` and can be retrieved later via\n\n```sh\nbuildkite-agent meta-data get \"operable-bundle-testing-image\")\n```\n\n## Keys\n* `build`: the name of the bundle configuration file to use.\n  Typically this will be `config.yaml`. At the moment, this *must* be provided; sorry about that!\n\n  If a `tag` key (see below) is not provided, the generated image will be tagged according to the values provided in the configuration file.\n\n* `dockerfile`: The path to the Dockerfile used to generate the bundle. This is optional, and defaults to   `\"Dockerfile\"` if not provided by the user.\n\n  The directory the file is in will serve as the build context.\n\n* `tag`: The full image tag you wish to use for the image. If not provided, the value will be generated from the configuration file specified for `build` (see above).\n\n* `push`: Should the image be pushed to its repository? Defaults to true.\n\n## Examples\n\n```yaml\n- steps:\n  - label: Build a Cog Bundle image\n    plugins:\n      operable/cog-bundle:\n        build: config.yaml\n\n  - label: Build a Cog Bundle image with a custom Dockerfile\n     plugins:\n       operable/cog-bundle:\n         build: config.yaml\n         dockerfile: Dockerfile.cog\n\n  - label: Build a Cog Bundle Image with custom tag\n    plugins:\n      operable/cog-bundle:\n        build: config.yaml\n        tag: mycompany/my-bundle:1.0.0-${BUILDKITE_BUILD_NUMBER}-${BUILDKITE_COMMIT}\n\n  - label: Build image, but don't push\n    plugins:\n      operable/cog-bundle:\n        build: config.yaml\n        push: \"false\" # TODO: Shouldn't need to be quoted\n```\n\n# `test`\n\nLoad the bundle into a live Cog server and run integration tests. Tests are specified declaratively in a YAML file.\n\n## Keys\n* `test`: the path to the integration test specification YAML file. Must be provided.\n\n* `cog-version`: The Git SHA, branch, or tag for the [Cog repository](https://github.com/operable/cog) from which the base `docker-compose` files will be downloaded. These define the Cog system that is set up for the tests. Defaults to `\"master\"`, if not provided.\n\n* `config`: The path to the bundle configuration file. This is the same value as provided for the `build` key above, but here, we can default to `config.yaml`. The plugin generates a new version of this configuration file, substituting the Docker image generated by the `build` action.\n\n## Examples\n\n```yaml\n- steps:\n\n  - label: Test against Cog\n    plugins:\n      operable/cog-bundle#${BUILDKITE_COMMIT}:\n        test: integration.yaml\n        cog-version: \"v1.0.0-beta.1\"\n        config: config.yaml\n```\n\nNote: by dynamically generating your pipeline definitions, you can loop over a list of several different Cog versions, thereby testing your bundle against each of them.\n\n## Integration Test specification\n\nTo test bundle commands, we read a YAML file that specifies the test scenarios. Internally, this is used to dynamically generate and run an RSpec suite. Note that bundles do not need to be build with [cog-rb](https://github.com/operable/cog-rb), or even written in Ruby, in order to use this plugin for testing.\n\nCurrently the integration test format works for bundles with no permissions, and without any dynamic configuration. Support for these scenarios will be added soon.\n\nAn example will illustrate the format:\n\n```yaml\n\"format:list\":\n  - desc: can extract fields\n    pipeline: format:list name\n    input:\n      - name: geddy\n      - name: neil\n      - name: alex\n    output:\n      - body: alex, geddy, neil\n\"format:fields\":\n  - desc: returns the fields of an object\n    pipeline: format:fields\n    input:\n      x: 1\n      y: 2\n      z: 3\n    output:\n      - fields: [ x, y, z ]\n```\n\nThe overall structure is that of a map, whose keys name overall test suites, and whose values describe lists of test cases. Generally the name of the suite can just be the name of the command being tested, but it can be more descriptive if you choose.\n\nEach test case has four fields:\n\n* `desc`: A description of the test case\n* `pipeline`: The chat command to actually be executed\n* `input`: any input provided to the pipeline. This should be a map\n* `output`: the expected output of the pipeline\n\nInternally, each test case creates a Cog trigger for the pipeline in question and then executes that trigger to carry out the test. The tests do not interact with a chat provider during execution. The output is the raw pipeline output; no templating of results is performed at all.\n\n## Environment Variables\n\n* `INTERFACE`: Specify a particular network interface to use to obtain an IP address for the Cog server. Defaults to `eth0`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foperable%2Fcog-bundle-buildkite-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foperable%2Fcog-bundle-buildkite-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foperable%2Fcog-bundle-buildkite-plugin/lists"}