This tool generates a skeleton for a new Keboola Connection component. See the Development Guide for more details.
This tool is working on a checked out GitHub repository and sets GitHub Actions
deployment.
See the documentation for working with
Bitbucket or
Gitlab repository.
You need Docker to run this tool.
If you don't need setting up CI integration, you may simply copy the files from templates-ci
directories.
In that case don't forget to run git update-index --chmod=+x deploy.sh
to make the deployment scripts executable.
Before you run this tool, you should have created a new component and a new service account in the Developer Portal. See our Component Tutorial for more detailed instructions. Before you start, you should have:
- vendor ID and component ID
- service account username and password
Run:
docker run --rm -i -t --volume=/path/to/repository/:/code/ quay.io/keboola/component-generator
The path /path/to/repository/
is expected to contain an empty GitHub repository.
Options:
--setup-only
-- only run setup ofGitHub Actions
deployment--update
-- use to update existing repository, will ask about each file before copying
Pass options in the command line like this:
docker run --rm -i -t --volume=/path/to/repository/:/code/ quay.io/keboola/component-generator --setup-only
Setup of GitHub Actions
deployment does the following:
- enable building of the repository
- build only if .github/workflows/push.yml is present
- github token must have repo/public_repo scope
- set
KBC_DEVELOPERPORTAL_PASSWORD
secret
To run the component generator locally on a local repository, you need to map two volumes, e.g.:
docker build . -t component-generator-dev
docker run --rm -it -v /path/to/genrator/:/init-code/ -v /path/to/repository/:/code/ --entrypoint=/bin/bash component-generator-dev
Then run the generator with php /init-code/application.php
. The generator assumes that its code is located
in the /init-code/
directory and the repository to be initialized is located in the /code/
directory.
MIT licensed, see LICENSE file.