Project: Kestra (Orchestration & Management / Scheduling & Orchestration)
File: CONTRIBUTING.md

This project and everyone participating in it is governed by the . By participating, you are expected to uphold this code. Please report unacceptable behavior to <hello@kestra.io>. ### Legal Notice When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license. Bug reports help us make Kestra better for everyone. We provide a preconfigured template for bugs to make it very clear what information we need. Please search within our before raising a new one to make sure you're not raising a duplicate. Please do not create a public GitHub issue. If you've found a security issue, please email us directly at hello@kestra.io instead of raising an issue. To request new features, please create an issue on this project. If you would like to suggest a new feature, we ask that you please use our issue template. It contains a few essential questions that help us understand the problem you are looking to solve and how you think your recommendation will address it. To see what has already been proposed by the community, you can look . Watch out for duplicates! If you are creating a new issue, please check existing open, or recently closed. Having a single voted for issue is far easier for us to prioritize. The following dependencies are required to build Kestra locally: Java 17+, Kestra runs on Java 11 but we hit a Java compiler bug fixed in Java 17 Node 14+ and npm Python 3, pip and python venv Docker & Docker Compose an IDE (Intellij IDEA, Eclipse or VS Code) To start contributing: the repository Clone the fork on your workstation: ```shell git clone git@github.com:{YOUR_USERNAME}/kestra.git cd kestra ``` The backend is made with . Open the cloned repository in your favorite IDE. In most of decent IDEs, Gradle build will be detected and all dependencies will be downloaded. You can also build it from a terminal using `./gradlew build`, the Gradle wrapper will download the right Gradle version to use. You may need to enable java annotation processors since we are using it a lot. The main class is `io.kestra.cli.App` from module

Pass as program arguments the server you want to develop, for example `server local` will start the Intellij Idea configuration can be found in screenshot below. `MICRONAUT_ENVIRONMENTS`: can be set any string and will load a custom configuration file in `cli/src/main/resources/application-{env}.yml` `KESTRAPLUGINSPATH`: is the path where you will save plugins as Jar and will be load on the startup. You can also use the gradle task `./gradlew runLocal` that will run a standalone server with `MICRONAUT_ENVIRONMENTS=override` and plugins path `local/plugins` The server start by default on port 8080 and is reachable on `http://localhost:8080` If you want to launch all tests, you need Python and some packages installed on your machine, on Ubuntu you can install them with: ```shell sudo apt install python3 pip python3-venv python3 -m pip install virtualenv ``` The frontend is made with and located on the `/ui` folder. `npm install --force` (force is need because of some conflicting package) create a files `ui/.env.development.local` with content `VITEAPPAPI_URL=http://localhost:8080` (or your actual server url) `npm run dev` will start the development server with hot reload. The server start by default on port 8090 and is reachable on `http://localhost:5173` You can run `npm run build` in order to build the front-end that will be delivered from the backend (without running the `npm run dev`) above. Now, you need to start a backend server, you could: start a without database using this docker-compose file already configured with CORS enabled: ```yaml services: kestra: image: kestra/kestra:latest-full user: "root" command: server local environment: KESTRA_CONFIGURATION: | micronaut: server: cors: enabled: true configurations: all: allowedOrigins: http://localhost:5173 ports: "8080:8080" ``` start the from your IDE and you need to configure CORS restrictions when using the local development npm server, changing the backend configuration allowing the http://localhost:5173 origin in `cli/src/main/resources/application-override.yml` ```yaml micronaut: server: cors: enabled: true configurations: all: allowedOrigins: http://localhost:5173 ``` For testing purposes, you can use the `Makefile` provided at the project's root to build and deploy Kestra locally. By default, Kestra will be installed under: `$HOME/.kestra/current`. Set the `KESTRA_HOME` environment variable to override default. ```bash make install make install-plugins make start-standalone-postgres ``` Note: the local installation writes logs into the ` ~/.kestra/current/logs/` directory. A complete documentation for developing plugin can be found . The main documentation is located in a separate . For tasks documentation, they are located directly on Java source using (Example: )