Create a Tool
Install the SDK
Create a folder/directory for your module (e.g. gcp)
Create 4 files
Dockerfile
README.md
requirements.txt
setup.py
Create 2 directories
Directory for tools python files (e.g. gcp_tools)
Directory for test (e.g. tests)
Install the SDK
Dockerfile
README.md
requirements.txt
setup.py
You can add any packages needed for your tool. In this case we added google-cloud-sdk
Tools folder (e.g. gitlab_tools)
Within the tools folder, make another folder called tools
:
and a Python __init__.py
file, in which you can import and expose your tools
Within the tools
folder, create a few files:
A Python init__.py
file
A base.py
file, which will define one or more classes of tools
In this example, we're using one of type Docker, so we add the image for the Google Cloud SDK from DockerHub. Alternatively, you can create tools based on other types like Python, Bash, Shell, etc.
Optional – a common.py
file, which will declare the common environment variable and common file for each tool in the directory
Tests folder (optional)
For each tool you created, you can optionally create tests
Last updated