# Contributing to Controller

Thanks for your interest in this project.

## Dual-mirror repositories

Controller v3.8 uses a **single shared git tree** published to two GitHub remotes at the **same commit SHA**:

| Remote | Default registry | OCI source |
|--------|------------------|------------|
| [eclipse-iofog/Controller](https://github.com/eclipse-iofog/Controller) | `ghcr.io/eclipse-iofog` | `https://github.com/eclipse-iofog/Controller` |
| [Datasance/Controller](https://github.com/Datasance/Controller) | `ghcr.io/datasance` | `https://github.com/Datasance/Controller` |

Canonical upstream in `package.json` is `eclipse-iofog/Controller`. Product-facing strings (RBAC API group, distribution label, container registry) differ by **build flavor**, not by diverging source code.

### CI and release workflows

Workflows live under `.github/workflows/`. Third-party actions are pinned to commit SHAs (with version comments).

| Workflow | Trigger | Jobs |
|----------|---------|------|
| **CI** (`ci.yaml`) | Pull request; push to `main` or `develop` | **Lint** → **Test** → **Audit** (sequential, via `quality.yml`), then **Docker build** (`push: false`, no registry login) |
| **Release** (`release.yaml`) | Push of a `v*` tag (e.g. `v3.8.0`) | **Lint** → **Test** → **Audit**, then **Docker build and push** to `${IMAGE_REGISTRY}/controller` (`:latest` + semver tag) |

Image publish runs **only** on version tags. Integration branches on both mirrors are `main` and `develop`.

Shared Docker build-args (registry, OCI source, EdgeOps Console repo/flavor, controller distribution) are resolved by the composite action `.github/actions/set-build-env`.

### Repository CI variables

Set these as GitHub **Actions variables** (`Settings → Secrets and variables → Actions → Variables`) per mirror. When unset, CI derives defaults from `github.repository` (same pattern as EdgeOps Console).

| Variable | Eclipse ioFog mirror | Datasance PoT mirror |
|----------|----------------------|----------------------|
| `IMAGE_REGISTRY` | `ghcr.io/eclipse-iofog` | `ghcr.io/datasance` |
| `OCI_SOURCE_REPO` | `https://github.com/eclipse-iofog/Controller` | `https://github.com/Datasance/Controller` |
| `CONTROLLER_DISTRIBUTION` | `iofog` | `datasance` |
| `RBAC_API_VERSION` | `iofog.org/v3` | `datasance.com/v3` |
| `EDGEOPS_CONSOLE_REPO` | `https://github.com/eclipse-iofog/edgeops-console` | `https://github.com/Datasance/edgeops-console` |
| `EDGEOPS_CONSOLE_FLAVOR` | `iofog` | `datasance` |
| `EDGEOPS_CONSOLE_VERSION` | Console release tag (optional; default `1.0.0`) | same |

Docker build passes these as build-args for OCI labels and baked runtime flavor env.

## Project description

Controller acts as your entry-point to interacting with, deploying to, and maintaining any ECN or Edge cluster of Agent Nodes you have.

* https://projects.eclipse.org/projects/iot.iofog

## Developer resources

Information regarding source code management, builds, coding standards, and
more.

* https://projects.eclipse.org/projects/iot.iofog/developer

The project maintains the following source code repositories

* https://github.com/eclipse-iofog
* http://git.eclipse.org/c/iofog/org.eclipse.iofog.git

This project uses Bugzilla to track ongoing development and issues.

* Search for issues: https://eclipse.org/bugs/buglist.cgi?product=IoFog
* Create a new report: https://eclipse.org/bugs/enter_bug.cgi?product=IoFog

Be sure to search for existing bugs before you create another one. Remember that
contributions are always welcome!

## Eclipse Contributor Agreement

Before your contribution can be accepted by the project team contributors must
electronically sign the Eclipse Contributor Agreement (ECA).

* http://www.eclipse.org/legal/ECA.php

Commits that are provided by non-committers must have a Signed-off-by field in
the footer indicating that the author is aware of the terms by which the
contribution has been provided to the project. The non-committer must
additionally have an Eclipse Foundation account and must have a signed Eclipse
Contributor Agreement (ECA) on file.

For more information, please see the Eclipse Committer Handbook:
https://www.eclipse.org/projects/handbook/#resources-commit

## Contact

Contact the project developers via the project's "dev" list.

* https://dev.eclipse.org/mailman/listinfo/iofog-dev