Your contribution is welcome! Thank you for your interest in contributing to the STACKIT Functions language templates. We greatly value your feedback, feature requests, additions to the code, bug reports or documentation extensions.
Each language template resides in its own directory (e.g., go-template, js-template). Each template directory contains a stackit-functions.yaml file, a README.md, the source code for a basic function, along with language-specific configuration files (e.g., go.mod, package.json, pom.xml, Cargo.toml, pyproject.toml, tsconfig.json), and ignore files (.funcignore, .gitignore).
To add a new language template, create a new directory (e.g., new-lang-template) mirroring the structure of existing templates.
- Scaffold: Copy the basic structure from an existing template (e.g.,
go-templateorjs-template). - Implement default function: Implement a simple 'Hello from STACKIT Functions' function in the new language.
- Configuration: Ensure to include:
- A
stackit-functions.yamlfor function configuration. - A comprehensive
README.mdwith setup and usage instructions. - Any necessary build and dependency management files (e.g.,
package.json,pom.xml,Cargo.toml,go.mod,pyproject.toml). - Appropriate ignore files (
.funcignore,.gitignore).
- A
- Testing: Add unit and integration tests for the new template.
- Documentation: Update the main
README.mdif necessary to reflect the new template. - CI/CD: Ensure the new template integrates with existing CI/CD pipelines.
To develop and test templates locally, either:
- Create a subdirectory in the stackit-fn/templates folder and copy the language template into the folder
- Install the templates from a repository URL via sfn cli, e.g.:
sfn templates install --source https://github.com/stackitcloud/sfn-templates --install-name templates
To make your contribution, follow these steps:
- Check open or recently closed Pull Requests and Issues to make sure the contribution you are making has not been already tackled by someone else.
- Fork the repo.
- Make your changes in a branch that is up-to-date with the original repo's
mainbranch. - Commit your changes including a descriptive message
- Create a pull request with your changes.
- The pull request will be reviewed by the repo maintainers. If you need to make further changes, make additional commits to keep commit history. When the PR is merged, commits will be squashed.
Tip
To ensure smooth review and integration of your code contributions, follow these guidelines:
Break down large changes into smaller PRs: Separate new features or bigger changes into multiple smaller Pull Requests. This allows us to provide earlier feedback and makes it easier to review your PR.
Create a draft PR for early feedback: If you want feedback during the implementation process, create a draft PR so we can have a look.
If you would like to report a bug, please open a GitHub issue.
To ensure we can provide the best support to your issue, follow these guidelines:
- Go through the existing issues to check if your issue has already been reported.
- Make sure you are using the latest version of the provider, we will not provide bug fixes for older versions. Also, latest versions may have the fix for your bug.
- Please provide as much information as you can about your environment, e.g. your version of Go, your version of the provider, which operating system you are using and the corresponding version.
- Include in your issue the steps to reproduce it, along with code snippets and/or information about your specific use case. This will make the support process much easier and efficient.