{"id":26797887,"url":"https://github.com/kameshsampath/apko-drone-plugin","last_synced_at":"2026-06-18T23:31:33.541Z","repository":{"id":145151613,"uuid":"598147581","full_name":"kameshsampath/apko-drone-plugin","owner":"kameshsampath","description":"Drone plugin to built tiny OCI container image using https://github.com/chainguard-dev/apko","archived":false,"fork":false,"pushed_at":"2023-02-09T06:33:35.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T12:38:09.298Z","etag":null,"topics":["apko","drone","plugin"],"latest_commit_sha":null,"homepage":"","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/kameshsampath.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,"zenodo":null}},"created_at":"2023-02-06T14:00:51.000Z","updated_at":"2023-02-08T05:52:50.000Z","dependencies_parsed_at":"2023-05-06T09:32:19.354Z","dependency_job_id":null,"html_url":"https://github.com/kameshsampath/apko-drone-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kameshsampath/apko-drone-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kameshsampath%2Fapko-drone-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kameshsampath%2Fapko-drone-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kameshsampath%2Fapko-drone-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kameshsampath%2Fapko-drone-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kameshsampath","download_url":"https://codeload.github.com/kameshsampath/apko-drone-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kameshsampath%2Fapko-drone-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34511617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"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":["apko","drone","plugin"],"created_at":"2025-03-29T19:16:04.562Z","updated_at":"2026-06-18T23:31:33.516Z","avatar_url":"https://github.com/kameshsampath.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Drone APKO Plugin\n\nDrone plugin to built OCI container image using [apko](https://github.com/chainguard-dev/apko)\n\n\u003e **IMPORTANT:** This plugin is under development and the parameters are subject to change\n\n## Usage\n\nThe following settings changes this plugin's behavior,\n\n- `config_file`: The apko configuration YAML file, path relative to drone pipeline.\n- `image_repo`: The fully qualified image repository where the built OCI image will be pushed.\n- `publish`: Whether to publish the image to `image_repo`. Defaults to `false` which will just build the image tarball.\n- `archs`: The `linux` architecture for which the images will be built. Defaults `$(uname -m)`. Valid values are: `amd64`, `arm64`.\n- `build_output_dir`: The output directory relative to `config_file` where the build artifacts will be generated.\n- `insecure`: Push to insecure registry.\n\n### Container Registry Credentials\n\n- `image_registry_username`: The user name that will be used to push the image to `image_repo`. Applicable when the `image_repo` is not GAR, ECR.\n- `image_registry_password`: The user password that will be used to push the image to `image_repo`. Applicable when the `image_repo` is not GAR, ECR.\n\n### Google Artifact Registry Credentials\n\n- `google_application_credentials`: The base64 encoded Google application credentials i.e. SA key.json. This parameter is useful only when your `image_repo` is [Google Artifact registry](https://cloud.google.com/artifact-registry/docs)\n\n### Elastic Container Registry Credentials\n\n- `aws_access_key_id`: The AWS `AWS_ACCESS_KEY_ID`\n- `aws_secret_access_key`: The AWS `AWS_SECRET_ACCESS_KEY`\n\n```yaml\nkind: pipeline\ntype: docker\nname: default\n\nsteps:\n  - name: build image\n    image: kameshsampath/apko-drone-plugin\n    settings:\n      config_file: image.yaml\n      image_repo: example/hello-world:0.0.1\n      publish: false\n      archs:\n        - amd64\n        - arm64\n```\n\nNow load the image using the command,\n\n```shell\ndocker load \u003c ./dist/hello-world-0.0.1_$(uname -m).tar\n```\n\n## Examples\n\nCheckout examples in folder [examples](./examples/). You need to have [drone](https://docs.drone.io/cli/install/) CLI to execute the examples locally.\n\n| Example                                                                            | Description                                                                |\n| :--------------------------------------------------------------------------------- | :------------------------------------------------------------------------- |\n| [Any OCI Registry](./examples/any-registry/README.md)                              | Build and deploy to any OCI compliant registry                             |\n| [Any OCI Registry Multi Architecture](./examples/any-registry-multiarch/README.md) | Build and deploy multi architecture images to any OCI compliant registry   |\n| [Elastic Container Registry](./examples/ecr/README.md)                             | Build and deploy to Elastic Container Registry(ECR)                        |\n| [Google Artifact Registry](./examples/gar/README.md)                               | Build and deploy to Google Artifact registry(GAR)                          |\n| [No Push](./examples/tarball/README.md)                                            | Build OCI tarball without pushing to remote repository.                    |\n| [Multi Architecture](./examples/tarball-multiarch/README.md)                       | Build multi architecture OCI tarball without pushing to remote repository. |\n\n## Building Plugin\n\nThe plugin relies on [apko](https://github.com/chainguard-dev/apko) and [melange](https://github.com/chainguard-dev/melange) for build.\n\nThe plugin build relies on:\n\n- [crane](https://github.com/google/go-containerregistry)\n- [limactl](https://github.com/lima-vm/lima)\n- [taskfile](https://taskfile.dev)\n\nStart `lima-vm` environment,\n\n```shell\ntask build_env\n```\n\nBuild plugin packages,\n\n```shell\ntask build_plugin_packages\n```\n\nBuild plugin container image,\n\n```shell\ntask build_plugin\n```\n\nTo publish the plugin to remote repository use,\n\n```shell\ntask publish_plugin\n```\n\n## Testing\n\nBuild plugin packages,\n\n```shell\ntask build_plugin load\n```\n\nBuild plugin container image,\n\n```shell\ntask build_plugin\n```\n\nCreate `.env`\n\n```shell\ncat\u003c\u003cEOF | tee .env\nPLUGIN_PUBLISH=false\nPLUGIN_CONFIG_FILE=image.yaml\nPLUGIN_IMAGE_REPO=example/my-image\nPLUGIN_IMAGE_REGISTRY_USERNAME=$DOCKERHUB_USERNAME\nPLUGIN_IMAGE_REGISTRY_PASSWORD=$DOCKERHUB_PASSWORD\nEOF\n```\n\nCreate a `image.yaml`,\n\n```shell\ncat\u003c\u003cEOF | tee image.yaml\n---\ncontents:\n  repositories:\n    - https://dl-cdn.alpinelinux.org/alpine/edge/main\n  packages:\n    - alpine-base\n    - busybox\n\nentrypoint:\n  command: /bin/sh \"echo 'Hello, welcome to apko world'\"\n\n# optional environment configuration\nenvironment:\n  PATH: /usr/sbin:/sbin:/usr/bin:/bin\nEOF\n```\n\n```shell\ndocker run --rm \\\n  --env-file=.env \\\n  --volume \"$PWD:/workspace\" \\\n  kameshsampath/apko-drone-plugin:latest\n```\n\nAfter the successful build you can load the image on to the local docker daemon,\n\n\u003e **NOTE**: the command generates the OCI image tarball in director dist\n\n```shell\ndocker load \u003c \"$PWD/dist/example/my-image_$(uname -m).tar\n```\n\nNow run the image to see the text **Hello, welcome to apko world**,\n\n```shell\ndocker run -it --rm example/my-image\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkameshsampath%2Fapko-drone-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkameshsampath%2Fapko-drone-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkameshsampath%2Fapko-drone-plugin/lists"}