Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
87a95e1
Add Energy and Demo-Setup extension / update CI/CD to create manager …
denniskuijs May 19, 2026
d311435
wip
denniskuijs May 19, 2026
01c8948
wip
denniskuijs May 19, 2026
938e98a
wip
denniskuijs May 19, 2026
fedf576
wip
denniskuijs May 19, 2026
3f0e0fb
wip
denniskuijs May 19, 2026
7382fe1
Update build and push step
denniskuijs May 19, 2026
7a4760c
enable entsoe-e tests
denniskuijs May 19, 2026
9927b73
enable energy tests
denniskuijs May 19, 2026
3cc3642
add dev-testing
denniskuijs May 19, 2026
ae57ca9
add dev-testing
denniskuijs May 19, 2026
e52bc63
add sparse checkout to main
denniskuijs May 19, 2026
3817dde
add sparse checkout to main
denniskuijs May 19, 2026
fe6148b
add sparse checkout to main
denniskuijs May 19, 2026
4ba74e6
add sparse checkout to main
denniskuijs May 19, 2026
54de549
add sparse checkout to main
denniskuijs May 19, 2026
79eea88
wip
denniskuijs May 19, 2026
d50771a
wip
denniskuijs May 19, 2026
258324a
disable paralism
denniskuijs May 19, 2026
9d44e12
ignore forecast tests
denniskuijs May 19, 2026
589f8f9
ignore forecast tests
denniskuijs May 19, 2026
d077aa3
wip
denniskuijs May 19, 2026
f8db27b
wip
denniskuijs May 19, 2026
94314bc
wip
denniskuijs May 19, 2026
4841e68
add support for develop image
denniskuijs May 20, 2026
001e5b7
several fixes
denniskuijs May 20, 2026
e44e673
fix test results
denniskuijs May 20, 2026
06fef51
wip
denniskuijs May 20, 2026
dd16f0f
several fixes
denniskuijs May 20, 2026
e9b718d
fix
denniskuijs May 20, 2026
ea41afe
fix
denniskuijs May 20, 2026
da795c1
fix
denniskuijs May 20, 2026
f88da48
fix
denniskuijs May 20, 2026
3c4ec9d
Exclude EMS extension from image
denniskuijs May 27, 2026
3c9e783
Don't push images to DockerHub
denniskuijs May 27, 2026
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
104 changes: 80 additions & 24 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,22 @@ jobs:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Checkout main repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: openremote/openremote
path: openremote
ref: master
sparse-checkout: profile
sparse-checkout-cone-mode: false

- name: Set up JDK 21 and gradle cache
id: java
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
distribution: "temurin"
java-version: "21"
cache: "gradle"

- name: Check if main repo
id: is_main_repo
Expand All @@ -46,39 +55,86 @@ jobs:
fi

- name: Run build
if: ${{ !steps.is_main_repo.outputs.value || github.event_name == 'pull_request' }}
timeout-minutes: 20
run: |
# Run build
# Make temp dir with 777 mask as docker seems to run as root
mkdir -pm 777 tmp

# Start the dev-testing stack
docker compose -f openremote/profile/dev-testing.yml up -d --no-build

./gradlew build

- name: Login to DockerHub
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
if: ${{ success() && steps.is_main_repo.outputs.value && github.event_name != 'pull_request' }}
with:
username: ${{ secrets._TEMP_DOCKERHUB_USER }}
password: ${{ secrets._TEMP_DOCKERHUB_PASSWORD }}

- name: Install QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
with:
platforms: linux/amd64,linux/arm64

Comment on lines +76 to +80
- name: Install Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0

- name: Build develop image
if: ${{ steps.is_main_repo.outputs.value && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
timeout-minutes: 20
with:
context: deployment/build
platforms: linux/amd64,linux/arm64
load: false
push: false
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Push the tagged Docker images

The job logs in to DockerHub and applies registry tags, but the build-push-action invocation sets push: false while also using load: false; per docker/build-push-action semantics, that means the build result is not exported to the registry. On main pushes this leaves openremote/manager:develop unchanged, and the release image step has the same issue for version/latest tags.

Useful? React with 👍 / 👎.

tags: openremote/manager:develop
Comment on lines +89 to +93
build-args: |
GIT_COMMIT=${{ github.sha }}
env:
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_RECORD_UPLOAD: false

- name: Run build and publish
if: ${{ steps.is_main_repo.outputs.value && github.event_name != 'pull_request' }}
run: |
echo "$KEYSTORE_BASE64" | base64 -d > keystore
./gradlew build publishToSonatype closeAndReleaseSonatypeStagingRepository \
-PsigningKey=$MAVEN_SIGNING_KEY -PsigningPassword=$MAVEN_SIGNING_PASSWORD -PpublishUsername=$MAVEN_USERNAME -PpublishPassword=$MAVEN_PASSWORD \
-PkeystoreKeyAlias=$KEYSTORE_KEY_ALIAS -PkeystoreKeyPassword=$KEYSTORE_KEY_PASSWORD -PkeystoreFile=$PWD/keystore -PkeystorePassword=$KEYSTORE_PASSWORD
- name: Build manager image
if: ${{ steps.is_main_repo.outputs.value && github.event_name == 'release' }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Trigger manager image build on an actual release path

This step is gated on github.event_name == 'release', but this workflow is only configured for push, pull_request, and workflow_dispatch events, so the manager image path never executes. As written, neither the tag-push run nor the gh workflow run ci_cd.yml --ref <tag> dispatch from release.yml can satisfy this condition, so versioned/latest manager images are never published.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Trigger release publishing from tag pushes

This workflow is only registered for push, pull_request, and workflow_dispatch, so github.event_name is never release; release tags configured at the top of this file arrive as push events. Because release.yml was deleted in this commit, the manager image release step here and the Maven Sonatype publish step below are now skipped for every tagged release.

Useful? React with 👍 / 👎.

uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
timeout-minutes: 20
Comment on lines +100 to +103
with:
context: deployment/build
platforms: linux/amd64,linux/arm64
load: false
push: false
tags: |
Comment on lines +105 to +109
openremote/manager:${{ github.ref_name }}
openremote/manager:latest
build-args: |
GIT_COMMIT=${{ github.sha }}
env:
MAVEN_SIGNING_KEY: ${{ secrets._TEMP_MAVEN_SIGNING_KEY || secrets.MAVEN_SIGNING_KEY }}
MAVEN_SIGNING_PASSWORD: ${{ secrets._TEMP_MAVEN_SIGNING_PASSWORD || secrets.MAVEN_SIGNING_PASSWORD }}
MAVEN_USERNAME: ${{ secrets._TEMP_MAVEN_USERNAME || secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets._TEMP_MAVEN_PASSWORD || secrets.MAVEN_PASSWORD }}
KEYSTORE_BASE64: |
${{ secrets.ANDROID_KEYSTORE_BASE64 }}
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
KEYSTORE_KEY_ALIAS: ${{ secrets.ANDROID_KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_KEY_PASSWORD }}
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_RECORD_UPLOAD: false

- name: Publish to Maven Sonatype
if: ${{ steps.is_main_repo.outputs.value && github.event_name == 'release' }}
timeout-minutes: 20
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -PsigningKey=$MAVEN_SIGNING_KEY -PsigningPassword=$MAVEN_SIGNING_PASSWORD -PpublishUsername=$MAVEN_USERNAME -PpublishPassword=$MAVEN_PASSWORD
env:
Comment on lines +118 to +122
MAVEN_SIGNING_KEY: ${{ secrets._TEMP_MAVEN_SIGNING_KEY }}
MAVEN_SIGNING_PASSWORD: ${{ secrets._TEMP_MAVEN_SIGNING_PASSWORD }}
MAVEN_USERNAME: ${{ secrets._TEMP_MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets._TEMP_MAVEN_PASSWORD }}

- name: Archive backend test results
- name: Archive test results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: backend-test-results
path: test/build/reports/tests
name: test-results
path: '**/build/reports/tests'

- name: Archive coverage report
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-report
path: test/build/reports/jacoco/test/html
path: '**/build/reports/jacoco/test/html'
65 changes: 0 additions & 65 deletions .github/workflows/release.yml

This file was deleted.

20 changes: 20 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,26 @@ allprojects {
version = scmVersion.version
}

subprojects {
pluginManager.withPlugin('java') {
apply plugin: 'jacoco'
jacoco { toolVersion = "0.8.14" }
test {
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
}
}

tasks.withType(JacocoReport) {
reports {
xml.required = true
html.required = true
}
}
}

apply plugin: 'io.github.gradle-nexus.publish-plugin'
nexusPublishing {
repositories {
Expand Down
90 changes: 90 additions & 0 deletions demo-setup/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
apply plugin: "java-library"
apply plugin: "maven-publish"
apply plugin: "signing"

base {
archivesName = "openremote-${project.name}-extension"
}

dependencies {
api "io.openremote:openremote-manager:$openremoteVersion"
implementation project(":energy")
}

jar {
from sourceSets.main.allJava
}

javadoc {
failOnError = false
}

java {
withJavadocJar()
withSourcesJar()
}

publishing {
publications {
maven(MavenPublication) {
group = "io.openremote.extension"
artifactId = "openremote-${project.name}-extension"
from components.java
pom {
name = 'OpenRemote Demo setup'
description = 'Adds the OpenRemote Demo setup'
url = 'https://github.com/openremote/extensions'
licenses {
Comment on lines +33 to +37
license {
name = 'GNU Affero General Public License v3.0'
url = 'https://www.gnu.org/licenses/agpl-3.0.en.html'
}
}
developers {
developer {
id = 'developers'
name = 'Developers'
email = 'developers@openremote.io'
organization = 'OpenRemote'
organizationUrl = 'https://openremote.io'
}
}
scm {
connection = 'scm:git:git://github.com/openremote/extensions.git'
developerConnection = 'scm:git:ssh://github.com:openremote/extensions.git'
url = 'https://github.com/openremote/extensions/tree/master'
}
}
}
}

repositories {
maven {
if (!version.endsWith('-LOCAL')) {
credentials {
username = findProperty("publishUsername")
password = findProperty("publishPassword")
}
}
url = version.endsWith('-LOCAL') ? layout.buildDirectory.dir('repo') : version.endsWith('-SNAPSHOT') ? findProperty("snapshotsRepoUrl") : findProperty("releasesRepoUrl")
}
}
}

signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
if (signingKey && signingPassword) {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.maven
}
}

tasks.register("copyExtension", Copy) {
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
@@ -0,0 +1,52 @@
/*
* Copyright 2017, OpenRemote Inc.
*
* See the CONTRIBUTORS.txt file in the distribution for a
* full listing of individual contributors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.openremote.extension.demosetup;

import org.openremote.model.Container;
import org.openremote.model.setup.Setup;
import org.openremote.model.setup.SetupTasks;

import java.util.Arrays;
import java.util.List;

/**
* Demo setup tasks.
*/
public class DemoSetupTasks implements SetupTasks {

public static final String DEMO_SETUP_TYPE = "demo";

@Override
public List<Setup> createTasks(Container container, String setupType, boolean keycloakEnabled) {

if (DEMO_SETUP_TYPE.equals(setupType)) {
return Arrays.asList(
new KeycloakDemoSetup(container),
new ManagerDemoSetup(container),
new RulesDemoSetup(container),
new ManagerDemoAgentSetup(container),
new ManagerDemoDashboardSetup(container)
);
}

// Do nothing otherwise
return null;
}
}
Loading