-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/pip/ds-streamlit/files/streamli…
…t-1.30.0
- Loading branch information
Showing
89 changed files
with
1,417 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,6 +95,22 @@ jobs: | |
run: | | ||
docker build --tag agent-python-test-ubi8 --file Dockerfile.ubi8 . | ||
jenkins-agent-rust-ubi8: | ||
name: Jenkins agent Rust (UBI8) | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- | ||
name: Checkout repository | ||
uses: actions/[email protected] | ||
- | ||
name: Build docker image | ||
working-directory: common/jenkins-agents/rust/docker | ||
run: | | ||
docker build --tag agent-rust-test-ubi8 --file Dockerfile.ubi8 \ | ||
--build-arg rustVersion=1.75.0 \ | ||
--build-arg rustToolchain=x86_64-unknown-linux-gnu \ | ||
. | ||
jenkins-agent-terraform-ubi8: | ||
name: Jenkins agent Terraform (UBI8) | ||
runs-on: ubuntu-22.04 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
name: nginx | ||
description: "Enhanced nginx with Lua embeded. nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server. Technologies: OpenResty/nginx 1.19.3.2" | ||
description: "Enhanced nginx with Lua embeded. nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server. Technologies: OpenResty/nginx 1.25.3.1-1" | ||
supplier: https://openresty.org | ||
version: 4.x | ||
type: ods-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
be-java-springboot/files/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.0.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
name: OpenJDK | ||
description: "OpenJDK is a free and open-source implementation of the Java Platform, Standard Edition. Technologies: Spring Boot 2.1, OpenJDK 17" | ||
description: "OpenJDK is a free and open-source implementation of the Java Platform, Standard Edition. Technologies: Spring Boot 3.2.0, OpenJDK 21" | ||
supplier: https://openjdk.java.net/ | ||
version: 4.x | ||
type: ods |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
def odsNamespace = '' | ||
def odsGitRef = '' | ||
def odsImageTag = '' | ||
def sharedLibraryRef = '' | ||
def agentImageTag = '' | ||
|
||
node { | ||
odsNamespace = env.ODS_NAMESPACE ?: 'ods' | ||
odsGitRef = env.ODS_GIT_REF ?: 'master' | ||
odsImageTag = env.ODS_IMAGE_TAG ?: 'latest' | ||
sharedLibraryRef = env.SHARED_LIBRARY_REF ?: odsImageTag | ||
agentImageTag = env.AGENT_IMAGE_TAG ?: odsImageTag | ||
} | ||
|
||
library("ods-jenkins-shared-library@${sharedLibraryRef}") | ||
|
||
odsQuickstarterPipeline( | ||
imageStreamTag: "${odsNamespace}/jenkins-agent-rust:${agentImageTag}", | ||
) { context -> | ||
|
||
// https://cargo-generate.github.io/cargo-generate/index.html | ||
stage('Cargo Generate project') { | ||
sh( | ||
script: "cargo generate --path ${context.sourceDir}/rust-template --name ${context.projectId}-${context.componentId}", | ||
label: "Process Rust template" | ||
) | ||
sh( | ||
script: "mv ${context.projectId}-${context.componentId} ${context.sourceDir}/files", | ||
label: "Create files folder" | ||
) | ||
} | ||
|
||
odsQuickstarterStageCopyFiles(context) | ||
|
||
odsQuickstarterStageRenderJenkinsfile(context) | ||
|
||
odsQuickstarterStageRenderSonarProperties(context) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// See https://www.opendevstack.org/ods-documentation/ for usage and customization. | ||
|
||
@Library('ods-jenkins-shared-library@@shared_library_ref@') _ | ||
|
||
odsComponentPipeline( | ||
imageStreamTag: '@ods_namespace@/jenkins-agent-rust:@agent_image_tag@', | ||
branchToEnvironmentMapping: [ | ||
'master': 'dev', | ||
// 'release/': 'test' | ||
] | ||
) { context -> | ||
odsComponentFindOpenShiftImageOrElse(context) { | ||
stageTest(context) | ||
odsComponentStageScanWithSonar(context) | ||
stageBuild(context) | ||
odsComponentStageBuildOpenShiftImage(context) | ||
} | ||
odsComponentStageRolloutOpenShiftDeployment( | ||
context, [ | ||
'selector': "app=${context.componentId}", | ||
// uncomment this to use values.<ENV>.yaml files to override defaults on values.yaml | ||
// 'helmEnvBasedValuesFiles': ["values.env.yaml"], | ||
] | ||
) | ||
} | ||
|
||
def stageBuild(def context) { | ||
stage('Cargo Build') { | ||
sh "cargo build --release" | ||
sh "cp -r target/release/${context.projectId}-${context.componentId} docker/app" | ||
} | ||
} | ||
|
||
def stageTest(def context) { | ||
stage('Cargo Check') { | ||
sh """ | ||
cargo check --all-targets | ||
""" | ||
} | ||
stage('Cargo Format') { | ||
sh """ | ||
cargo fmt --all -- --check | ||
""" | ||
} | ||
stage('Cargo Clippy') { | ||
sh """ | ||
cargo clippy --all-features | ||
|
||
# Clippy reports for SonarQube | ||
mkdir -p build/test-results/clippy | ||
cargo clippy --message-format=json &> build/test-results/clippy/report.json | ||
""" | ||
} | ||
stage('Cargo Test') { | ||
sh """ | ||
# create report folders | ||
mkdir -p build/test-results/test | ||
mkdir -p build/test-results/coverage | ||
|
||
# Tests with JUnit XML report as defined in .config/nextest.toml | ||
cargo nextest run --profile ci | ||
|
||
# Coverage with LLVM lcov report from tests | ||
# generate the lcov.info report | ||
cargo llvm-cov --lcov --output-path ./build/test-results/coverage/lcov.info | ||
# generate the html report | ||
cargo llvm-cov report --html | ||
|
||
cp -r target/nextest/ci/results.xml build/test-results/test | ||
cp -r target/llvm-cov/html/ build/test-results/coverage | ||
""" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Rust Axum Quickstarter (be-rust-axum) | ||
|
||
Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-quickstarters/latest/index.html) | ||
|
||
Please update documentation in the [antora page directory](https://github.com/opendevstack/ods-quickstarters/tree/master/docs/modules/ROOT/pages) | ||
|
||
Tested thru [automated tests](../tests/be-rust-axum) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
MEMORY_LIMIT=128Mi | ||
MEMORY_REQUEST=64Mi | ||
CPU_LIMIT=100m | ||
CPU_REQUEST=50m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[profile.ci.junit] | ||
path = "results.xml" | ||
store-success-output = true | ||
store-failure-output = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Editor configuration, see https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = tab | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/target | ||
/build | ||
.vscode | ||
.DS_Store | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
repos: | ||
- repo: https://github.com/gitleaks/gitleaks | ||
rev: v8.16.1 | ||
hooks: | ||
- id: gitleaks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[package] | ||
# Here the project-name (Rust project) is your ODS component name | ||
name = "{{project-name}}" | ||
version = "0.1.0" | ||
edition = "2021" | ||
description = "{{project-name}} - 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.7", features = ["http2"] } | ||
tokio = { version = "1.35", features = ["rt-multi-thread", "macros", "signal"] } | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1.0" | ||
http = "1.0" | ||
http-body-util = "0.1" | ||
bytes = "1.5" | ||
thiserror = "1.0" | ||
tracing = "0.1" | ||
tracing-subscriber = { version = "0.3", features = ["tracing", "env-filter"] } | ||
lazy_static = "1.4" | ||
|
||
# Nice HTTP middlewares from Tower crate, to be added to router.rs. | ||
# Uncomment as per need, check official docs. | ||
# tower-http = { version = "0.5", features = [ | ||
# "trace", | ||
# "compression-br", | ||
# "propagate-header", | ||
# "sensitive-headers", | ||
# "cors", | ||
# ] } | ||
|
||
# SQLx is the recommended safe and performant package to work with relational DBs like PostgreSQL; check official docs | ||
# sqlx = { version = "0.7", features = [ "runtime-tokio", "tls-rustls", "postgres", "uuid", "json", "time", "macros", "migrate" ] } | ||
|
||
# One can use envy crate for more automated env vars management, see docs. | ||
# envy = "*" | ||
# One can use dotenvy crate for automating ingestion of env vars from .env file. | ||
# dotenvy = "*" | ||
|
||
[dev-dependencies] | ||
tower = { version = "0.4", features = ["util"] } |
Oops, something went wrong.