Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ on:
workflow_dispatch:
inputs:
version:
required: true
required: false
description: Extensions version
type: string
is_release:
required: true
required: false
description: Create Extensions Release
type: boolean

Expand Down Expand Up @@ -69,7 +69,12 @@ jobs:
env:
VERSION: ${{ inputs.version }}

- name: Run build
- name: Run installDist
timeout-minutes: 20
run: ./gradlew installDist

- name: Run integration tests
if: ${{ inputs.is_release != true }}
timeout-minutes: 20
run: |
# Run build
Expand All @@ -79,7 +84,7 @@ jobs:
# Start the dev-testing stack
docker compose -f openremote/profile/dev-testing.yml up -d --no-build

./gradlew build
./gradlew test

- name: Login to DockerHub
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
Expand Down Expand Up @@ -110,6 +115,7 @@ jobs:
tags: openremote/manager:develop
build-args: |
GIT_COMMIT=${{ github.sha }}
QUALIFIER=develop
env:
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_RECORD_UPLOAD: false
Expand All @@ -128,6 +134,7 @@ jobs:
openremote/manager:latest
build-args: |
GIT_COMMIT=${{ github.sha }}
QUALIFIER=latest
env:
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_RECORD_UPLOAD: false
Expand Down
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,19 @@ Subprojects are included automatically when they contain a `build.gradle` file,

## Available extensions

| Extension | Description |
| --------- | ----------------------------------------------------------------------------------------- |
| `ems` | A new extension-based implementation of the Energy Management System with GOPACS support. |
| `entsoe` | Agent for retrieving ENTSO-E energy price data and storing it as predicted datapoints. |
| Extension | Description |
|--------------|-------------------------------------------------------------------------------------------|
| `demo-setup` | Adds the OpenRemote Demo setup. |
| `ems` | A new extension-based implementation of the Energy Management System with GOPACS support. |
| `energy` | Adds the energy domain extension with several energy related assets. |
| `entsoe` | Agent for retrieving ENTSO-E energy price data and storing it as predicted datapoints. |

## Building

From the repository root:

```bash
./gradlew build
./gradlew installDist
```

To build a single extension:
Expand All @@ -46,6 +48,20 @@ To build a single extension:

Replace `entsoe` with the name of the extension subproject you want to build.

## Testing

From the repository root:

```bash
./gradlew test
```

To test a single extension:

```bash
./gradlew :entsoe:test
```

## Versioning and publishing

The repository uses Gradle-based release/version management.
Expand Down Expand Up @@ -75,7 +91,7 @@ When adding or updating an extension:
* Use the package namespace `org.openremote.extension.<extension-name>`.
* Register extension components using the appropriate OpenRemote SPI files under `META-INF/services`.
* Keep extension-specific resources under an extension-specific resource path.
* Add tests for extension behaviour, preferably following the existing OpenRemote testing conventions.
* Add tests for extension behavior, preferably following the existing OpenRemote testing conventions.

Typical extension integration points include:

Expand Down
10 changes: 0 additions & 10 deletions demo-setup/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,4 @@ signing {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.maven
}
}

tasks.register("copyExtension", Copy) {
dependsOn jar
from(jar.archiveFile)
into project(":deployment").layout.buildDirectory.dir("extensions")
}

tasks.named('build') {
dependsOn('copyExtension')
}
5 changes: 4 additions & 1 deletion deployment/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM openremote/manager:latest-core
# Decide which base image should be used
ARG QUALIFIER=latest

FROM openremote/manager:${QUALIFIER}-core

RUN mkdir -p /deployment/manager/extensions
COPY extensions /deployment/manager/extensions
22 changes: 19 additions & 3 deletions deployment/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
apply plugin: "base"

tasks.register("prepareDockerContext", Copy) {
tasks.register("copyDockerFile", Copy) {
from(layout.projectDirectory.file("Dockerfile"))
into(layout.buildDirectory)
}

tasks.named("build") {
dependsOn("prepareDockerContext")

tasks.register("distributeExtensions", Copy) {
def extensionProjects = [
project(":demo-setup"),
project(":energy"),
project(":entsoe")
]

extensionProjects.each { extProj ->
def jarTask = extProj.tasks.named("jar")
from(jarTask.flatMap { it.archiveFile })
}

into layout.buildDirectory.dir("extensions")
}

tasks.register("installDist") {
dependsOn("copyDockerFile", "distributeExtensions")
}
10 changes: 0 additions & 10 deletions energy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,4 @@ signing {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.maven
}
}

tasks.register("copyExtension", Copy) {
dependsOn jar
from(jar.archiveFile)
into project(":deployment").layout.buildDirectory.dir("extensions")
}

tasks.named('build') {
dependsOn('copyExtension')
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.openremote.extension.energy
import org.openremote.extension.energy.manager.EnergyOptimiser
import org.openremote.model.util.UniqueIdentifierGenerator
import org.openremote.model.util.Pair
import spock.lang.Ignore
import spock.lang.Specification

import java.time.LocalDateTime
Expand Down Expand Up @@ -32,6 +33,7 @@ import static spock.util.matcher.HamcrestMatchers.closeTo
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

@Ignore
class EnergyOptimisationTest extends Specification {

def gridId = UniqueIdentifierGenerator.generateId("grid")
Expand Down
11 changes: 0 additions & 11 deletions entsoe/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,4 @@ signing {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.maven
}
}


tasks.register("copyExtension", Copy) {
dependsOn jar
from(jar.archiveFile)
into project(":deployment").layout.buildDirectory.dir("extensions")
}

tasks.named('build') {
dependsOn('copyExtension')
}