Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2b80d5e
GPU-2597 update nx to version 23.0.1
dominikschatz Jul 8, 2026
b15d7ed
GPU-2597 update Angular to 22, typescript to 6.0.3 and other packages…
dominikschatz Jul 8, 2026
1e904c8
GPU-2597 angular 22 update
dominikschatz Jul 20, 2026
c629310
Fixed dynamic component spying & cleanup
deckdom Jul 21, 2026
aa39cca
GPU-2597 fix build errors
dominikschatz Jul 23, 2026
b72d166
GPU-2597 remove debugging
dominikschatz Jul 23, 2026
1c5f7d0
GPU-2597: Fixed unit-tests
deckdom Jul 28, 2026
160ab33
Merge branch 'dev' into f-gpu-2597
deckdom Jul 28, 2026
3622fc7
gpu-2597 fix e2e tests and refactor chip value logic
dominikschatz Jul 28, 2026
fceb4f6
Replaced jest with vitest; Fixed unit-tests and cleanup
deckdom Jul 28, 2026
749e232
GPU-2597: Updated jenkins container and config
deckdom Jul 28, 2026
fa479e9
Merge branch 'f-gpu-2597' of github.com:gentics/cms-oss into f-gpu-2597
deckdom Jul 28, 2026
b857d29
GPU-2597: Updated jenkins building for new node version
deckdom Aug 4, 2026
77b7b83
GPU-2957: Jenkins and Dockerfile cleanup
deckdom Aug 4, 2026
f832471
GPU-2597: Added nvm sourcing
deckdom Aug 4, 2026
36fd87d
GPU-2597: Sourcing nvm directly without ENV variables
deckdom Aug 4, 2026
9382594
GPU-2597: Source within bash
deckdom Aug 4, 2026
f7bfd02
GPU-2597: Using local user install for nvm
deckdom Aug 4, 2026
ceaef83
GPU-2597: Removed nvm and use static installed node
deckdom Aug 4, 2026
efbef89
GPU-2597: Output formatting and version fix
deckdom Aug 4, 2026
07663e5
Updated cypress-preset to typescript
deckdom Aug 5, 2026
05c86c9
GPU-2597: Added guard for version setting
deckdom Aug 5, 2026
84e02e3
Added back missing mvnArgument variable
deckdom Aug 5, 2026
b65f2ab
GPU-2597: Moved dependency-report files out of target folder
deckdom Aug 5, 2026
801973d
GPU-2597: Cleanup
deckdom Aug 6, 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
133 changes: 92 additions & 41 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
topologyKey: kubernetes.io/hostname
containers:
- name: build
image: docker.gentics.com/cms-oss/build-container:6.4
image: docker.gentics.com/cms-oss/build-container:6.6
resources:
requests:
cpu: '0'
Expand Down Expand Up @@ -103,8 +103,6 @@ spec:

options {
withCredentials([usernamePassword(credentialsId: 'docker.gentics.com', usernameVariable: 'repoUsername', passwordVariable: 'repoPassword')])
gitLabConnection('git.gentics.com')
gitlabBuilds(builds: ['Jenkins build'])
timestamps()
timeout(time: 4, unit: 'HOURS')
ansiColor('xterm')
Expand All @@ -130,19 +128,88 @@ spec:
}
}

stage("Build, Deploy") {
// Build the UI in preparation to be used in the CMS
stage("Build UI") {
when {
expression {
return env.BUILD_SKIPPED != "true"
}
}

environment {
// Disable colors/special characters, if projects do properly check it
TERM="dumb"
// Disable node based color libraries
FORCE_COLOR="0"
}

steps {
updateGitlabCommitStatus name: 'Jenkins build', state: "running"
script {
dir(path: 'cms-ui') {
// Get the correct version
version = params.forceVersion

if (
// If the version isn't semver, we can't set it, as NX just explodes
!(version ==~ /[\d]+\.[\d]+\.[\d]+(?:\.[a-zA-Z0-9-]+)?/)
// Or for release-builds, we can't override it
|| (!version && params.runReleaseBuild)
) {
version = MavenHelper.getVersion()
}

// Install the dependencies
sh "npm ci --no-audit --no-fund"

if (version && (version ==~ /[\d]+\.[\d]+\.[\d]+(?:\.[a-zA-Z0-9-]+)?/)) {
// Setup the packages to use the correct version for publishing
sh "npm run nx -- release version $version"
}

// Build everything
sh "npm run many -- --target=build --configuration=ci --output-style=static"

// Run the tests
if (params.runTests) {
sh "npm run many -- --targets=test,component-test --configuration=ci --output-style=static"
}

// Create the report-files
sh "mkdir target"
sh "npm run report:list"
sh "npm run report:outdated"
}
}
}

post {
always {
script {
// Ignore missing test results if we only run one test
boolean allowEmptyResults = (params.singleTest ? true : false)

if (params.runTests) {
junit testResults: "cms-ui/.reports/**/VITEST-report.xml", allowEmptyResults: allowEmptyResults
junit testResults: "cms-ui/.reports/**/KARMA-report.xml", allowEmptyResults: allowEmptyResults
junit testResults: "cms-ui/.reports/**/CYPRESS-component-report.xml", allowEmptyResults: allowEmptyResults
}
}
}
}
}

stage("Build, Deploy") {
when {
expression {
return env.BUILD_SKIPPED != "true"
}
}

steps {
script {
def mvnGoal = "package"
def mvnProjects = ""
def mvnArguments = "-Dnodejs.npm.bin=/opt/node/bin/npm "
def mvnArguments = " "

version = params.forceVersion
branchName = GitHelper.fetchCurrentBranchName()
Expand Down Expand Up @@ -192,35 +259,16 @@ spec:
if (params.singleTest) {
mvnGoal = "test"
mvnProjects = " -am -pl 'cms-core,cms-oss-server'"
mvnArguments += " -Dui.skip.build -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false -Dtest=" + params.singleTest
}

// Check if triggered by a Gitlab merge request
if (env.gitlabTargetBranch) {
runJUnitTests = GitHelper.checkForChangesInPaths("origin/" + env.gitlabTargetBranch,(String[])[
"base-api/",
"base-lib/",
"cms-api/",
"cms-cache/",
"cms-cache/",
"cms-core/",
"cms-oss-server/",
"cms-restapi/"
])

if (!runJUnitTests) {
mvnArguments += " -Dskip.unit.tests"
}
mvnArguments += " -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false -Dtest=" + params.singleTest
}
} else {
mvnArguments += " -DskipTests=true -Dskip.unit.tests=true -Dui.skip.test=true"
mvnArguments += " -DskipTests=true -Dskip.unit.tests=true"
runJUnitTests = false
}

// when deploying for the test systems, we do not build the changelog or doc
if (params.deployTesting) {
mvnProjects = " -am -pl '!cms-oss-changelog,!cms-oss-doc'"
mvnArguments += " -Dui.skip.publish"
}

// Update chrome to the latest version
Expand Down Expand Up @@ -261,7 +309,7 @@ spec:
// Install
mvnGoal = "install"
mvnProjects = " -am -pl 'cms-oss-bom,cms-core,cms-oss-server,cms-ui'"
mvnArguments = " -DskipTests=true -Dskip.unit.tests -Dui.skip.test=true -Dnodejs.npm.bin=/opt/node/bin/npm -Dui.skip.publish"
mvnArguments = " -DskipTests=true -Dskip.unit.tests "
}
}

Expand All @@ -271,11 +319,6 @@ spec:
sh "find . -maxdepth 3 -type f -name 'pom.xml' -print0 | xargs -0 sed -i -r 's/<\\?m2e[[:blank:]]+[[:alnum:]]+[[:blank:]]*\\?>//g'"
}

// Add private repository credentials and scopes
withCredentials([string(credentialsId: 'nexus-npm', variable: 'NPM_TOKEN')]) {
sh "echo //repo.gentics.com/repository/npm-products/:_auth=${env.NPM_TOKEN} >> ~/.npmrc"
}

// Set custom mesh version (if configured)
if (params.meshVersion?.trim() != "") {
echo "Setting Mesh version to " + params.meshVersion.trim()
Expand All @@ -292,7 +335,7 @@ spec:
authDockerRegistry("docker.gentics.com", "docker.gentics.com")
authDockerRegistry("docker.gentics.com", "push.docker.gentics.com")
withEnv(["TESTMANAGER_HOSTNAME=" + testDbManagerHost, "TESTMANAGER_PORT=" + testDbManagerPort, "TESTCONTAINERS_RYUK_DISABLED=true"]) {
sh "mvn -B -Dstyle.color=always -U -Dskip.integration.tests -Dui.skip.integrationTest=true " +
sh "mvn -B -Dstyle.color=always -U -Dskip.integration.tests " +
" -fae -Dmaven.test.failure.ignore=true " + mvnArguments + mvnProjects + " clean " + mvnGoal
}

Expand Down Expand Up @@ -328,10 +371,6 @@ spec:
junit testResults: "cms-core/target/surefire-reports/TEST-*.xml", allowEmptyResults: allowEmptyResults
junit testResults: "cms-oss-server/target/surefire-reports/TEST-*.xml", allowEmptyResults: allowEmptyResults
}

junit testResults: "cms-ui/.reports/**/JEST-report.xml", allowEmptyResults: allowEmptyResults
junit testResults: "cms-ui/.reports/**/KARMA-report.xml", allowEmptyResults: allowEmptyResults
junit testResults: "cms-ui/.reports/**/CYPRESS-component-report.xml", allowEmptyResults: allowEmptyResults
}
}
}
Expand All @@ -343,7 +382,7 @@ spec:
expression {
// Build the docker image only if the parameter runDockerBuild is enabled and
return env.BUILD_SKIPPED != "true" && params.runDockerBuild &&
(!env.gitlabTargetBranch || qaDeployBranchList.contains(branchName))
(qaDeployBranchList.contains(branchName))
}
}

Expand Down Expand Up @@ -377,7 +416,7 @@ spec:
expression {
// Build the docker image only if the parameter runDockerBuild is enabled and
return env.BUILD_SKIPPED != "true" && params.runDockerBuild &&
(!env.gitlabTargetBranch || qaDeployBranchList.contains(branchName))
(qaDeployBranchList.contains(branchName))
}
}

Expand Down Expand Up @@ -484,10 +523,22 @@ spec:
}
}

environment {
// Disable colors/special characters, if projects do properly check it
TERM="dumb"
// Disable node based color libraries
FORCE_COLOR="0"
}

steps {
script {
dir(path: 'cms-ui') {
// Publish the pacakges to npm repository
// Add private repository credentials and scopes
withCredentials([string(credentialsId: 'nexus-npm', variable: 'NPM_TOKEN')]) {
sh "echo //repo.gentics.com/repository/npm-products/:_auth=${env.NPM_TOKEN} >> ~/.npmrc"
}

// Publish the packages to npm repository
sh "npm run nx -- release publish --output-style=static"
}
}
Expand Down
81 changes: 28 additions & 53 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ LABEL maintainer="Peter Nyari <p.nyari@gentics.com>"
ARG GIT_USER_NAME="Maven Release Manager"
ARG GIT_USER_EMAIL="entwicklung@gentics.com"
ARG USER_NAME="jenkins"
ARG NODE_VERSION=22.15.0
ARG NODE_VERSION=26.4.0

# Version makes it possible to force rebuild the image and bypass caching by changing this variable (eg.: when ca-certificates needs update)
ARG VERSION="20251201.0"
ARG VERSION="20260728.0"
ARG DEBIAN_RELEASE="trixie"

# Setup debian channels
Expand Down Expand Up @@ -40,28 +40,15 @@ Suites: $(. /etc/os-release && echo "$DEBIAN_RELEASE")
Components: stable
Signed-By: /etc/apt/keyrings/docker.asc
EOF
RUN apt update
RUN apt install --assume-yes docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# Google chrome
RUN wget -q -O /etc/apt/keyrings/linux_signing_key.pub https://dl-ssl.google.com/linux/linux_signing_key.pub
RUN tee /etc/apt/sources.list.d/google-chrome.sources > /dev/null <<EOF
Types: deb
URIs: http://dl.google.com/linux/chrome/deb/
Suites: stable
Components: main
Architectures: amd64
Signed-By: /etc/apt/keyrings/linux_signing_key.pub
EOF
RUN apt update
RUN apt install --assume-yes google-chrome-stable
RUN apt-get update
RUN apt-get install --assume-yes docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# Cypress Dependencies
# From https://docs.cypress.io/guides/getting-started/installing-cypress#UbuntuDebian
# And https://github.com/cypress-io/cypress-docker-images/blob/master/factory/factory.Dockerfile
RUN apt-get install --assume-yes \
libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb libgbm1 libcups2 libatk-bridge2.0-0 libatk1.0-0
RUN apt-get install --assume-yes --allow-unauthenticated google-chrome-beta
RUN apt-get install --assume-yes --allow-unauthenticated chromium chromium-l10n

# "fake" dbus address to prevent errors
# https://github.com/SeleniumHQ/docker-selenium/issues/87
Expand All @@ -74,12 +61,6 @@ ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8

# Python 2 - Do we still need this?
RUN apt install --assume-yes python2.7
RUN sudo update-alternatives --install /usr/local/bin/python python /usr/bin/python2.7 20 \
&& sudo chmod +x /usr/local/bin/python
ENV PYTHON /usr/local/bin/python

# Install docker-compose v2 and compatibility for v1
# RUN mkdir -p /usr/local/lib/docker/cli-plugins/ \
# && sudo curl -L "https://github.com/docker/compose/releases/download/v2.6.1/docker-compose-$(uname -s)-$(uname -m)" \
Expand All @@ -91,19 +72,31 @@ ENV PYTHON /usr/local/bin/python
# && update-alternatives --install /usr/local/bin/docker-compose docker-compose /usr/local/bin/compose-switch 99 \
# && sudo chmod +x /usr/local/bin/docker-compose

# Install Ruby 2.3 with RVM
ENV PATH="/usr/local/rvm/bin:$PATH"
ENV RVM_PATH="/usr/local/rvm"
RUN curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - \
&& curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import - \
&& curl -sSL https://get.rvm.io | bash \
&& rvm pkg install openssl \
&& rvm install --autolibs=disable 2.3 -C --with-openssl-dir=$RVM_PATH/usr

# Install Guides
ADD ./build/guides-wrapper.sh /usr/local/bin/guides
RUN rvm-exec 2.3 gem install guides -- --with-cflags="-O2 -pipe -march=native -w -Wno-error=implicit-function-declaration" \
&& chmod +x /usr/local/bin/guides

# Update public keys for node installs.
RUN set -ex \
&& for key in \
4ED778F539E3634C779C87C6D7062848A1AB005C \
141F07595B7B3FFE74309A937405533BE57C7D57 \
74F12602B6F1C4E913FAA37AD3A89613643B6201 \
5BE8A3F6C8A5C01D106C0AD820B1A390B168D356 \
DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 \
CC68F5A3106FF448322E48ED27F5E38D5B0A215F \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 \
C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \
108F52B48DB57BB0CC439B2997B01419BD92F80A \
655F3B5C1FB3FA8D1A0CA6BDE4A7D232B936D2FD \
A363A499291CBBC940DD62E41F10027AF002F8B0 \
; do \
gpg2 --batch --keyserver keys.openpgp.org --recv-keys "$key"; \
Expand All @@ -127,20 +120,6 @@ RUN tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /opt/node --strip-compone
&& chmod +x /etc/profile.d/* \
&& chown -R 10000:10000 /opt/node

# Install Ruby 2.3 with RVM
ENV PATH "/usr/local/rvm/bin:$PATH"
ENV rvm_path "/usr/local/rvm"
RUN curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - \
&& curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import - \
&& curl -sSL https://get.rvm.io | bash \
&& rvm pkg install openssl \
&& rvm install --autolibs=disable 2.3 -C --with-openssl-dir=$rvm_path/usr

# Install Guides
ADD ./build/guides-wrapper.sh /usr/local/bin/guides
RUN rvm-exec 2.3 gem install guides -- --with-cflags="-O2 -pipe -march=native -w -Wno-error=implicit-function-declaration" \
&& chmod +x /usr/local/bin/guides

# Add user
# The ID / GID 10000 is used by the jenkinsci/slave Dockerfile and has to match here, because Jenkins
# does the SCM checkout in the jnlp container for some reasons.
Expand All @@ -156,30 +135,26 @@ RUN echo "StrictHostKeyChecking no" > /etc/ssh/ssh_config \
&& mv /usr/share/maven/conf/settings.xml /usr/share/maven/conf/settings-original.xml
ADD build/settings.xml /usr/share/maven/conf/settings.xml

# Allow updating Google Chrome
RUN echo "jenkins ALL=NOPASSWD: /usr/bin/apt-get update" > /etc/sudoers.d/jenkins \
&& echo "jenkins ALL=NOPASSWD: /usr/bin/apt-get install --assume-yes --allow-unauthenticated google-chrome-beta" >> /etc/sudoers.d/jenkins

# Set the XDG cache to a directory which can be written to (In our CI, .cache isn't mounted/writable)
ENV XDG_CACHE_HOME "/tmp"
ENV XDG_CACHE_HOME="/tmp"
# Disable mesa cache entirely
ENV MESA_SHADER_CACHE_DISABLE "true"
ENV MESA_SHADER_CACHE_DISABLE="true"

# Switch user
USER ${USER_NAME}

# Workaround for Maven not outputting colors and silence download progress messages
ENV MAVEN_OPTS "-Djansi.passthrough=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Xmx2g -XX:MaxMetaspaceSize=256m"
ENV MAVEN_OPTS="-Djansi.passthrough=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Xmx2g -XX:MaxMetaspaceSize=256m"

RUN mkdir -p ~/workspace \
&& mkdir -p ~/.m2/repository

# TestDB Manager
ENV TESTMANAGER_HOSTNAME "gcn-testdb-manager.gtx-dev.svc"
ENV TESTMANAGER_PORT "8080"
ENV TESTMANAGER_HOSTNAME="gcn-testdb-manager.gtx-dev.svc"
ENV TESTMANAGER_PORT="8080"

# path to the docker.sock file to be mounted in the ryuk container (for testcontainers)
ENV TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE "/run/user/1000/docker.sock"
ENV JAVA_HOME "/usr/lib/jvm/java-17-amazon-corretto/"
ENV TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE="/run/user/1000/docker.sock"
ENV JAVA_HOME="/usr/lib/jvm/java-17-amazon-corretto/"

EXPOSE 80
4 changes: 4 additions & 0 deletions cms-ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
/apps/ui-core-docs/compile-docs.js
/apps/ui-core-docs/docs.output.json
migrations.json
prepared_dependencies.json
outdated_dependencies.json

# profiling files
chrome-profiler-events.json
Expand All @@ -31,3 +33,5 @@ report.*.json
.angular

test-output

vitest.config.*.timestamp*
Loading