Skip to content

[CI/CD] Add CI/CD workflow for extensions#50

Open
denniskuijs wants to merge 7 commits into
mainfrom
feature/ci-cd-extensions
Open

[CI/CD] Add CI/CD workflow for extensions#50
denniskuijs wants to merge 7 commits into
mainfrom
feature/ci-cd-extensions

Conversation

@denniskuijs

@denniskuijs denniskuijs commented Jul 9, 2026

Copy link
Copy Markdown
Member

This PR includes the following changes:

  • Create develop image on push to main and publish it to DockerHub with tag openremote/manager:develop including ALL extensions (except EMS).
  • Create manager image when a new release is created an publish it to DockerHub with tag' openremote/manager:latest and openremote/manager:$version including ALL extensions (except EMS).
  • Re-enabled ENTSOE-E Agent and Energy tests.
  • Several CI/CD workflow improvements.
  • Add a Gradle task to copy the extension JARs into the deployment folder so they can be included when building a new image.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the extensions build and CI/CD pipeline to (a) run tests/coverage reporting in CI and (b) produce a Docker build context that includes built extension JARs, intended to enable publishing an “all extensions” manager image.

Changes:

  • Add a deployment project (Dockerfile + build context) and per-extension Gradle tasks to copy extension JARs into deployment/build/extensions.
  • Update CI workflow to spin up the dev-testing docker-compose stack, run ./gradlew build, and build multi-arch Docker images.
  • Enable JaCoCo reporting across Java subprojects and adjust ENTSO-E test ignores.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
gradle.properties Disables parallel Gradle and adds camelVersion property.
build.gradle Enables JaCoCo + report generation for Java subprojects.
entsoe/src/test/.../EntsoeProtocolTest.groovy Removes CI-wide ignore and ignores a specific test.
entsoe/build.gradle Adds copyExtension task to stage the built JAR into deployment/build/extensions.
ems/build.gradle Adds copyExtension task to stage the built JAR into deployment/build/extensions.
deployment/Dockerfile Defines an image that layers staged extensions onto openremote/manager:latest-core.
deployment/build.gradle Copies Dockerfile into the Docker build context (but currently at configuration time).
.github/workflows/release.yml Removes the old release workflow.
.github/workflows/ci_cd.yml Overhauls CI to run docker-compose-based integration tests and build/publish Docker/Maven artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci_cd.yml
Comment thread .github/workflows/ci_cd.yml
Comment thread .github/workflows/ci_cd.yml
Comment thread .github/workflows/ci_cd.yml Outdated
Comment thread .github/workflows/ci_cd.yml Outdated
Comment thread entsoe/build.gradle
Comment thread ems/build.gradle Outdated
Comment thread gradle.properties Outdated
Comment thread .github/workflows/ci_cd.yml
Comment thread .github/workflows/ci_cd.yml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 9 changed files in this pull request and generated 4 comments.

Comment thread deployment/build.gradle Outdated
Comment thread entsoe/build.gradle
Comment thread deployment/Dockerfile Outdated
Comment thread gradle.properties Outdated
@denniskuijs denniskuijs requested a review from Copilot July 9, 2026 13:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@wborn wborn requested a review from Copilot July 10, 2026 13:50
@wborn

wborn commented Jul 10, 2026

Copy link
Copy Markdown
Member

@codex review

Comment thread gradle.properties
@@ -1,5 +1,5 @@
org.gradle.jvmargs=-Xmx3g
org.gradle.parallel=true
org.gradle.parallel=false

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you create an issue for adding back support for this?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 9 changed files in this pull request and generated 5 comments.

Comment thread deployment/Dockerfile Outdated
FROM openremote/manager:latest-core

RUN mkdir -p /deployment/manager/extensions
COPY extensions /deployment/manager/extensions No newline at end of file
Comment thread deployment/build.gradle
Comment on lines +3 to +6
tasks.register("prepareDockerContext", Copy) {
from(layout.projectDirectory.file("Dockerfile"))
into(layout.buildDirectory)
}
Comment on lines +135 to +138
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 }}
Comment on lines +83 to +84
username: ${{ secrets._TEMP_DOCKERHUB_USER }}
password: ${{ secrets._TEMP_DOCKERHUB_PASSWORD }}
closeClient()
}

@Ignore

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5a504a2972

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread entsoe/build.gradle
Comment on lines +90 to +93
tasks.register("copyExtension", Copy) {
dependsOn jar
from(jar.archiveFile)
into project(":deployment").layout.buildDirectory.dir("extensions")

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 Copy the EMS jar into the Docker context

This new Docker context is populated only by :entsoe:copyExtension; deployment/Dockerfile copies deployment/build/extensions, and a repo-wide check for copyExtension shows no equivalent task in ems/build.gradle. The develop/release manager images built by this workflow will therefore ship with openremote-entsoe-extension.jar but omit openremote-ems-extension.jar, so EMS services/models are not on the image classpath even though EMS is one of the official extensions.

Useful? React with 👍 / 👎.

run: |
# Run build
# Make temp dir with 777 mask as docker seems to run as root
mkdir -pm 777 tmp

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Create tmp under the OpenRemote checkout

This prepares tmp in the extensions checkout, but the compose file used two lines later is openremote/profile/dev-testing.yml, whose ../tmp:/storage bind resolves relative to the first -f compose file's directory (Docker documents paths as relative to the first compose file), i.e. openremote/tmp. In CI this chmods an unused directory while Compose creates/mounts openremote/tmp with default permissions, so tests that rely on the dev-testing shared storage can still hit the root-owned-directory problem this step is trying to avoid.

Useful? React with 👍 / 👎.


# Release
release:
types: [ published ]

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 Exclude prereleases before pushing latest

Using the published release activity also runs for GitHub prereleases, but the release-only steps below push openremote/manager:latest and publish to Sonatype without checking github.event.release.prerelease. If someone publishes an RC/beta as a prerelease, this workflow will overwrite the production latest Docker tag and attempt a Maven release for that prerelease; add a prerelease guard or use a release activity that excludes prereleases.

Useful? React with 👍 / 👎.

Comment thread deployment/Dockerfile
@@ -0,0 +1,4 @@
FROM openremote/manager:latest-core

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Pin the release image to the matching core

The release workflow tags the resulting image as the release version, but this Dockerfile always starts from the floating openremote/manager:latest-core. When an older release is rebuilt or when the core latest-core tag has advanced before the extension release runs, the image tagged with github.event.release.tag_name will contain a different manager core than the Gradle artifacts were built against, making the release image non-reproducible and potentially incompatible.

Useful? React with 👍 / 👎.

-PkeystoreKeyAlias=$KEYSTORE_KEY_ALIAS -PkeystoreKeyPassword=$KEYSTORE_KEY_PASSWORD -PkeystoreFile=$PWD/keystore -PkeystorePassword=$KEYSTORE_PASSWORD
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
with:
platforms: linux/amd64,linux/arm64

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 Use QEMU architecture names

The docker/setup-qemu-action input is passed directly to tonistiigi/binfmt --install, and the action documents this field as architecture names such as arm64,riscv64,arm, not buildx platform strings. With linux/amd64,linux/arm64 here, the QEMU setup step can fail before both develop and release image builds; use arm64 or omit the input to install all emulators.

Useful? React with 👍 / 👎.


# Release
release:
types: [ published ]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid cancelling release runs with tag builds

Adding the release trigger while keeping the existing tag push trigger puts both runs in the same concurrency group because GitHub sets release GITHUB_REF to the tag ref. When a release is published while creating the tag, the tag-push build and the release-publish run can cancel each other under cancel-in-progress: true; if the push run wins, it only builds/tests and skips the Docker/Maven release steps.

Useful? React with 👍 / 👎.

Comment on lines +135 to +138
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 }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the Maven secret fallback

The previous publish path accepted either _TEMP_MAVEN_* or the stable MAVEN_* secrets, but this release path only maps the temporary names. In repositories/environments that still use the existing stable secret names, these env vars resolve to empty strings and the Sonatype publish/signing step fails even though the credentials are still configured under the supported names.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants