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
26 changes: 21 additions & 5 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@ jobs:
--build-arg nexusAuth=developer:s3cr3t \
.

jenkins-agent-nodejs24-ubi8:
name: Jenkins agent NodeJS 24 (UBI8)
runs-on: ubuntu-22.04
steps:
-
name: Checkout repository
uses: actions/checkout@v4.2.2
-
name: Build docker image
working-directory: common/jenkins-agents/nodejs24/docker
run: |
docker build --tag agent-nodejs24-test-ubi8 --file Dockerfile.ubi8 \
--build-arg nexusUrl=https://nexus.example.com \
--build-arg nexusAuth=developer:s3cr3t \
.

jenkins-agent-python-ubi8:
name: Jenkins agent Python (UBI8)
runs-on: ubuntu-22.04
Expand All @@ -108,12 +124,12 @@ jobs:
working-directory: common/jenkins-agents/rust/docker
run: |
docker build --tag agent-rust-test-ubi8 --file Dockerfile.ubi8 \
--build-arg rustVersion=1.83.0 \
--build-arg rustVersion=1.88.0 \
--build-arg rustToolchain=x86_64-unknown-linux-gnu \
--build-arg cargoNextestVersion=0.9.87 \
--build-arg cargoLlvmCovVersion=0.6.15 \
--build-arg cargoGenerateVersion=0.22.1 \
--build-arg cargoDenyVersion=0.16.3 \
--build-arg cargoNextestVersion=0.9.94 \
--build-arg cargoLlvmCovVersion=0.6.16 \
--build-arg cargoGenerateVersion=0.23.3 \
--build-arg cargoDenyVersion=0.18.2 \
.

jenkins-agent-terraform-2306-ubi8:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/pr-e2e-codeowners-notification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PR Codeowners Notification

on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- '*.x'

jobs:
notify-codeowners:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2

- name: Check for changes in CODEOWNERS paths
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
owned_paths:
- 'e2e-cypress/**'
- 'e2e-spock-geb/**'
- 'e2e-etl-python/**'

- name: Post notification comment
if: steps.filter.outputs.owned_paths == 'true'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '⚠️ **Codeowners Notification**: Changes detected in paths owned by specific users. Please ensure the following reviewers are involved/notified:\n\n' +
'- @garcanam @roicarrera (for e2e-cypress, e2e-spock-geb, e2e-etl-python)\n'
});
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,27 @@

### Added

### Changed

### Fixed

## [4.11.0] - 2025-12-03

### Added
- Added gh action for custom e2e QS notification ([#1137](https://github.com/opendevstack/ods-quickstarters/pull/1137))
- Added Node.js 24 Jenkins agent and related CI/Makefile/docs updates ([#1133]) (common/jenkins-agents/nodejs24) ([#1134](https://github.com/opendevstack/ods-quickstarters/pull/1134))

### Changed
- Upgrade with dynamic backend configuration of Azure quickstarter ([#1131](https://github.com/opendevstack/ods-quickstarters/pull/1131))
- Rust QS flag to enable or disable cargo-deny for dependency linting, default to true ([#1107](https://github.com/opendevstack/ods-quickstarters/issues/1107))
- Rust QS enable dynamic toolchain/version support ([#1119](https://github.com/opendevstack/ods-quickstarters/issues/1119))
- Docker Plain Helm chart ([#1135](https://github.com/opendevstack/ods-quickstarters/pull/1135))

### Fixed
- Fix Springboot version parameter ([#1138](https://github.com/opendevstack/ods-quickstarters/issues/1138))

## [4.10.0] - 2025-10-13
### Changed


### Fixed
Expand Down Expand Up @@ -42,6 +61,7 @@
## [4.8.0] - 2025-4-10

### Changed
- Add Helm Chart to Docker Plain Quickstarter ([#1035](https://github.com/opendevstack/ods-quickstarters/pull/1035))
- Update CODEOWNERS ([#1108](https://github.com/opendevstack/ods-quickstarters/issues/1108))
- Fix Nginx related Quickstarters worker processes value to 1 as default ([#1092](https://github.com/opendevstack/ods-quickstarters/issues/1092))
- Set Request and Limits with Ephemeral storage and Make use of Nexus in terraform agents ([#1104](https://github.com/opendevstack/ods-quickstarters/pull/1104))
Expand Down
22 changes: 18 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ ODS_NAMESPACE := $(shell grep ODS_NAMESPACE $(CURDIR)/../ods-configuration/ods-c
install-jenkins-agent: install-jenkins-agent-golang install-jenkins-agent-jdk install-jenkins-agent-nodejs install-jenkins-agent-python install-jenkins-agent-scala install-jenkins-agent-terraform-2306 install-jenkins-agent-terraform-2408 install-jenkins-agent-rust
.PHONY: install-jenkins-agent

## Update OpenShift resources related Jenkins agent resources.
apply-jenkins-agent-build: apply-jenkins-agent-golang-build apply-jenkins-agent-jdk-build apply-jenkins-agent-nodejs18-build apply-jenkins-agent-nodejs20-build apply-jenkins-agent-nodejs22-build apply-jenkins-agent-python-build apply-jenkins-agent-scala-build apply-jenkins-agent-terraform-build-2306 apply-jenkins-agent-terraform-build-2408 apply-jenkins-agent-rust-build
.## Update OpenShift resources related Jenkins agent resources.
apply-jenkins-agent-build: apply-jenkins-agent-golang-build apply-jenkins-agent-jdk-build apply-jenkins-agent-nodejs18-build apply-jenkins-agent-nodejs20-build apply-jenkins-agent-nodejs22-build apply-jenkins-agent-nodejs24-build apply-jenkins-agent-python-build apply-jenkins-agent-scala-build apply-jenkins-agent-terraform-build-2306 apply-jenkins-agent-terraform-build-2408 apply-jenkins-agent-rust-build
.PHONY: apply-jenkins-agent-build

## Start builds of Jenkins agents.
start-jenkins-agent-build: start-jenkins-agent-golang-build start-jenkins-agent-jdk-build start-jenkins-agent-nodejs18-build start-jenkins-agent-nodejs20-build apply-jenkins-agent-nodejs22-build start-jenkins-agent-python-build start-jenkins-agent-scala-build start-jenkins-agent-terraform-build-2306 start-jenkins-agent-terraform-build-2408 start-jenkins-agent-rust-build
.PHONY: apply-jenkins-agent-build

## Start builds of Jenkins agents.
start-jenkins-agent-build: start-jenkins-agent-golang-build start-jenkins-agent-jdk-build start-jenkins-agent-nodejs18-build start-jenkins-agent-nodejs20-build start-jenkins-agent-nodejs22-build start-jenkins-agent-nodejs24-build start-jenkins-agent-python-build start-jenkins-agent-scala-build start-jenkins-agent-terraform-build-2306 start-jenkins-agent-terraform-build-2408 start-jenkins-agent-rust-build
.PHONY: start-jenkins-agent-build
.PHONY: start-jenkins-agent-build


Expand Down Expand Up @@ -54,7 +58,7 @@ start-jenkins-agent-jdk-build:

# JENKINS AGENT NODEJS
## Install or update Jenkins Node agent resources.
install-jenkins-agent-nodejs: apply-jenkins-agent-nodejs18-build apply-jenkins-agent-nodejs20-build apply-jenkins-agent-nodejs22-build start-jenkins-agent-nodejs18-build start-jenkins-agent-nodejs20-build start-jenkins-agent-nodejs22-build
install-jenkins-agent-nodejs: apply-jenkins-agent-nodejs18-build apply-jenkins-agent-nodejs20-build apply-jenkins-agent-nodejs22-build apply-jenkins-agent-nodejs24-build start-jenkins-agent-nodejs18-build start-jenkins-agent-nodejs20-build start-jenkins-agent-nodejs22-build start-jenkins-agent-nodejs24-build
.PHONY: install-jenkins-agent-nodejs

## Update OpenShift resources related to Jenkins Node 18 agent image.
Expand All @@ -72,6 +76,11 @@ apply-jenkins-agent-nodejs22-build:
cd common/jenkins-agents/nodejs22/ocp-config && tailor apply --namespace $(ODS_NAMESPACE)
.PHONY: apply-jenkins-agent-nodejs22-build

## Update OpenShift resources related to Jenkins Node 24 agent image.
apply-jenkins-agent-nodejs24-build:
cd common/jenkins-agents/nodejs24/ocp-config && tailor apply --namespace $(ODS_NAMESPACE)
.PHONY: apply-jenkins-agent-nodejs24-build

## Start build of BuildConfig "jenkins-agent-nodejs18".
start-jenkins-agent-nodejs18-build:
oc -n $(ODS_NAMESPACE) start-build jenkins-agent-nodejs18 --follow
Expand All @@ -87,6 +96,11 @@ start-jenkins-agent-nodejs22-build:
oc -n $(ODS_NAMESPACE) start-build jenkins-agent-nodejs22 --follow
.PHONY: start-jenkins-agent-nodejs22-build

## Start build of BuildConfig "jenkins-agent-nodejs24".
start-jenkins-agent-nodejs24-build:
oc -n $(ODS_NAMESPACE) start-build jenkins-agent-nodejs24 --follow
.PHONY: start-jenkins-agent-nodejs24-build

# JENKINS AGENT PYTHON
## Install or update Jenkins Python agent resources.
install-jenkins-agent-python: apply-jenkins-agent-python-build start-jenkins-agent-python-build
Expand Down
31 changes: 17 additions & 14 deletions be-java-springboot/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,25 @@ odsQuickstarterPipeline(

stage('Build spring project') {
dir(context.targetDir) {
def springBootVersion = '3.3.3'
def springBootVersion = '4.0.0'
echo "--- create spring boot (v${springBootVersion}) project via spring initializr ---"

sh "curl https://start.spring.io/starter.tgz \
-d type=gradle-project \
-d language=java \
-d dependencies='web,data-rest,data-jpa,h2,security,devtools' \
-d platformVersion=${springBootVersion} \
-d packaging=jar \
-d jvmVersion=${javaVersion} \
-d groupId=${context.projectId} \
-d artifactId=${context.componentId} \
-d name=${context.componentId} \
-d description='OpenDevStack%20Demo%20Project%20for%20Spring%20Boot' \
-d packageName='${context.packageName}' \
| tar -zxvf - "
def springInitializrUrl = "https://start.spring.io/starter.tgz?" +
"type=gradle-project&" +
"language=java&" +
"dependencies=web,data-rest,data-jpa,h2,security,devtools&" +
"bootVersion=${springBootVersion}&" +
"packaging=jar&" +
"jvmVersion=${javaVersion}&" +
"groupId=${context.projectId}&" +
"artifactId=${context.componentId}&" +
"name=${context.componentId}&" +
"description=OpenDevStack%20Demo%20Project%20for%20Spring%20Boot&" +
"packageName=${context.packageName}"

sh """
curl -L "${springInitializrUrl}" | tar -xzvf -
"""

echo "--- configure application.properties ---"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
23 changes: 14 additions & 9 deletions be-rust-axum/Jenkinsfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ odsComponentPipeline(
]
) { context ->
odsComponentFindOpenShiftImageOrElse(context) {
stageCI(context)
stageCI(context, false) // set `auditDependencies` to true if using cargo-deny
odsComponentStageScanWithSonar(context)
stageBuild(context)
odsComponentStageBuildOpenShiftImage(context)
Expand All @@ -27,7 +27,7 @@ def stageBuild(def context) {
}
}

def stageCI(def context) {
def stageCI(def context, def auditDependencies) {
stage('Cargo Check') {
sh """
cargo --version
Expand All @@ -51,20 +51,25 @@ def stageCI(def context) {
cargo clippy --message-format=json &> build/test-results/clippy/report.json
"""
}
stage('Cargo Deny') {
sh """
mkdir -p build/test-results/deny
cargo deny --format json check &> build/test-results/deny/cargo-deny-report.json
cat build/test-results/deny/cargo-deny-report.json
"""
archiveArtifacts artifacts: 'build/test-results/deny/cargo-deny-report.json', fingerprint: true
if (auditDependencies) {
stage('Cargo Deny') {
sh """
mkdir -p build/test-results/deny
cargo deny --format json check &> build/test-results/deny/cargo-deny-report.json
cat build/test-results/deny/cargo-deny-report.json
"""
archiveArtifacts artifacts: 'build/test-results/deny/cargo-deny-report.json', fingerprint: true
}
}
stage('Cargo Test') {
sh """
# create report folders
mkdir -p build/test-results/test
mkdir -p build/test-results/coverage

# If required, pre-install llvm-tools-preview to avoid interactive prompt when not using default Jenkins agent toolchain
# rustup component add llvm-tools-preview --toolchain ${RUST_VERSION}

# Tests with JUnit XML report, as defined in .config/nextest.toml, and coverage LLVM cov report
cargo llvm-cov nextest --profile ci --lcov --output-path ./build/test-results/coverage/lcov.info
cp -r target/nextest/ci/results.xml build/test-results/test
Expand Down
4 changes: 2 additions & 2 deletions be-rust-axum/rust-template/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.22.1
rev: v8.25.1
hooks:
- id: gitleaks
- repo: https://github.com/EmbarkStudios/cargo-deny
rev: 0.16.3
rev: 0.18.2
hooks:
- id: cargo-deny
args: ["--all-features", "check"] # optionally modify the arguments for cargo-deny (default arguments shown here)
Expand Down
47 changes: 38 additions & 9 deletions be-rust-axum/rust-template/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,37 @@
# Here the project-name (Rust project) is your ODS component name
name = "{{project-name}}"
version = "0.1.0"
edition = "2021"
edition = "2024"
rust-version = "1.88"
description = "{{project-name}} component - from the OpenDevStack Rust QuickStarter."
license = "MIT OR Apache-2.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
# one can add more dependencies via cargo to Cargo.toml as shown next: cargo add axum -F axum/http2
axum = { version = "0.8", features = ["http2"] }
tokio = { version = "1.40", features = ["rt-multi-thread", "macros", "signal"] }
axum = { version = "0.8", features = ["http2", "macros", "multipart"] }
tokio = { version = "1.44", features = ["rt-multi-thread", "macros", "signal"] }

serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

http = "1.1"
http = "1.3"
http-body-util = "0.1"
# Highly encouraged to use URL encoding when working with any URI string
# urlencoding = "2.1"
bytes = "1.7"

thiserror = "2.0"

tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["tracing", "env-filter"] }
tracing-subscriber = { version = "0.3", features = ["tracing", "env-filter", "json", "ansi", "fmt"] }

lazy_static = "1.5"

envy = "0.4"
dotenvy = "0.15"

# Nice HTTP middlewares from Tower crate, to be added to router.rs.
# Uncomment as per need, check official docs.
# HTTP middlewares from Tower crate, to be added to router.rs.
# tower-http = { version = "0.6", features = [
# "trace",
# "compression-br",
Expand All @@ -40,9 +42,36 @@ dotenvy = "0.15"
# ] }

# SQLx is the recommended safe and performant package to work with relational DBs like PostgreSQL; check official docs
# sqlx = { version = "0.8", features = [ "runtime-tokio", "tls-rustls", "postgres", "uuid", "json", "time", "macros", "migrate" ] }
# sqlx = { version = "0.8", features = [
# "runtime-tokio",
# "tls-rustls-ring-native-roots",
# "postgres",
# "uuid",
# "json",
# "chrono",
# "macros",
# "migrate"
# ]}

# OTEL; check official docs
# opentelemetry = { version = "0.29", features = ["trace", "metrics"] }
# opentelemetry_sdk = { version = "0.29", features = ["rt-tokio"] }
# opentelemetry-otlp = { version = "0.29", features = ["http-proto", "reqwest-client", "reqwest-rustls"] }
# opentelemetry-http = { version = "0.29" }
# opentelemetry-stdout = { version = "0.29", features = ["trace"] }
# opentelemetry-appender-tracing = { version = "0.29" }
# opentelemetry-semantic-conventions = { version = "0.29" }
# tracing-opentelemetry = { version = "0.30" }

# OpenAPI; check official docs
# utoipa = { version = "5.3", features = ["axum_extras", "uuid", "chrono"] }
# utoipa-axum = "0.2"
# utoipa-swagger-ui = { version = "9.0", features = ["axum"] }
# # utoipa-redoc = { version = "5.0", features = ["axum"] }
# # utoipa-rapidoc = { version = "5.0", features = ["axum"] }
# # utoipa-scalar = { version = "0.2", features = ["axum"] }

[dev-dependencies]
# mockito = "1.5" # mockito is recommended when requiring mocking network requests to either external or internal services
# mockito = "1.7" # mockito is recommended when requiring mocking network requests to either external or internal services
temp-env = { version = "0.3", features = ["async_closure"] } # it is highly recommended the usage of cargo nextest run instead of cargo test; this way each test runs on its own process
tower = { version = "0.5", features = ["util"] }
10 changes: 10 additions & 0 deletions be-rust-axum/rust-template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

The official OpenDevStack documentation for this QuickStarter can be found [here](https://www.opendevstack.org/ods-documentation/opendevstack/latest/quickstarters/be-rust-axum.html).

Check also the official docs of the [Jenkins Rust Agent](https://www.opendevstack.org/ods-documentation/opendevstack/latest/jenkins-agents/rust.html) this Quickstarter makes use of. There you can see the setup and tools it provides.

## Pre-commit hooks

This project uses [pre-commit](https://pre-commit.com).
Expand All @@ -11,6 +13,14 @@ This project uses [pre-commit](https://pre-commit.com).
pre-commit install
```

The provided pre-commit hooks are:
- gitleaks (check for secrets)
- cargo-deny (dependency auditing, see/update `deny.toml` config file)
- cargo-fmt (formatter, see/update `rustfmt.toml` config file)
- cargo-clippy (linter)

**NOTE**: the cargo hooks also run in Jenkins CICD, but cargo deny is disabled by default, see Jenkinsfile.

## Adding caching in your CICD

One can improve the build pipeline time by implementing a caching mechanism as shown next:
Expand Down
2 changes: 2 additions & 0 deletions be-rust-axum/rust-template/cargo-generate.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[template]
exclude = ["chart/templates/*"]
2 changes: 1 addition & 1 deletion be-rust-axum/rust-template/metadata.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Axum - Rust web framework
description: "Axum is an ergonomic and modular web framework built with Tokio, Tower, and Hyper; written in Rust. Technologies: Axum 0.8.x, Rust 1.83.x"
description: "Axum is an ergonomic and modular web framework built with Tokio, Tower, and Hyper; written in Rust. Technologies: Axum 0.8.x, Rust 1.88.x"
supplier: https://github.com/tokio-rs/axum
version: 4.x
type: ods
Loading