diff --git a/.github/workflows/changelog-enforcer.yml b/.github/workflows/changelog-enforcer.yml index de56dca7e..bf83157fa 100644 --- a/.github/workflows/changelog-enforcer.yml +++ b/.github/workflows/changelog-enforcer.yml @@ -8,7 +8,7 @@ jobs: changelog: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.6 + - uses: actions/checkout@v4.1.7 - uses: dangoslen/changelog-enforcer@v3 with: changeLogPath: 'CHANGELOG.md' diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index b59feee80..43e38e1e4 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -8,13 +8,14 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Build docker image working-directory: common/jenkins-agents/golang/docker run: | docker build --tag agent-go-test-ubi8 --file Dockerfile.ubi8 \ - --build-arg goDistributionUrl=https://go.dev/dl/go1.20.4.linux-amd64.tar.gz \ + --build-arg goDistributionUrl=https://go.dev/dl/go1.23.0.linux-amd64.tar.gz \ + --build-arg golangciVersion=v1.60.1 \ . jenkins-agent-jdk-ubi8: @@ -23,7 +24,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Build docker image working-directory: common/jenkins-agents/jdk/docker @@ -40,7 +41,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Build docker image working-directory: common/jenkins-agents/nodejs16/docker @@ -56,7 +57,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Build docker image working-directory: common/jenkins-agents/nodejs18/docker @@ -72,7 +73,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Build docker image working-directory: common/jenkins-agents/nodejs20/docker @@ -88,7 +89,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Build docker image working-directory: common/jenkins-agents/nodejs22/docker @@ -104,7 +105,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Build docker image working-directory: common/jenkins-agents/python/docker @@ -117,14 +118,17 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - 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 rustVersion=1.80.1 \ --build-arg rustToolchain=x86_64-unknown-linux-gnu \ + --build-arg cargoNextestVersion=0.9.72 \ + --build-arg cargoLlvmCovVersion=0.6.11 \ + --build-arg cargoGenerateVersion=0.21.3 \ . jenkins-agent-terraform-ubi8: @@ -133,7 +137,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Build docker image working-directory: common/jenkins-agents/terraform/docker @@ -146,7 +150,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Build docker image working-directory: common/jenkins-agents/terraform-2306/docker @@ -159,7 +163,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Build docker image working-directory: common/jenkins-agents/scala/docker diff --git a/CHANGELOG.md b/CHANGELOG.md index b93b39a11..cb4f3e154 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,21 @@ ## Unreleased -- Update Rust Axum Quickstarter ([#1024](https://github.com/opendevstack/ods-quickstarters/pull/1024)) +- Update OS packages by default and bump gitleaks version ([#1049](https://github.com/opendevstack/ods-quickstarters/issues/1049)) +- Update Angular, Ionic and Typescript Quickstarters ([#1033](https://github.com/opendevstack/ods-quickstarters/issues/1033)) +- Update Rust Axum Quickstarter to Rust 1.79.0 ([#1024](https://github.com/opendevstack/ods-quickstarters/pull/1024)) +- Update jdk and scala quickstarters and agents ([#1032](https://github.com/opendevstack/ods-quickstarters/issues/1032)) - Gitleaks docs fix and update ([#1028](https://github.com/opendevstack/ods-quickstarters/issues/1028)) - Enable OpenSSL vendored compilation for Rust Jenkins Agent ([#1026](https://github.com/opendevstack/ods-quickstarters/pull/1026)) - Add Helm Chart to Docker Plain Quickstarter ([#1035](https://github.com/opendevstack/ods-quickstarters/pull/1035)) +- Update Streamlit Quickstarter ([#1030](https://github.com/opendevstack/ods-quickstarters/issues/1030)) +- Update Golang agent ([#1031](https://github.com/opendevstack/ods-quickstarters/issues/1031)) +- Update gateway/nginx Quickstarter ([#1048](https://github.com/opendevstack/ods-quickstarters/pull/1048)) +- Update Rust Axum Quickstarter to Rust 1.80.1 and improve Agent build configuration ([#1040](https://github.com/opendevstack/ods-quickstarters/pull/1040)) +- Support for Python3.12, and maintenance of be-python-flask quickstarter and python Jenkins agent ([#1030](https://github.com/opendevstack/ods-quickstarters/pull/1030)) +- Added custom reporter to Cypress Quickstarter and update dependencies ([#1034](https://github.com/opendevstack/ods-quickstarters/pull/1034)) +- Fix permissions in Golang agent for the golden tests ([#1052](https://github.com/opendevstack/ods-quickstarters/pull/1052)) +- Fix ETL Python QS: AWS Test codepipeline Status Managment and update cryptography dependency([#1056](https://github.com/opendevstack/ods-quickstarters/pull/1052)) ### Added diff --git a/Makefile b/Makefile index a5a34948f..adc9044bd 100644 --- a/Makefile +++ b/Makefile @@ -12,11 +12,11 @@ install-jenkins-agent: install-jenkins-agent-golang install-jenkins-agent-jdk in .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-nodejs16-build apply-jenkins-agent-nodejs18-build apply-jenkins-agent-nodejs20-build apply-jenkins-agent-python-build apply-jenkins-agent-scala-build apply-jenkins-agent-terraform-build apply-jenkins-agent-terraform-build-2306 apply-jenkins-agent-rust-build +apply-jenkins-agent-build: apply-jenkins-agent-golang-build apply-jenkins-agent-jdk-build apply-jenkins-agent-nodejs16-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 apply-jenkins-agent-terraform-build-2306 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-nodejs16-build start-jenkins-agent-nodejs18-build start-jenkins-agent-nodejs20-build start-jenkins-agent-python-build start-jenkins-agent-scala-build start-jenkins-agent-terraform-build start-jenkins-agent-terraform-build-2306 start-jenkins-agent-rust-build +start-jenkins-agent-build: start-jenkins-agent-golang-build start-jenkins-agent-jdk-build start-jenkins-agent-nodejs16-build start-jenkins-agent-nodejs18-build start-jenkins-agent-nodejs20-build start-jenkins-agent-nodejs22-build start-jenkins-agent-python-build start-jenkins-agent-scala-build start-jenkins-agent-terraform-build start-jenkins-agent-terraform-build-2306 start-jenkins-agent-rust-build .PHONY: start-jenkins-agent-build @@ -54,7 +54,7 @@ start-jenkins-agent-jdk-build: # JENKINS AGENT NODEJS ## Install or update Jenkins Node agent resources. -install-jenkins-agent-nodejs: apply-jenkins-agent-nodejs16-build apply-jenkins-agent-nodejs18-build apply-jenkins-agent-nodejs20-build start-jenkins-agent-nodejs16-build start-jenkins-agent-nodejs18-build start-jenkins-agent-nodejs20-build +install-jenkins-agent-nodejs: apply-jenkins-agent-nodejs16-build apply-jenkins-agent-nodejs18-build apply-jenkins-agent-nodejs20-build apply-jenkins-agent-nodejs22-build start-jenkins-agent-nodejs16-build start-jenkins-agent-nodejs18-build start-jenkins-agent-nodejs20-build start-jenkins-agent-nodejs22-build .PHONY: install-jenkins-agent-nodejs ## Update OpenShift resources related to Jenkins Node 16 agent image. @@ -72,6 +72,11 @@ apply-jenkins-agent-nodejs20-build: cd common/jenkins-agents/nodejs20/ocp-config && tailor apply --namespace $(ODS_NAMESPACE) .PHONY: apply-jenkins-agent-nodejs20-build +## Update OpenShift resources related to Jenkins Node 22 agent image. +apply-jenkins-agent-nodejs22-build: + cd common/jenkins-agents/nodejs22/ocp-config && tailor apply --namespace $(ODS_NAMESPACE) +.PHONY: apply-jenkins-agent-nodejs22-build + ## Start build of BuildConfig "jenkins-agent-nodejs16". start-jenkins-agent-nodejs16-build: oc -n $(ODS_NAMESPACE) start-build jenkins-agent-nodejs16 --follow @@ -87,6 +92,11 @@ start-jenkins-agent-nodejs20-build: oc -n $(ODS_NAMESPACE) start-build jenkins-agent-nodejs20 --follow .PHONY: start-jenkins-agent-nodejs20-build +## Start build of BuildConfig "jenkins-agent-nodejs22". +start-jenkins-agent-nodejs22-build: + oc -n $(ODS_NAMESPACE) start-build jenkins-agent-nodejs22 --follow +.PHONY: start-jenkins-agent-nodejs22-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 diff --git a/be-fe-mono-repo-plain/files/.pre-commit-config.yaml b/be-fe-mono-repo-plain/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/be-fe-mono-repo-plain/files/.pre-commit-config.yaml +++ b/be-fe-mono-repo-plain/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/be-fe-mono-repo-plain/files/docker_be/Dockerfile b/be-fe-mono-repo-plain/files/docker_be/Dockerfile index 8efa5f6f2..e9399c117 100644 --- a/be-fe-mono-repo-plain/files/docker_be/Dockerfile +++ b/be-fe-mono-repo-plain/files/docker_be/Dockerfile @@ -3,6 +3,10 @@ FROM alpine:latest RUN echo "building simple backend container" +RUN apk update && \ + apk -i upgrade && \ + apk cache clean + EXPOSE 8081 CMD ["/bin/sh", "-c", "/usr/bin/nc -lk -p 8081 -e echo -e \"HTTP/1.1 200 OK\n\nHello World!\n$(date)\""] diff --git a/be-fe-mono-repo-plain/files/docker_fe/Dockerfile b/be-fe-mono-repo-plain/files/docker_fe/Dockerfile index 697659a7b..e7d0c6465 100644 --- a/be-fe-mono-repo-plain/files/docker_fe/Dockerfile +++ b/be-fe-mono-repo-plain/files/docker_fe/Dockerfile @@ -3,6 +3,10 @@ FROM alpine:latest RUN echo "building simple frontend container" +RUN apk update && \ + apk -i upgrade && \ + apk cache clean + EXPOSE 8080 CMD ["/bin/sh", "-c", "/usr/bin/nc -lk -p 8080 -e echo -e \"HTTP/1.1 200 OK\n\nHello World!\n$(date)\""] diff --git a/be-gateway-nginx/files/.pre-commit-config.yaml b/be-gateway-nginx/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/be-gateway-nginx/files/.pre-commit-config.yaml +++ b/be-gateway-nginx/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/be-gateway-nginx/files/docker/Dockerfile b/be-gateway-nginx/files/docker/Dockerfile index 3aba489f2..abedfe9ba 100644 --- a/be-gateway-nginx/files/docker/Dockerfile +++ b/be-gateway-nginx/files/docker/Dockerfile @@ -1,5 +1,5 @@ # https://github.com/openresty/docker-openresty -FROM openresty/openresty:1.25.3.1-1-rocky +FROM openresty/openresty:1.25.3.2-0-rocky ENV LANG=C.UTF-8 @@ -15,6 +15,9 @@ COPY lua /usr/local/openresty/lualib COPY nginx.conf /usr/local/openresty/nginx/conf/ COPY entrypoint.sh /app/ +RUN dnf upgrade -y && \ + dnf clean all + RUN chgrp -R 0 /app /usr/local/openresty/nginx && \ chmod -R g=u /app /usr/local/openresty/nginx && \ chmod +x /app/entrypoint.sh && \ diff --git a/be-gateway-nginx/files/metadata.yml b/be-gateway-nginx/files/metadata.yml index f1ab86534..837c5d0af 100644 --- a/be-gateway-nginx/files/metadata.yml +++ b/be-gateway-nginx/files/metadata.yml @@ -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.25.3.1-1" +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.2-0" supplier: https://openresty.org version: 4.x type: ods-service diff --git a/be-golang-plain/files/.pre-commit-config.yaml b/be-golang-plain/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/be-golang-plain/files/.pre-commit-config.yaml +++ b/be-golang-plain/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/be-golang-plain/files/docker/Dockerfile b/be-golang-plain/files/docker/Dockerfile index ba4aca44b..d88a7feb0 100644 --- a/be-golang-plain/files/docker/Dockerfile +++ b/be-golang-plain/files/docker/Dockerfile @@ -24,6 +24,10 @@ FROM alpine COPY app_linux_amd64 app_linux_amd64 +RUN apk update && \ + apk -i upgrade && \ + apk cache clean + EXPOSE 8080 CMD ["./app_linux_amd64"] diff --git a/be-java-springboot/Jenkinsfile b/be-java-springboot/Jenkinsfile index 53f6f99cc..cc2ee64f3 100644 --- a/be-java-springboot/Jenkinsfile +++ b/be-java-springboot/Jenkinsfile @@ -3,6 +3,7 @@ def odsGitRef = '' def odsImageTag = '' def sharedLibraryRef = '' def agentImageTag = '' +def javaVersion = '21' node { odsNamespace = env.ODS_NAMESPACE ?: 'ods' @@ -20,7 +21,7 @@ odsQuickstarterPipeline( stage('Build spring project') { dir(context.targetDir) { - def springBootVersion = '3.2.0' + def springBootVersion = '3.3.3' echo "--- create spring boot (v${springBootVersion}) project via spring initializr ---" sh "curl https://start.spring.io/starter.tgz \ @@ -29,7 +30,7 @@ odsQuickstarterPipeline( -d dependencies='web,data-rest,data-jpa,h2,security,devtools' \ -d platformVersion=${springBootVersion} \ -d packaging=jar \ - -d jvmVersion=21 \ + -d jvmVersion=${javaVersion} \ -d groupId=${context.projectId} \ -d artifactId=${context.componentId} \ -d name=${context.componentId} \ @@ -68,6 +69,9 @@ odsQuickstarterPipeline( // append maven-publish settings sh "cat ${context.sourceDir}/templates/gradle-maven-publish.template >> ${context.targetDir}/build.gradle" + + // change java toolchain version + sh "sed -i 's/JavaLanguageVersion.of(17)/JavaLanguageVersion.of(${javaVersion})/g' ${context.targetDir}/build.gradle" } odsQuickstarterStageCopyFiles(context) diff --git a/be-java-springboot/Jenkinsfile.template b/be-java-springboot/Jenkinsfile.template index d320d8b5a..9c46b7653 100644 --- a/be-java-springboot/Jenkinsfile.template +++ b/be-java-springboot/Jenkinsfile.template @@ -26,7 +26,7 @@ def stageBuild(def context) { } stage('Build and Unit Test') { withEnv(["TAGVERSION=${context.tagversion}", "NEXUS_HOST=${context.nexusHost}", "NEXUS_USERNAME=${context.nexusUsername}", "NEXUS_PASSWORD=${context.nexusPassword}", "JAVA_OPTS=${javaOpts}","GRADLE_TEST_OPTS=${gradleTestOpts}","ENVIRONMENT=${springBootEnv}"]) { - def status = sh(script: "source use-j21.sh && ./gradlew clean build --stacktrace --no-daemon && source use-j11.sh", returnStatus: true) + def status = sh(script: "source use-j21.sh && ./gradlew clean build --stacktrace --no-daemon && source use-j17.sh", returnStatus: true) if (status != 0) { error "Build failed!" } diff --git a/be-java-springboot/files/.pre-commit-config.yaml b/be-java-springboot/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/be-java-springboot/files/.pre-commit-config.yaml +++ b/be-java-springboot/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/be-java-springboot/files/docker/Dockerfile b/be-java-springboot/files/docker/Dockerfile index 39b6f42a8..c4c6da9e5 100644 --- a/be-java-springboot/files/docker/Dockerfile +++ b/be-java-springboot/files/docker/Dockerfile @@ -6,6 +6,13 @@ ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true COPY app.jar app.jar +USER root + +RUN microdnf upgrade -y && \ + microdnf clean all + +USER 1001 + EXPOSE 8080 CMD ["java","-Xmx512m", "-jar", "app.jar"] diff --git a/be-java-springboot/files/gradle/wrapper/gradle-wrapper.properties b/be-java-springboot/files/gradle/wrapper/gradle-wrapper.properties index a59520664..e1adfb493 100644 --- a/be-java-springboot/files/gradle/wrapper/gradle-wrapper.properties +++ b/be-java-springboot/files/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/be-java-springboot/files/metadata.yml b/be-java-springboot/files/metadata.yml index b1f2a24ff..c160ad040 100644 --- a/be-java-springboot/files/metadata.yml +++ b/be-java-springboot/files/metadata.yml @@ -1,6 +1,6 @@ --- name: OpenJDK -description: "OpenJDK is a free and open-source implementation of the Java Platform, Standard Edition. Technologies: Spring Boot 3.2.0, OpenJDK 21" +description: "OpenJDK is a free and open-source implementation of the Java Platform, Standard Edition. Technologies: Spring Boot 3.3.3, OpenJDK 21" supplier: https://openjdk.java.net/ version: 4.x type: ods diff --git a/be-python-flask/Jenkinsfile.template b/be-python-flask/Jenkinsfile.template index 4fe1df37a..7cd51a5ff 100644 --- a/be-python-flask/Jenkinsfile.template +++ b/be-python-flask/Jenkinsfile.template @@ -29,7 +29,7 @@ def stageTestSuite(def context) { stage('Prepare Test Suite') { sh """ - python3.11 -m venv testsuite + python3.12 -m venv testsuite . ./testsuite/bin/activate pip install -r tests_requirements.txt pip check @@ -50,7 +50,7 @@ def stageTestSuite(def context) { def status = sh( script: """ . ./testsuite/bin/activate - PYTHONPATH=src python3.11 -m pytest --junitxml=tests.xml -o junit_family=xunit2 --cov-report term-missing --cov-report xml --cov=src -o testpaths=tests + PYTHONPATH=src python3.12 -m pytest --junitxml=tests.xml -o junit_family=xunit2 --cov-report term-missing --cov-report xml --cov=src -o testpaths=tests mv tests.xml ${testLocation} mv coverage.xml ${coverageLocation} mv .coverage ${coverageLocation} diff --git a/be-python-flask/files/.pre-commit-config.yaml b/be-python-flask/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/be-python-flask/files/.pre-commit-config.yaml +++ b/be-python-flask/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/be-python-flask/files/docker/Dockerfile b/be-python-flask/files/docker/Dockerfile index 66a1b5e30..d5a1fac1a 100644 --- a/be-python-flask/files/docker/Dockerfile +++ b/be-python-flask/files/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi9/python-311 +FROM registry.access.redhat.com/ubi9/python-312 ARG nexusHostWithBasicAuth ARG nexusHostWithoutScheme @@ -8,6 +8,13 @@ COPY run.sh /app/ WORKDIR /app +USER root + +RUN yum -y update && \ + yum clean all + +USER 1001 + RUN if [ ! -z ${nexusHostWithBasicAuth} ]; \ then pip install -i ${nexusHostWithBasicAuth}/repository/pypi-all/simple --trusted-host ${nexusHostWithoutScheme} --upgrade pip && pip install -i ${nexusHostWithBasicAuth}/repository/pypi-all/simple --trusted-host ${nexusHostWithoutScheme} -r requirements.txt; \ else pip install --upgrade pip && pip install -r requirements.txt; \ diff --git a/be-python-flask/files/metadata.yml b/be-python-flask/files/metadata.yml index feacfb6f2..5cbe4d5af 100644 --- a/be-python-flask/files/metadata.yml +++ b/be-python-flask/files/metadata.yml @@ -1,6 +1,6 @@ --- name: Flask -description: "Flask is a micro web framework written in Python. Technologies: Flask 3.0.0, Python 3.11" +description: "Flask is a micro web framework written in Python. Technologies: Flask 3, Python 3.12" supplier: https://www.palletsprojects.com/p/flask/ version: 4.x type: ods diff --git a/be-python-flask/files/requirements.txt b/be-python-flask/files/requirements.txt index 2cde62dfb..759914d9a 100644 --- a/be-python-flask/files/requirements.txt +++ b/be-python-flask/files/requirements.txt @@ -1,2 +1,2 @@ -gunicorn==21.2.0 -flask==3.0.0 +gunicorn==23.0.0 +flask==3.0.3 diff --git a/be-python-flask/files/tests_requirements.txt b/be-python-flask/files/tests_requirements.txt index c5252edcf..97598f743 100644 --- a/be-python-flask/files/tests_requirements.txt +++ b/be-python-flask/files/tests_requirements.txt @@ -1,6 +1,6 @@ -r ./requirements.txt -mypy==1.7.1 -flake8==6.1.0 -pytest==7.4.3 -pytest-cov==4.1.0 +mypy==1.11.1 +flake8==7.1.1 +pytest==8.3.2 +pytest-cov==5.0.0 diff --git a/be-rust-axum/Jenkinsfile.template b/be-rust-axum/Jenkinsfile.template index c3e2ec585..81b80f051 100644 --- a/be-rust-axum/Jenkinsfile.template +++ b/be-rust-axum/Jenkinsfile.template @@ -34,6 +34,9 @@ def stageBuild(def context) { def stageTest(def context) { stage('Cargo Check') { sh """ + cargo --version + cargo nextest --version + cargo llvm-cov --version cargo check --all-targets """ } diff --git a/be-rust-axum/rust-template/.pre-commit-config.yaml b/be-rust-axum/rust-template/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/be-rust-axum/rust-template/.pre-commit-config.yaml +++ b/be-rust-axum/rust-template/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/be-rust-axum/rust-template/Cargo.toml b/be-rust-axum/rust-template/Cargo.toml index 161671955..fa787828b 100644 --- a/be-rust-axum/rust-template/Cargo.toml +++ b/be-rust-axum/rust-template/Cargo.toml @@ -10,14 +10,14 @@ license = "MIT OR Apache-2.0" [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.38", features = ["rt-multi-thread", "macros", "signal"] } +tokio = { version = "1.39", features = ["rt-multi-thread", "macros", "signal"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" http = "1.1" http-body-util = "0.1" -bytes = "1.6" +bytes = "1.7" thiserror = "1.0" @@ -40,9 +40,9 @@ dotenvy = "0.15" # ] } # 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" ] } +# sqlx = { version = "0.8", features = [ "runtime-tokio", "tls-rustls", "postgres", "uuid", "json", "time", "macros", "migrate" ] } [dev-dependencies] -# mockito = "1.4" # mockito is recommended when requiring mocking network requests to either external or internal services +# mockito = "1.5" # 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.4", features = ["util"] } +tower = { version = "0.5", features = ["util"] } diff --git a/be-rust-axum/rust-template/metadata.yml b/be-rust-axum/rust-template/metadata.yml index 0001a2b15..f3771edea 100644 --- a/be-rust-axum/rust-template/metadata.yml +++ b/be-rust-axum/rust-template/metadata.yml @@ -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.7.x, Rust 1.79.0" +description: "Axum is an ergonomic and modular web framework built with Tokio, Tower, and Hyper; written in Rust. Technologies: Axum 0.7.x, Rust 1.80.x" supplier: https://github.com/tokio-rs/axum version: 4.x type: ods diff --git a/be-scala-play/Jenkinsfile b/be-scala-play/Jenkinsfile index 06d5b6499..44319a58f 100644 --- a/be-scala-play/Jenkinsfile +++ b/be-scala-play/Jenkinsfile @@ -19,7 +19,7 @@ odsQuickstarterPipeline( ) { context -> stage("init scala play project") { - sh "sbt -no-colors -v new file://${context.sourceDir}/be-scala-play.g8 --name=${context.componentId} --secret=\$(uuidgen)" + sh "source use-j11.sh && sbt -no-colors -v new file://${context.sourceDir}/be-scala-play.g8 --name=${context.componentId} --secret=\$(uuidgen) && source use-j17.sh" } odsQuickstarterStageCopyFiles(context) diff --git a/be-scala-play/Jenkinsfile.template b/be-scala-play/Jenkinsfile.template index 4db5bd777..1ee73182d 100644 --- a/be-scala-play/Jenkinsfile.template +++ b/be-scala-play/Jenkinsfile.template @@ -22,7 +22,10 @@ odsComponentPipeline( def stageBuild(def context) { stage('Build and Unit Test') { withEnv(["TAGVERSION=${context.tagversion}"]){ - sh "sbt -v clean scalafmtSbtCheck scalafmtCheckAll coverage test coverageReport coverageOff compile:clean copyDockerFiles" + def status = sh(script: "source use-j11.sh && sbt -v clean scalafmtSbtCheck scalafmtCheckAll coverage test coverageReport coverageOff compile:clean copyDockerFiles && source use-j17.sh", returnStatus: true) + if (status != 0) { + error "Build failed!" + } } } } diff --git a/be-scala-play/files/.pre-commit-config.yaml b/be-scala-play/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/be-scala-play/files/.pre-commit-config.yaml +++ b/be-scala-play/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/be-scala-play/files/docker/Dockerfile b/be-scala-play/files/docker/Dockerfile index 8e055ab06..ae273af0a 100644 --- a/be-scala-play/files/docker/Dockerfile +++ b/be-scala-play/files/docker/Dockerfile @@ -1,9 +1,16 @@ -FROM registry.access.redhat.com/ubi8/openjdk-11-runtime:1.15 +FROM registry.access.redhat.com/ubi9/openjdk-11-runtime:1.20 WORKDIR /app COPY lib/* /app/lib/ COPY conf /app/conf/ +USER root + +RUN microdnf upgrade -y && \ + microdnf clean all + +USER 1001 + EXPOSE 8080 ENTRYPOINT ["java", "-Duser.dir=/app", "-XX:+UnlockExperimentalVMOptions", "-cp", "conf/:lib/*"] diff --git a/be-typescript-express/Jenkinsfile b/be-typescript-express/Jenkinsfile index 1cfb95f99..a2f625ee9 100644 --- a/be-typescript-express/Jenkinsfile +++ b/be-typescript-express/Jenkinsfile @@ -15,7 +15,7 @@ node { library("ods-jenkins-shared-library@${sharedLibraryRef}") odsQuickstarterPipeline( - imageStreamTag: "${odsNamespace}/jenkins-agent-nodejs20:${agentImageTag}", + imageStreamTag: "${odsNamespace}/jenkins-agent-nodejs22:${agentImageTag}", ) { context -> stage("init Project") { @@ -24,11 +24,11 @@ odsQuickstarterPipeline( sh "npm init -y" print "Install dependencies" - def typescriptVersion = "5.3.2" - def nodeTypeVersion = "20.10.0" - def expressVersion = "4.18.2" + def typescriptVersion = "5.5.4" + def nodeTypeVersion = "22.4.1" + def expressVersion = "4.19.2" def jestVersion = "29.7.0" - def jestTypeVersion = "29.5.10" + def jestTypeVersion = "29.5.12" def jestJunitVersion = "16.0.0" sh "npm i typescript@$typescriptVersion express@$expressVersion @types/node@$nodeTypeVersion jest@$jestVersion @types/jest@$jestTypeVersion" diff --git a/be-typescript-express/Jenkinsfile.template b/be-typescript-express/Jenkinsfile.template index 1538fbfa7..845c32472 100644 --- a/be-typescript-express/Jenkinsfile.template +++ b/be-typescript-express/Jenkinsfile.template @@ -3,7 +3,7 @@ @Library('ods-jenkins-shared-library@@shared_library_ref@') _ odsComponentPipeline( - imageStreamTag: '@ods_namespace@/jenkins-agent-nodejs20:@agent_image_tag@', + imageStreamTag: '@ods_namespace@/jenkins-agent-nodejs22:@agent_image_tag@', branchToEnvironmentMapping: [ 'master': 'dev', // 'release/': 'test' diff --git a/be-typescript-express/files/.pre-commit-config.yaml b/be-typescript-express/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/be-typescript-express/files/.pre-commit-config.yaml +++ b/be-typescript-express/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/be-typescript-express/files/docker/Dockerfile b/be-typescript-express/files/docker/Dockerfile index 3fd697ee1..799565c84 100644 --- a/be-typescript-express/files/docker/Dockerfile +++ b/be-typescript-express/files/docker/Dockerfile @@ -1,7 +1,11 @@ -FROM node:20-alpine +FROM node:22-alpine COPY dist /node +RUN apk update && \ + apk -i upgrade && \ + apk cache clean + RUN chown -R node: /node EXPOSE 8080 diff --git a/be-typescript-express/files/metadata.yml b/be-typescript-express/files/metadata.yml index 2f0b52dfb..938dac6ba 100644 --- a/be-typescript-express/files/metadata.yml +++ b/be-typescript-express/files/metadata.yml @@ -1,6 +1,6 @@ --- name: TypeScript -description: "TypeScript is an open-source programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript, and adds optional static typing to the language. TypeScript is designed for development of large applications and transcompiles to JavaScript. Technologies: TypeScript 5.x, Node 20" +description: "TypeScript is an open-source programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript, and adds optional static typing to the language. TypeScript is designed for development of large applications and transcompiles to JavaScript. Technologies: TypeScript 5.x, Node 22" supplier: https://www.typescriptlang.org version: 4.x type: ods diff --git a/common/jenkins-agents/golang/docker/Dockerfile.ubi8 b/common/jenkins-agents/golang/docker/Dockerfile.ubi8 index 92faf73a7..08e885aa7 100644 --- a/common/jenkins-agents/golang/docker/Dockerfile.ubi8 +++ b/common/jenkins-agents/golang/docker/Dockerfile.ubi8 @@ -1,7 +1,7 @@ FROM opendevstackorg/ods-jenkins-agent-base-ubi8:latest -ARG goDistributionUrl=https://go.dev/dl/go1.21.3.linux-amd64.tar.gz -ARG golangciVersion=v1.54.2 +ARG goDistributionUrl +ARG golangciVersion RUN yum install -y gcc gcc-c++ @@ -20,8 +20,8 @@ COPY install-golangci-lint.sh /tmp/install-golangci-lint.sh RUN /tmp/install-golangci-lint.sh -b /usr/local/bin $golangciVersion && \ rm -f /tmp/install-golangci-lint.sh -RUN go install github.com/jstemmer/go-junit-report/v2@v2.0.0 +RUN go install github.com/jstemmer/go-junit-report/v2@v2.1.0 -RUN mkdir -p /home/jenkins/go && chmod g+w /home/jenkins/go +RUN mkdir -p /home/jenkins/go && chmod -R g+w /home/jenkins WORKDIR /go diff --git a/common/jenkins-agents/golang/ocp-config/bc.yml b/common/jenkins-agents/golang/ocp-config/bc.yml index 73083aef6..2b102d6b1 100644 --- a/common/jenkins-agents/golang/ocp-config/bc.yml +++ b/common/jenkins-agents/golang/ocp-config/bc.yml @@ -17,8 +17,11 @@ parameters: value: Dockerfile.ubi8 description: Dockerfile variant to use - name: GO_DISTRIBUTION_URL - value: https://go.dev/dl/go1.21.3.linux-amd64.tar.gz + value: https://go.dev/dl/go1.23.0.linux-amd64.tar.gz description: URL pointing to go binary +- name: GOLANG_CI_VERSION + value: v1.60.1 + description: version of go linter runner objects: - apiVersion: build.openshift.io/v1 kind: BuildConfig @@ -59,5 +62,7 @@ objects: buildArgs: - name: goDistributionUrl value: ${GO_DISTRIBUTION_URL} + - name: golangciVersion + value: ${GOLANG_CI_VERSION} type: Docker successfulBuildsHistoryLimit: 5 diff --git a/common/jenkins-agents/jdk/docker/Dockerfile.ubi8 b/common/jenkins-agents/jdk/docker/Dockerfile.ubi8 index de1ae4217..47579a0f9 100644 --- a/common/jenkins-agents/jdk/docker/Dockerfile.ubi8 +++ b/common/jenkins-agents/jdk/docker/Dockerfile.ubi8 @@ -24,41 +24,23 @@ ENV JAVA_TOOL_OPTIONS="-XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryM # COPY certs/* /etc/pki/ca-trust/source/anchors/ # RUN update-ca-trust force-enable && update-ca-trust extract - -COPY yum.repos.d/* /etc/yum.repos.d/ -RUN sh -c "echo 'rhel' > /etc/yum/vars/osname" && \ - sed -i 's@^\s*enabled\s*=.*$@enabled = 1@g' /etc/yum.repos.d/*.repo && \ - sed -i 's@^\s*enabled\s*=.*$@enabled = 0@g' /etc/yum.repos.d/adoptium-temurin.repo && \ - grep -ri '^\s*\(name\|enabled\)\s*=' /etc/yum.repos.d/* - -# Install Java 11, 17, 21 and binutils +# Install Java 11, 21 and binutils (Java 17 comes from base agent) # Note: use java scripts are executed to test the scripts but also use-j11.sh in called 3nd place to set is as default version -RUN yum -y --nobest --skip-broken update && \ - yum install -y java-11-openjdk-devel && \ - yum install -y --enablerepo Adoptium temurin-17-jdk && \ - yum install -y --enablerepo Adoptium temurin-21-jdk && \ - yum install -y binutils && \ - yum updateinfo -y && \ - yum repolist -y && \ - sh -c "yum list installed | grep -i '\(java\|jdk\|temurin\)'" && \ - yum clean all -y && rm -rf /var/cache/yum +RUN yum install -y java-11-openjdk-devel java-21-openjdk-devel binutils && \ + yum clean all -y && \ + rm -rf /var/cache/yum -# Copy use java scripts. +# Copy and use java scripts. COPY use-j*.sh /usr/local/bin/ RUN chmod +x /usr/local/bin/use-j*.sh && \ chmod ugo+s /usr/local/bin/use-j*.sh && \ sh -c 'chmod ugo+s $(which alternatives)' && \ ls -la /usr/local/bin/use-j*.sh && \ echo "--- STARTS JDK 11/17/21 TESTS ---" && \ + use-j11.sh && \ use-j21.sh && \ use-j17.sh && \ - use-j11.sh && \ - echo "--- ENDS JDK 11/17/21 TESTS ---" && \ -## Needed in case base and jdk agents has a mismatch in java versions - rm -fv /etc/profile.d/set-default-java.sh && \ - echo "export JAVA_HOME=/usr/lib/jvm/$(ls -lah /usr/lib/jvm | grep "java-11-openjdk-11.*\.x86_64" | awk '{print $NF}' | head -1)" >> /etc/profile.d/set-default-java.sh && \ - echo "export USE_JAVA_VERSION=java-11" >> /etc/profile.d/set-default-java.sh && \ - chmod +x /etc/profile.d/set-default-java.sh + echo "--- ENDS JDK 11/17/21 TESTS ---" # Set maven (nexus+proxy) and gradle (proxy) settings ENV MAVEN_OPTS="-Duser.home=$HOME" \ @@ -83,9 +65,6 @@ RUN mkdir -p $GRADLE_USER_HOME && \ sed -i "s|__NEXUS_URL|$nexusUrl|gi" $HOME/.m2/settings.xml && \ cat $HOME/.m2/settings.xml -# Set java proxy via JAVA_OPTS -RUN bash -l -c 'echo export JAVA_OPTS="$(/tmp/set_java_proxy.sh && echo $JAVA_OPTS)" >> /etc/bash.bashrc' - RUN chown -R 1001:0 $HOME && \ chmod -R g+rwX $HOME && \ chmod -c 666 /etc/pki/ca-trust/extracted/java/cacerts && \ diff --git a/common/jenkins-agents/jdk/docker/use-j17.sh b/common/jenkins-agents/jdk/docker/use-j17.sh index 706a02915..f2d96ba0b 100644 --- a/common/jenkins-agents/jdk/docker/use-j17.sh +++ b/common/jenkins-agents/jdk/docker/use-j17.sh @@ -1,6 +1,6 @@ #!/bin/bash -JAVA_HOME_FOLDER=$(ls -lah /usr/lib/jvm | grep "temurin-17" | awk '{print $NF}' | head -1) +JAVA_HOME_FOLDER=$(ls -lah /usr/lib/jvm | grep "java-17-openjdk-.*\.x86_64" | awk '{print $NF}' | head -1) JAVA_VERSION="17" function msg_and_exit() { diff --git a/common/jenkins-agents/jdk/docker/use-j21.sh b/common/jenkins-agents/jdk/docker/use-j21.sh index 15a991771..66c9fbae6 100644 --- a/common/jenkins-agents/jdk/docker/use-j21.sh +++ b/common/jenkins-agents/jdk/docker/use-j21.sh @@ -1,6 +1,6 @@ #!/bin/bash -JAVA_HOME_FOLDER=$(ls -lah /usr/lib/jvm | grep "temurin-21" | awk '{print $NF}' | head -1) +JAVA_HOME_FOLDER=$(ls -lah /usr/lib/jvm | grep "java-21-openjdk-.*\.x86_64" | awk '{print $NF}' | head -1) JAVA_VERSION="21" function msg_and_exit() { diff --git a/common/jenkins-agents/jdk/docker/yum.repos.d/adoptium-temurin.repo b/common/jenkins-agents/jdk/docker/yum.repos.d/adoptium-temurin.repo deleted file mode 100644 index 15505da67..000000000 --- a/common/jenkins-agents/jdk/docker/yum.repos.d/adoptium-temurin.repo +++ /dev/null @@ -1,6 +0,0 @@ -[Adoptium] -name=Adoptium -baseurl=https://packages.adoptium.net/artifactory/rpm/$osname/$releasever/$basearch -enabled=1 -gpgcheck=1 -gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public \ No newline at end of file diff --git a/common/jenkins-agents/python/docker/Dockerfile.ubi8 b/common/jenkins-agents/python/docker/Dockerfile.ubi8 index d2f2f0c19..bed9a16f7 100644 --- a/common/jenkins-agents/python/docker/Dockerfile.ubi8 +++ b/common/jenkins-agents/python/docker/Dockerfile.ubi8 @@ -13,10 +13,11 @@ ENV PYTHONUNBUFFERED=1 \ RUN yum module install -y python38:3.8/build && \ yum module install -y python39:3.9/build --allowerasing && \ yum install -y python3.11 python3.11-pip python3.11-devel python3.11-setuptools --allowerasing && \ + yum install -y python3.12 python3.12-pip python3.12-devel python3.12-setuptools --allowerasing && \ yum install -y autoconf automake gcc-c++ openssl-devel libffi-devel && \ yum -y clean all -RUN pipVersions=( pip3.8 pip3.9 pip3.11 ); \ +RUN pipVersions=( pip3.8 pip3.9 pip3.11 pip3.12 ); \ for pipV in "${pipVersions[@]}"; \ do \ if [ ! -z ${nexusHost} ] && [ ! -z ${nexusAuth} ]; \ @@ -26,7 +27,7 @@ RUN pipVersions=( pip3.8 pip3.9 pip3.11 ); \ fi; \ $pipV config set global.cert /etc/ssl/certs/ca-bundle.crt && \ $pipV install --upgrade pip --user && \ - $pipV install virtualenv==20.25.0 setuptools==69.0.2 Cython==3.0.6 pypandoc==1.12; \ + $pipV install virtualenv==20.26.3 setuptools==72.2.0 Cython==3.0.11 pypandoc==1.13; \ done; # Enables default user to access $HOME folder diff --git a/common/jenkins-agents/rust/docker/Dockerfile.ubi8 b/common/jenkins-agents/rust/docker/Dockerfile.ubi8 index dc1282d27..9c07b5a2f 100644 --- a/common/jenkins-agents/rust/docker/Dockerfile.ubi8 +++ b/common/jenkins-agents/rust/docker/Dockerfile.ubi8 @@ -4,12 +4,15 @@ LABEL maintainer="Gerard C.L. " ARG rustVersion ARG rustToolchain +ARG cargoNextestVersion +ARG cargoLlvmCovVersion +ARG cargoGenerateVersion ENV PATH="$HOME/.cargo/bin:$PATH" ENV USER="rust-agent" -ENV CARGO_NEXTEST_VERSION=0.9.72 \ - CARGO_LLVM_COV_VERSION=0.6.11 \ - CARGO_GENERATE_VERSION=0.21.3 +ENV CARGO_NEXTEST_VERSION=${cargoNextestVersion} \ + CARGO_LLVM_COV_VERSION=${cargoLlvmCovVersion} \ + CARGO_GENERATE_VERSION=${cargoGenerateVersion} RUN yum install -y binutils cpp gcc glibc-devel glibc-headers isl kernel-headers libasan libatomic \ libgomp libmpc libpkgconf libubsan libxcrypt-devel llvm-libs pkgconf pkgconf-m4 pkgconf-pkg-config \ diff --git a/common/jenkins-agents/rust/ocp-config/bc.yml b/common/jenkins-agents/rust/ocp-config/bc.yml index bc647ae09..c8df73ea0 100644 --- a/common/jenkins-agents/rust/ocp-config/bc.yml +++ b/common/jenkins-agents/rust/ocp-config/bc.yml @@ -19,11 +19,23 @@ parameters: - name: RUST_VERSION description: "The Rust version" required: true - value: "1.79.0" + value: "1.80.1" - name: RUST_TOOLCHAIN description: "The Rust target toolchain" required: true value: "x86_64-unknown-linux-gnu" +- name: CARGO_NEXTEST_VERSION + description: "The Cargo Nextest testing framework version" + required: true + value: "0.9.72" +- name: CARGO_LLVM_COV_VERSION + description: "The Cargo LLVM Coverage tool version" + required: true + value: "0.6.11" +- name: CARGO_GENERATE_VERSION + description: "The Cargo Generate tool version" + required: true + value: "0.21.3" objects: - apiVersion: build.openshift.io/v1 kind: BuildConfig @@ -63,6 +75,12 @@ objects: value: ${RUST_VERSION} - name: rustToolchain value: ${RUST_TOOLCHAIN} + - name: cargoNextestVersion + value: ${CARGO_NEXTEST_VERSION} + - name: cargoLlvmCovVersion + value: ${CARGO_LLVM_COV_VERSION} + - name: cargoGenerateVersion + value: ${CARGO_GENERATE_VERSION} from: kind: ImageStreamTag name: jenkins-agent-base:${ODS_IMAGE_TAG} diff --git a/common/jenkins-agents/scala/docker/Dockerfile.ubi8 b/common/jenkins-agents/scala/docker/Dockerfile.ubi8 index 92e742aa7..525a570c6 100644 --- a/common/jenkins-agents/scala/docker/Dockerfile.ubi8 +++ b/common/jenkins-agents/scala/docker/Dockerfile.ubi8 @@ -6,35 +6,30 @@ ARG nexusUrl ARG nexusUsername ARG nexusPassword -# Install Java -RUN yum install -y java-11-openjdk-devel && \ - yum clean all -y && \ - exactVersion=$(ls -lah /usr/lib/jvm | grep "java-11-openjdk-11.*\.x86_64" | awk '{print $NF}' | head -1) && \ - alternatives --set java /usr/lib/jvm/${exactVersion}/bin/java && \ - alternatives --set javac /usr/lib/jvm/${exactVersion}/bin/javac && \ - java -version && \ - javac -version && \ -## Needed in case base and scala agents has a mismatch in java versions - rm -fv /etc/profile.d/set-default-java.sh && \ - echo "export JAVA_HOME=/usr/lib/jvm/${exactVersion}" >> /etc/profile.d/set-default-java.sh && \ - echo "export USE_JAVA_VERSION=java-11" >> /etc/profile.d/set-default-java.sh && \ - chmod +x /etc/profile.d/set-default-java.sh -ENV JAVA_HOME=/usr/lib/jvm/jre - # Container support is now integrated in Java 11, the +UseCGroupMemoryLimitForHeap option has been pruned ENV JAVA_TOOL_OPTIONS="-XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true" - -# Install sbt +# Install sbt and java 11 (for retrocompatibility) ENV SBT_VERSION=1.8.2 ENV SBT_CREDENTIALS="$HOME/.sbt/.credentials" RUN rm -f /etc/yum.repos.d/bintray-rpm.repo && \ curl -L https://www.scala-sbt.org/sbt-rpm.repo > sbt-rpm.repo && \ mv sbt-rpm.repo /etc/yum.repos.d/ && \ - yum -y install sbt-$SBT_VERSION && \ + yum -y install sbt-$SBT_VERSION java-11-openjdk-devel && \ yum clean all && \ rm -rf /var/cache/yum +# Copy use java scripts. +COPY use-j*.sh /usr/local/bin/ +RUN chmod +x /usr/local/bin/use-j*.sh && \ + chmod ugo+s /usr/local/bin/use-j*.sh && \ + sh -c 'chmod ugo+s $(which alternatives)' && \ + ls -la /usr/local/bin/use-j*.sh && \ + echo "--- STARTS JDK 11/17 TESTS ---" && \ + use-j11.sh && \ + use-j17.sh && \ + echo "--- ENDS JDK 11/17 TESTS ---" + COPY sbtconfig/repositories $HOME/.sbt/repositories COPY sbtconfig/credentials.sbt $HOME/.sbt/1.0/plugins/credentials.sbt COPY sbtconfig/credentials $HOME/.sbt/.credentials @@ -53,6 +48,21 @@ RUN cat $HOME/.sbt/repositories | sed -e "s|NEXUS_URL|$nexusUrl|g" > $HOME/.sbt/ /tmp/set_sbt_proxy.sh && \ if [ ! -f "/usr/bin/sbt" ]; then echo "sbt path /usr/bin/sbt could not be found"; exit 1 ; fi -RUN chgrp -R 0 $HOME && \ - chmod -R g=u $HOME -USER 1001 +RUN chown -R 1001:0 $HOME && \ + chmod -R g+rwX $HOME && \ + chmod -c 666 /etc/pki/ca-trust/extracted/java/cacerts && \ + ls -la /etc/pki/ca-trust/extracted/java/cacerts + +# temporary java version switch bugfix +USER root +RUN chgrp -R 0 /var/lib/alternatives && \ + chmod -R g=u /var/lib/alternatives && \ + chgrp -R 0 /etc/alternatives && \ + chmod -R g=u /etc/alternatives && \ + chmod -R u+w /usr/bin && \ + chgrp -R 0 /usr/bin && \ + chmod -R g=u /usr/bin && \ + chgrp -R 0 /usr/share/man && \ + chmod -R g=u /usr/share/man + +USER 1001 \ No newline at end of file diff --git a/common/jenkins-agents/scala/docker/use-j11.sh b/common/jenkins-agents/scala/docker/use-j11.sh new file mode 100644 index 000000000..f2eb428a4 --- /dev/null +++ b/common/jenkins-agents/scala/docker/use-j11.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +JAVA_HOME_FOLDER=$(ls -lah /usr/lib/jvm | grep "java-11-openjdk-11.*\.x86_64" | awk '{print $NF}' | head -1) +JAVA_VERSION="11" + +function msg_and_exit() { + echo "ERROR: ${1}" + exit 1 +} + +echo "Switching to java ${JAVA_VERSION}:" +JAVA_HOME="/usr/lib/jvm/${JAVA_HOME_FOLDER}" + +alternatives --set java ${JAVA_HOME}/bin/java || \ + msg_and_exit "Cannot configure java ${JAVA_VERSION} as the alternative to use for java." +java -version 2>&1 | grep -q "\s\+${JAVA_VERSION}" || msg_and_exit "Java version is not ${JAVA_VERSION}." + +if [ -x ${JAVA_HOME}/bin/javac ]; then + alternatives --set javac ${JAVA_HOME}/bin/javac || \ + msg_and_exit "Cannot configure javac ${JAVA_VERSION} as the alternative to use for javac." + javac -version 2>&1 | grep -q "\s\+${JAVA_VERSION}" || msg_and_exit "Javac version is not ${JAVA_VERSION}." +else + echo "WARNING: Not found binary for javac in path ${JAVA_HOME}/bin/javac " +fi + +java -version 2>&1 +if which 'javac'; then + javac -version 2>&1 +else + echo "WARNING: Binary javac is not available." +fi + +if [ -d ${JAVA_HOME}/bin/ ]; then + export JAVA_HOME +else + msg_and_exit "Cannot configure JAVA_HOME environment variable to ${JAVA_HOME}" +fi +echo "JAVA_HOME: $JAVA_HOME" diff --git a/common/jenkins-agents/scala/docker/use-j17.sh b/common/jenkins-agents/scala/docker/use-j17.sh new file mode 100644 index 000000000..f2d96ba0b --- /dev/null +++ b/common/jenkins-agents/scala/docker/use-j17.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +JAVA_HOME_FOLDER=$(ls -lah /usr/lib/jvm | grep "java-17-openjdk-.*\.x86_64" | awk '{print $NF}' | head -1) +JAVA_VERSION="17" + +function msg_and_exit() { + echo "ERROR: ${1}" + exit 1 +} + +echo "Switching to java ${JAVA_VERSION}:" +JAVA_HOME="/usr/lib/jvm/${JAVA_HOME_FOLDER}" + +alternatives --set java ${JAVA_HOME}/bin/java || \ + msg_and_exit "Cannot configure java ${JAVA_VERSION} as the alternative to use for java." +java -version 2>&1 | grep -q "\s\+${JAVA_VERSION}" || msg_and_exit "Java version is not ${JAVA_VERSION}." + +if [ -x ${JAVA_HOME}/bin/javac ]; then + alternatives --set javac ${JAVA_HOME}/bin/javac || \ + msg_and_exit "Cannot configure javac ${JAVA_VERSION} as the alternative to use for javac." + javac -version 2>&1 | grep -q "\s\+${JAVA_VERSION}" || msg_and_exit "Javac version is not ${JAVA_VERSION}." +else + echo "WARNING: Not found binary for javac in path ${JAVA_HOME}/bin/javac " +fi + +java -version 2>&1 +if which 'javac'; then + javac -version 2>&1 +else + echo "WARNING: Binary javac is not available." +fi + +if [ -d ${JAVA_HOME}/bin/ ]; then + export JAVA_HOME +else + msg_and_exit "Cannot configure JAVA_HOME environment variable to ${JAVA_HOME}" +fi +echo "JAVA_HOME: $JAVA_HOME" \ No newline at end of file diff --git a/docker-plain/files/.pre-commit-config.yaml b/docker-plain/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/docker-plain/files/.pre-commit-config.yaml +++ b/docker-plain/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/docs/modules/jenkins-agents/pages/golang.adoc b/docs/modules/jenkins-agents/pages/golang.adoc index 78988f3e8..1f9d012d6 100644 --- a/docs/modules/jenkins-agents/pages/golang.adoc +++ b/docs/modules/jenkins-agents/pages/golang.adoc @@ -7,8 +7,8 @@ The image is built in the global `ods` project and is named `jenkins-agent-golan It can be referenced in a `Jenkinsfile` with e.g. `ods/jenkins-agent-golang:latest`. == Features -1. Go 1.21.x -2. golangci-lint 1.54.x +1. Go 1.23.0 +2. golangci-lint 1.60.1 == Known limitations Not (yet) Nexus package manager aware and no special HTTP Proxy configuration. diff --git a/docs/modules/jenkins-agents/pages/jdk.adoc b/docs/modules/jenkins-agents/pages/jdk.adoc index 9ebf4d218..ee5ae33c5 100644 --- a/docs/modules/jenkins-agents/pages/jdk.adoc +++ b/docs/modules/jenkins-agents/pages/jdk.adoc @@ -10,26 +10,24 @@ It can be referenced in a `Jenkinsfile` with `ods/jenkins-agent-jdk`. . Nexus and HTTP proxy configuration for Maven & Gradle == Supported Java Versions -This agent provides 3 JDKs: `java 11`, `java 17` and `java 21`. +This agent provides 3 JDKs: `java 11`, `java 17` (default) and `java 21`. -For backwards compatibility `java 11` is the default version. Java projects migrating from previous ODS version will not require any change. A migration to `java 17` and `java 21` can be done afterwards. +For backwards compatibility `java 11` is still included. Java projects migrating from previous ODS version will require the use of the bash script `use-j11.sh` to use java 11. A migration to `java 17` and `java 21` can be done afterwards. +To switch the environment to `java 11` the script `use-j11.sh` is provided at the jenkins home folder. To switch the environment to `java 17` the script `use-j17.sh` is provided at the jenkins home folder. To switch the environment to `java 21` the script `use-j21.sh` is provided at the jenkins home folder. Following command shows how the jenkins build script from the springboot quickstarter switches the java version before calling the gradle wrapper: ``` -def status = sh(script: "$HOME/use-j21.sh && ./gradlew clean build --stacktrace --no-daemon && $HOME/use-j11.sh", returnStatus: true) +def status = sh(script: "$HOME/use-j21.sh && ./gradlew clean build --stacktrace --no-daemon && $HOME/use-j17.sh", returnStatus: true) ``` -NOTE: like this example, you will need to switch back to `java 11` after running the gradlew build. This is required because the jdk agent environment still does not support the latest java version. E.g. the `sonar scanner` is not compatible with the latest java version. +NOTE: like this example, you will need to switch back to `java 17` after running the gradlew build. This is required because the jdk agent environment still does not support the latest java version. E.g. the `sonar scanner` is not compatible with the latest java version. == Installed packages Dockerfile.ubi8 installs: -- java-21-openjdk-devel & java-21-openjdk-jmods -- java-17-openjdk-devel & java-17-openjdk-jmods -- java-11-openjdk-devel & java-11-openjdk-jmods - -NOTE: detail about java installed packages can be found in https://centos.pkgs.org +- java-21-openjdk-devel +- java-11-openjdk-devel == Known limitations n/a diff --git a/docs/modules/jenkins-agents/pages/python.adoc b/docs/modules/jenkins-agents/pages/python.adoc index 80587bc61..27287aaa6 100644 --- a/docs/modules/jenkins-agents/pages/python.adoc +++ b/docs/modules/jenkins-agents/pages/python.adoc @@ -6,7 +6,7 @@ This agent is used to build / execute Python code. The image is built in the global `ods` project and is named `jenkins-agent-python`. It can be referenced in a `Jenkinsfile` with `ods/jenkins-agent-python`. -It supports building on **Python** versions: **3.11, 3.9, 3.8 and 3.6**. +It supports building on **Python** versions: **3.12 (default), 3.11, 3.9, 3.8 and 3.6**. **NOTE**: Python 3.6 have reached EOL on 2021-12-23. See https://devguide.python.org/versions/[Python versions] for further information. diff --git a/docs/modules/jenkins-agents/pages/scala.adoc b/docs/modules/jenkins-agents/pages/scala.adoc index d953d97ca..9afae8052 100644 --- a/docs/modules/jenkins-agents/pages/scala.adoc +++ b/docs/modules/jenkins-agents/pages/scala.adoc @@ -11,5 +11,23 @@ It can be referenced in a `Jenkinsfile` with `ods/jenkins-agent-scala`. . HTTP proxy aware . Nexus aware +== Supported Java Versions +This agent provides 1 JDKs: `java 11` and `java 17` (default). + +For backwards compatibility `java 11` is till included. Java projects migrating from previous ODS version will require the use of the bash script `use-j11.sh` to use java 11. A migration to `java 17` can be done afterwards. + +To switch the environment to `java 11` the script `use-j11.sh` is provided at the jenkins home folder. +To switch the environment to `java 17` the script `use-j17.sh` is provided at the jenkins home folder. +Following command shows how the jenkins build script from the scala quickstarter switches the java version before calling the SBT: +``` +def status = sh(script: "$HOME/use-j11.sh && sbt -v clean scalafmtSbtCheck scalafmtCheckAll coverage test coverageReport coverageOff compile:clean copyDockerFiles && $HOME/use-j17.sh", returnStatus: true) +``` +NOTE: like this example, you will need to switch back to `java 17` after running the SBT build. This is required because the scala agent environment still does not support the latest java version. E.g. the `sonar scanner` is not compatible with the java 11. + +== Installed packages + +Dockerfile.ubi8 installs: +- java-11-openjdk-devel + == Known limitations In case HTTP Proxy config is injected through environment variables (including `NO_PROXY`), Nexus configuration is disabled because of an SBT bug. diff --git a/docs/modules/quickstarters/pages/be-gateway-nginx.adoc b/docs/modules/quickstarters/pages/be-gateway-nginx.adoc index b4b1ed37d..b22e34f14 100644 --- a/docs/modules/quickstarters/pages/be-gateway-nginx.adoc +++ b/docs/modules/quickstarters/pages/be-gateway-nginx.adoc @@ -109,9 +109,9 @@ Note that the xref:jenkins-shared-library:labelling.adoc[OpenShift resources wil ```yaml 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.25.3.1-1" +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.2-0" supplier: https://openresty.org -version: 1.25.3.1-1 +version: 1.25.3.2-0 type: ods-service role: integration ``` diff --git a/docs/modules/quickstarters/pages/be-java-springboot.adoc b/docs/modules/quickstarters/pages/be-java-springboot.adoc index 70b9cdfd8..2fca904ed 100644 --- a/docs/modules/quickstarters/pages/be-java-springboot.adoc +++ b/docs/modules/quickstarters/pages/be-java-springboot.adoc @@ -12,9 +12,9 @@ The quickstarter uses the spring boot project generator service hosted by Spring This is implemented in the quickstarter jenkins build script called `Jenkinsfile` (open it to understand the internal of the code generation of this quickstarter). -When provisioning this quickstarter in the provisioning app a spring boot project based on version `3.2.0` will be generated and pushed to your git repository. +When provisioning this quickstarter in the provisioning app a spring boot project based on version `3.3.3` will be generated and pushed to your git repository. -The generated project requires `java 21` and includes the required gradle build and wrapper artifact based on gradle version `8.5`. +The generated project requires `java 21` and includes the required gradle build and wrapper artifact based on gradle version `8.10`. == Project Structure @@ -111,7 +111,7 @@ version: 1.0.1 type: ods role: backend runtime: spring-boot -runtimeVersion: 3.2.0 +runtimeVersion: 3.3.3 ``` == How this quickstarter is built thru jenkins @@ -144,14 +144,14 @@ https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-age == Migration to Java 21 The https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/jdk[jdk builder agent] Jenkins builder agent has installed 3 JDK: `java 11`, `java 17` and `java 21`. -The default version is `java 11`. This makes the agent backwards compatible. +The default version is `java 17`. This makes the agent backwards compatible. If you are migrating an ODS-based spring boot project to `java 21` following instructions provide a some guidance about the typical steps to achieve this: - change the agent version as indicated in https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/jdk[jdk builder agent] -- upgrade the gradle wrapper to version `8.5` running this gradle command at the root folder of your spring project: +- upgrade the gradle wrapper to version `8.10` running this gradle command at the root folder of your spring project: ``` -gradle wrapper --gradle-version 8.5 --distribution-type bin +gradle wrapper --gradle-version 8.10 --distribution-type bin ``` NOTE: this command use just `gradle` instead of the wrapper. diff --git a/docs/modules/quickstarters/pages/be-python-flask.adoc b/docs/modules/quickstarters/pages/be-python-flask.adoc index 75b25e7e3..0651760fc 100644 --- a/docs/modules/quickstarters/pages/be-python-flask.adoc +++ b/docs/modules/quickstarters/pages/be-python-flask.adoc @@ -35,7 +35,7 @@ It contains the basic setup for Docker, Jenkins, SonarQube and OpenShift. == Frameworks used -* https://docs.python.org/3.11[Python 3.11] +* https://docs.python.org/3.12[Python 3.12] * https://gunicorn.org/[gunicorn] * http://flask.pocoo.org/[flask] * https://docs.pytest.org/en/stable/[pytest] @@ -48,9 +48,9 @@ The project is production ready when deployed in OpenShift thanks to gunicorn. It is strongly recommended when you are developing a Python project to use separated environments. For this purpose usually one can use Python's -https://docs.python.org/3.11/library/venv.html[venv] core package (check how to use it in the next steps). +https://docs.python.org/3.12/library/venv.html[venv] core package (check how to use it in the next steps). -NOTE: since the version of Python is 3.11, ensure your system's python executable is also in version 3.11 +NOTE: since the version of Python is 3.12, ensure your system's python executable is also in version 3.12 [source,bash] ---- @@ -118,18 +118,18 @@ include::partials$secret-scanning-with-gitleaks.adoc This quickstarter uses https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/python[Python] builder agent Jenkins builder agent. -**NOTE**: The ODS Jenkins Pytnon Agent supports Python versions 3.11, 3.9 and 3.8. See next chapter for further information. +**NOTE**: The ODS Jenkins Python Agent supports Python versions 3.12, 3.11, 3.9 and 3.8. See next chapter for further information. == Multiple Python versions support -Build and run environment defaults to python3.11, but older python3.8 and python3.6 versions are also supported. +Build and run environment defaults to python3.12, but python3.11, python3.9 and python3.8 versions are also supported. -If you need older versions support in your project, change: +If you need other versions support in your project, change: -* in the provided `Jenkinsfile`, the mentions of `python3.11` binary to, for example, `python3.9` binary, +* in the provided `Jenkinsfile`, the mentions of `python3.12` binary to, for example, `python3.9` binary, -* and switch the `FROM` statement in your `Dockerfile` to the python version required, for example, `registry.access.redhat.com/ubi8/python-38`. +* and switch the `FROM` statement in your `Dockerfile` to the python version required, for example, `registry.access.redhat.com/ubi8/python-39`. == Known limitations diff --git a/docs/modules/quickstarters/pages/be-rust-axum.adoc b/docs/modules/quickstarters/pages/be-rust-axum.adoc index d69659019..f6993f206 100644 --- a/docs/modules/quickstarters/pages/be-rust-axum.adoc +++ b/docs/modules/quickstarters/pages/be-rust-axum.adoc @@ -63,7 +63,7 @@ It contains the basic setup for Docker, Jenkins, SonarQube and OpenShift. == Frameworks used -* https://blog.rust-lang.org/2024/06/13/Rust-1.79.0.html[Rust 1.79.0] +* https://blog.rust-lang.org/2024/08/08/Rust-1.80.1.html[Rust 1.80.1] * https://github.com/tokio-rs/axum[Axum 0.7.x] * https://nexte.st/[Nextest 0.9.x] @@ -131,7 +131,7 @@ version: 1.0.1 type: ods role: backend runtime: rust -runtimeVersion: 1.79.0 +runtimeVersion: 1.80.1 ``` == How this quickstarter is built through Jenkins diff --git a/docs/modules/quickstarters/pages/be-scala-play.adoc b/docs/modules/quickstarters/pages/be-scala-play.adoc index df2db110c..f1dc6ffee 100644 --- a/docs/modules/quickstarters/pages/be-scala-play.adoc +++ b/docs/modules/quickstarters/pages/be-scala-play.adoc @@ -50,7 +50,7 @@ An example Play Web Application is generated with a Controller and some tests. This project is generated by https://www.scala-sbt.org/[SBT] using SBTs template generation via the `new` command. The template used is an adapted version of the official https://github.com/playframework/play-scala-seed.g8[Play Scala Seed Template]. -It will generate a Play Scala project using version 2.8.0 of Play with Scala version 2.13.1. +It will generate a Play Scala project using version 2.8.2 of Play with Scala version 2.13.10. It uses the https://github.com/logstash/logstash-logback-encoder[logstash-logback-encoder] to output logmessages in logstash format. It uses https://scalameta.org/scalafmt[Scalafmt] to check/format the source files consistently. diff --git a/docs/modules/quickstarters/pages/be-typescript-express.adoc b/docs/modules/quickstarters/pages/be-typescript-express.adoc index a33229e99..e6913c9cc 100644 --- a/docs/modules/quickstarters/pages/be-typescript-express.adoc +++ b/docs/modules/quickstarters/pages/be-typescript-express.adoc @@ -2,7 +2,7 @@ == Purpose of this quickstarter (use this when you want to ...) -This is a https://nodejs.org/en/[Node.js] (v20) quickstarter with https://expressjs.com/[express] using http://www.typescriptlang.org/[Typescript]. +This is a https://nodejs.org/en/[Node.js] (v22) quickstarter with https://expressjs.com/[express] using http://www.typescriptlang.org/[Typescript]. If you are doing non-blocking operation and does not have heavy algorithm/Job which consumes lots of CPU power, this could be an ideal fit. It contains a basic setup for https://www.docker.com/[Docker], https://jenkins.io/[Jenkins], https://www.sonarqube.org/[SonarQube] and https://www.openshift.com/[OpenShift]. @@ -33,15 +33,15 @@ The package json is generated by simply using `npm init -y`, while the tsconfig == Frameworks used -. https://expressjs.com/[Express ({caret}4.18.2)] +. https://expressjs.com/[Express ({caret}4.19.2)] . https://jestjs.io/[Jest ({caret}29.7.0) for Unit Testing] -. http://www.typescriptlang.org/[Typescript ({caret}5.3.2)] +. http://www.typescriptlang.org/[Typescript ({caret}5.5.4)] == Libraries On top of the mentioned frameworks above, we use libraries: . https://www.npmjs.com/package/jest-junit/[Jest Junit ({caret}16.0.0)] -. https://www.npmjs.com/package/@types/node[@types/node ({caret}20.10.0)] +. https://www.npmjs.com/package/@types/node[@types/node ({caret}22.4.1)] == Node version When you push your code, your runtime and test code will be compiled using node v10. After deployment the compiled code also runs in node v10. If you developed your code and tests using a different node version locally, this might cause some problems. @@ -76,7 +76,7 @@ version: 1.0.1 type: ods role: backend runtime: node -runtimeVersion: 20 +runtimeVersion: 22 ``` @@ -91,7 +91,7 @@ include::partials$secret-scanning-with-gitleaks.adoc == Builder agent used -This quickstarter uses https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/nodejs20[Node.JS 20 builder agent] for Jenkins. +This quickstarter uses https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/nodejs22[Node.JS 22 builder agent] for Jenkins. == Known limitations diff --git a/docs/modules/quickstarters/pages/ds-streamlit.adoc b/docs/modules/quickstarters/pages/ds-streamlit.adoc index db10b06c4..25c20bbb0 100644 --- a/docs/modules/quickstarters/pages/ds-streamlit.adoc +++ b/docs/modules/quickstarters/pages/ds-streamlit.adoc @@ -35,7 +35,7 @@ Provisions a streamlit based dashboard with authentication. == Frameworks used -* https://docs.python.org/3.11[Python 3.11] +* https://docs.python.org/3.12[Python 3.12] * https://docs.streamlit.io/library/changelog[streamlit] * https://pandas.pydata.org/[pandas] * https://plotly.com/python/[plotly] @@ -46,9 +46,9 @@ The quickstarter sets up in OpenShift a pod with two containers. The main `ds-st It is strongly recommended when you are developing a Python project to use separated environments. For this purpose usually one can use Python's -https://docs.python.org/3.11/library/venv.html[venv] core package (check how to use it in the next steps). +https://docs.python.org/3.12/library/venv.html[venv] core package (check how to use it in the next steps). -NOTE: since the version of Python is 3.11, ensure your system's python executable is also in version 3.11 +NOTE: since the version of Python is 3.12, ensure your system's python executable is also in version 3.12 [source,bash] ---- @@ -75,7 +75,7 @@ version: 1.0.1 type: ods role: dashboard runtime: streamlit -runtimeVersion: 1.29.0 +runtimeVersion: 1.38.0 ``` == How this quickstarter is built through Jenkins diff --git a/docs/modules/quickstarters/pages/e2e-cypress.adoc b/docs/modules/quickstarters/pages/e2e-cypress.adoc index 46c71d706..279575bcd 100644 --- a/docs/modules/quickstarters/pages/e2e-cypress.adoc +++ b/docs/modules/quickstarters/pages/e2e-cypress.adoc @@ -12,32 +12,34 @@ This is a Cypress end-to-end testing project quickstarter with basic setup for h . ├── fixtures │ └── example.json -│── plugins +├── plugins │ └── index.js -│── support +├── reporters +│ └── custom-reporter.js +├── support │ ├── commands.ts +│ ├── e2e.ts │ ├── generic-login.ts -│ ├── index.ts -│ ├── msalv2-login.ts +│ ├── msalv2-login_obsolete.ts │ └── test-evidence.ts ├── tests -| ├── acceptance -│ | └── acceptance.spec.ts -| ├── installation -│ | └── installation.spec.ts -| └── integration -│ └── integration.spec.ts -├── cypress-acceptance.json -├── cypress-installation.json -├── cypress-integration.json +│ ├── acceptance +│ │ └── acceptance.spec.cy.ts +│ ├── installation +│ │ └── installation.spec.cy.ts +│ └── integration +│ └── integration.spec.cy.ts +├── cypress-acceptance.config.ts +├── cypress-installation.config.ts +├── cypress-integration.config.ts +├── cypress.config.ts ├── cypress.env.json.template -├── cypress.json ├── Jenkinsfile ├── .pre-commit-config.yaml ├── metadata.yml - Component metadata -│── package.json +├── package.json ├── README.md -│── release-manager.yml - Configuration file for the Release Manager +├── release-manager.yml - Configuration file for the Release Manager └── tsconfig.json ---- @@ -67,9 +69,9 @@ A more advanced solution could be the use of a custom builder agent, where Cypre [source,docker] ---- # The following FROM tag is informational. It is overwritten by OpenShift. -FROM ods/jenkins-agent-nodejs20:4.x +FROM ods/jenkins-agent-nodejs22:4.x -ARG cypressVersion=13.6.0 +ARG cypressVersion=13.13.1 ARG cypressHash=... USER root @@ -129,8 +131,8 @@ include::partials$secret-scanning-with-gitleaks.adoc == Builder agent used This quickstarter uses -https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/nodejs20[Node.js 20 builder agent] for Jenkins. +https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/nodejs22[Node.js 22 builder agent] for Jenkins. == Known limitations -NA +NA \ No newline at end of file diff --git a/docs/modules/quickstarters/pages/fe-angular.adoc b/docs/modules/quickstarters/pages/fe-angular.adoc index 081245305..89c2c33fb 100644 --- a/docs/modules/quickstarters/pages/fe-angular.adoc +++ b/docs/modules/quickstarters/pages/fe-angular.adoc @@ -72,7 +72,7 @@ version: 1.0.1 type: ods role: frontend runtime: angular-cli -runtimeVersion: 18.0.1 +runtimeVersion: 18.2.1 ``` == How this quickstarter is built through Jenkins diff --git a/ds-jupyter-lab/files/.pre-commit-config.yaml b/ds-jupyter-lab/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/ds-jupyter-lab/files/.pre-commit-config.yaml +++ b/ds-jupyter-lab/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/ds-rshiny/files/.pre-commit-config.yaml b/ds-rshiny/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/ds-rshiny/files/.pre-commit-config.yaml +++ b/ds-rshiny/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/ds-streamlit/Jenkinsfile.template b/ds-streamlit/Jenkinsfile.template index 47dd2a408..8d19dbb10 100644 --- a/ds-streamlit/Jenkinsfile.template +++ b/ds-streamlit/Jenkinsfile.template @@ -33,7 +33,7 @@ def createTestVirtualenv(def context) { stage('Create virtualenv for tests') { sh( script: """ - python3.11 -m venv testvenv + python3.12 -m venv testvenv . ./testvenv/bin/activate pip install --upgrade pip pip install -r test_requirements.txt diff --git a/ds-streamlit/files/.pre-commit-config.yaml b/ds-streamlit/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/ds-streamlit/files/.pre-commit-config.yaml +++ b/ds-streamlit/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/ds-streamlit/files/docker_streamlit/Dockerfile b/ds-streamlit/files/docker_streamlit/Dockerfile index 04f732755..b4cb02997 100644 --- a/ds-streamlit/files/docker_streamlit/Dockerfile +++ b/ds-streamlit/files/docker_streamlit/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi9/python-311 +FROM registry.access.redhat.com/ubi9/python-312 ARG nexusHostWithBasicAuth ARG nexusHostWithoutScheme @@ -17,6 +17,9 @@ USER root RUN mkdir -p /app && \ mkdir -p /app/.streamlit +RUN yum -y update && \ + yum clean all + RUN chown -R 1001:0 /app && \ chmod -R g=u /app diff --git a/ds-streamlit/files/requirements.txt b/ds-streamlit/files/requirements.txt index 4442fb975..c467cf292 100644 --- a/ds-streamlit/files/requirements.txt +++ b/ds-streamlit/files/requirements.txt @@ -1,3 +1,3 @@ -streamlit==1.30.0 -plotly==5.18.0 -pandas==2.1.4 +streamlit==1.38.0 +plotly==5.23.0 +pandas==2.2.2 diff --git a/ds-streamlit/files/test_requirements.txt b/ds-streamlit/files/test_requirements.txt index 3b4425cc7..33ac1f8ab 100644 --- a/ds-streamlit/files/test_requirements.txt +++ b/ds-streamlit/files/test_requirements.txt @@ -1,7 +1,7 @@ -r ./requirements.txt -mypy==1.7.1 -flake8==6.1.0 -pytest==7.4.3 -pytest-cov==4.1.0 -black==23.11.0 +mypy==1.11.1 +flake8==7.1.1 +pytest==8.3.2 +pytest-cov==5.0.0 +black==24.8.0 diff --git a/e2e-cypress/Jenkinsfile b/e2e-cypress/Jenkinsfile index d7984781c..14ffeb667 100644 --- a/e2e-cypress/Jenkinsfile +++ b/e2e-cypress/Jenkinsfile @@ -15,7 +15,7 @@ node { library("ods-jenkins-shared-library@${sharedLibraryRef}") odsQuickstarterPipeline( - imageStreamTag: "${odsNamespace}/jenkins-agent-nodejs20:${agentImageTag}", + imageStreamTag: "${odsNamespace}/jenkins-agent-nodejs22:${agentImageTag}", ) { context -> odsQuickstarterStageCopyFiles(context) diff --git a/e2e-cypress/Jenkinsfile.template b/e2e-cypress/Jenkinsfile.template index d34a4eecf..dff307c88 100644 --- a/e2e-cypress/Jenkinsfile.template +++ b/e2e-cypress/Jenkinsfile.template @@ -11,7 +11,7 @@ odsComponentPipeline( podContainers: [ containerTemplate( name: 'jnlp', - image: "${dockerRegistry}/ods/jenkins-agent-nodejs20:@agent_image_tag@", + image: "${dockerRegistry}/ods/jenkins-agent-nodejs22:@agent_image_tag@", workingDir: '/tmp', envVars: [ envVar(key: 'CYPRESS_RECORD_KEY', value: cypressRecordKey) diff --git a/e2e-cypress/files/.pre-commit-config.yaml b/e2e-cypress/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/e2e-cypress/files/.pre-commit-config.yaml +++ b/e2e-cypress/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/e2e-cypress/files/cypress-acceptance.config.ts b/e2e-cypress/files/cypress-acceptance.config.ts index b5c9c6623..e5be54c48 100644 --- a/e2e-cypress/files/cypress-acceptance.config.ts +++ b/e2e-cypress/files/cypress-acceptance.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from 'cypress' import setupNodeEvents from './plugins/index.js' export default defineConfig({ //projectId: '[Your project ID from Cypress cloud]', - reporter: 'junit', + reporter: 'reporters/custom-reporter.js', reporterOptions: { mochaFile: 'build/test-results/acceptance-junit-[hash].xml', toConsole: true, diff --git a/e2e-cypress/files/cypress-installation.config.ts b/e2e-cypress/files/cypress-installation.config.ts index bee3fc611..75cadcc17 100644 --- a/e2e-cypress/files/cypress-installation.config.ts +++ b/e2e-cypress/files/cypress-installation.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from 'cypress' import setupNodeEvents from './plugins/index.js' export default defineConfig({ //projectId: '[Your project ID from Cypress cloud]', - reporter: 'junit', + reporter: 'reporters/custom-reporter.js', reporterOptions: { mochaFile: 'build/test-results/installation-junit-[hash].xml', toConsole: true, diff --git a/e2e-cypress/files/cypress-integration.config.ts b/e2e-cypress/files/cypress-integration.config.ts index 02f233b29..3dac0e72f 100644 --- a/e2e-cypress/files/cypress-integration.config.ts +++ b/e2e-cypress/files/cypress-integration.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from 'cypress' import setupNodeEvents from './plugins/index.js' export default defineConfig({ //projectId: '[Your project ID from Cypress cloud]', - reporter: 'junit', + reporter: 'reporters/custom-reporter.js', reporterOptions: { mochaFile: 'build/test-results/integration-junit-[hash].xml', toConsole: true, diff --git a/e2e-cypress/files/cypress.config.ts b/e2e-cypress/files/cypress.config.ts index ede6287de..a5274d943 100644 --- a/e2e-cypress/files/cypress.config.ts +++ b/e2e-cypress/files/cypress.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'cypress' import setupNodeEvents from './plugins/index.js' export default defineConfig({ - reporter: 'junit', + reporter: 'reporters/custom-reporter.js', reporterOptions: { mochaFile: 'build/test-results/tests-[hash].xml', toConsole: true, diff --git a/e2e-cypress/files/package.json b/e2e-cypress/files/package.json index f1cbf76a3..37af0e83c 100644 --- a/e2e-cypress/files/package.json +++ b/e2e-cypress/files/package.json @@ -15,16 +15,16 @@ "delete-junit-results": "rimraf build/test-results", "e2e": "npm-run-all delete-junit-results cypress:run-installation cypress:run-integration cypress:run-acceptance", "combine:reports": "npm-run-all junit-installation-report junit-integration-report junit-acceptance-report", - "e2e:jenkins:record": "npm run delete-junit-results && npm run cypress:run-installation --record && npm run cypress:run-integration --record && npm run cypress:run-acceptance --record" + "e2e:jenkins:record": "npm run delete-junit-results && npm run cypress:run-installation -- --record && npm run cypress:run-integration -- --record && npm run cypress:run-acceptance -- --record" }, "private": true, "devDependencies": { - "@types/node": "^20.10.0", - "cypress": "^13.6.0", - "cypress-junit-reporter": "^1.3.1", - "junit-report-merger": "^6.0.3", + "@types/node": "^22.4.1", + "cypress": "^13.13.1", + "junit-report-merger": "^7.0.0", + "mocha-junit-reporter": "^2.2.1", "npm-run-all": "^4.1.5", - "rimraf": "^5.0.5", - "typescript": "^5.3.2" + "rimraf": "^6.0.1", + "typescript": "^5.5.4" } } diff --git a/e2e-cypress/files/reporters/custom-reporter.js b/e2e-cypress/files/reporters/custom-reporter.js new file mode 100644 index 000000000..6b3f2159e --- /dev/null +++ b/e2e-cypress/files/reporters/custom-reporter.js @@ -0,0 +1,37 @@ +'use strict'; + +const MochaJUnitReporter = require('mocha-junit-reporter'); +const fs = require('fs'); +const path = require('path'); + +function CustomJUnitReporter(runner, options) { + // Call the original MochaJUnitReporter constructor + MochaJUnitReporter.call(this, runner, options); +} + +// Inherit from MochaJUnitReporter +CustomJUnitReporter.prototype = Object.create(MochaJUnitReporter.prototype); +CustomJUnitReporter.prototype.constructor = CustomJUnitReporter; + +// Override the getTestcaseData method to include custom logic +CustomJUnitReporter.prototype.getTestcaseData = function(test, err) { + // Call the original getTestcaseData method to get the base data + const testcase = MochaJUnitReporter.prototype.getTestcaseData.call(this, test, err); + + // Define the log file path based on the test title + const logFilePath = path.join('cypress/results', `system-output-${test.fullTitle().replace(/ /g, '_')}.txt`); + + // Check if the log file exists and if so, append its content to the system-out + if (fs.existsSync(logFilePath)) { + const logContent = fs.readFileSync(logFilePath, 'utf-8'); + if (logContent && logContent.length > 0) { + // Append the content of the log file to the system-out section of the test case + testcase.testcase.push({ 'system-out': { _cdata: logContent } }); + } + } + + return testcase; +}; + +module.exports = CustomJUnitReporter; + diff --git a/e2e-cypress/files/support/e2e.ts b/e2e-cypress/files/support/e2e.ts index 7c9f8560c..02c8ec5d6 100644 --- a/e2e-cypress/files/support/e2e.ts +++ b/e2e-cypress/files/support/e2e.ts @@ -5,7 +5,7 @@ function loginViaAAD(username: string, password: string) { //Go to your application URL and trigger the login. cy.visit('') - //If needed, navigate and click on the login button. + //If needed, navigate and click on the login button. //As an example: //cy.get('button#signIn').click() @@ -67,3 +67,26 @@ Cypress.Commands.add('loginToAAD', (username: string, password: string) => { log.snapshot('after') log.end() }) + +let consoleLogs: string[] = [] + +Cypress.on('log:added', (options) => { + const message = options.message; + if(message) { + consoleLogs.push(message); + } +}); + +beforeEach(function() { + consoleLogs = []; +}) + +afterEach(function() { + const testName = this.currentTest.fullTitle().replace(/ /g, '_'); + const fileName = `system-output-${testName}.txt`; + const filePath = `cypress/results/${fileName}`; + + cy.writeFile(filePath, consoleLogs.join('\n')); + + consoleLogs = []; +}) diff --git a/e2e-etl-python/files/modules/codebuild/main.tf b/e2e-etl-python/files/modules/codebuild/main.tf index dbfa2a1c6..a2ef2e6cd 100644 --- a/e2e-etl-python/files/modules/codebuild/main.tf +++ b/e2e-etl-python/files/modules/codebuild/main.tf @@ -40,11 +40,11 @@ resource "aws_codebuild_project" "build_project" { build: commands: - python tests/acceptance/great_expectations/test_preparation/pre_requisites.py - - python utils/checkpoints_executions.py + - python utils/checkpoints_executions.py || error=1 - python tests/acceptance/great_expectations/test_preparation/post_requisites.py - - python -m pytest --alluredir=pytest/test_results/acceptance --junitxml=pytest/test_results/junit/acceptance_pytest_junit.xml tests/acceptance/pytest - - python -m pytest --alluredir=pytest/test_results/installation --junitxml=pytest/test_results/junit/installation_pytest_junit.xml tests/installation - - python -m pytest --alluredir=pytest/test_results/integration --junitxml=pytest/test_results/junit/integration_pytest_junit.xml tests/integration + - python -m pytest --alluredir=pytest/test_results/acceptance --junitxml=pytest/test_results/junit/acceptance_pytest_junit.xml tests/acceptance/pytest || error=1 + - python -m pytest --alluredir=pytest/test_results/installation --junitxml=pytest/test_results/junit/installation_pytest_junit.xml tests/installation || error=1 + - python -m pytest --alluredir=pytest/test_results/integration --junitxml=pytest/test_results/junit/integration_pytest_junit.xml tests/integration || error=1 post_build: commands: diff --git a/e2e-etl-python/files/requirements.txt b/e2e-etl-python/files/requirements.txt index fd149701f..ae73e4e1b 100644 --- a/e2e-etl-python/files/requirements.txt +++ b/e2e-etl-python/files/requirements.txt @@ -12,8 +12,8 @@ pytest-ordering == 0.6 pytest-repeat == 0.9.3 pyspark == 3.5.0 pytz == 2023.3.post1 -snowflake-connector-python == 3.6.0 -cryptography == 41.0.7 +snowflake-connector-python == 3.12.1 +cryptography == 43.0.1 psycopg2-binary == 2.9.1 snowflake-snowpark-python == 1.11.1 diff --git a/e2e-spock-geb/Jenkinsfile.template b/e2e-spock-geb/Jenkinsfile.template index 411e9c376..7e363d92c 100644 --- a/e2e-spock-geb/Jenkinsfile.template +++ b/e2e-spock-geb/Jenkinsfile.template @@ -24,7 +24,7 @@ def stageTest(def context) { stage('Integration Test') { sh (script: "chmod a+x gradle*", label : "allow gradle to execute") withEnv(["TAGVERSION=${context.tagversion}", "NEXUS_HOST=${context.nexusHost}", "NEXUS_USERNAME=${context.nexusUsername}", "NEXUS_PASSWORD=${context.nexusPassword}", "JAVA_OPTS=${javaOpts}","GRADLE_TEST_OPTS=${gradleTestOpts}","ENVIRONMENT=${springBootEnv}","OPENSHIFT_PROJECT=${context.targetProject}","OPENSHIFT_APP_DOMAIN=${context.getOpenshiftApplicationDomain()}"]) { - def status = sh(script: "source use-j17.sh && ./gradlew clean test --stacktrace --no-daemon && source use-j11.sh", returnStatus: true) + def status = sh(script: "./gradlew clean test --stacktrace --no-daemon", returnStatus: true) junit(testResults:"build/test-results/installation*/*.xml, build/test-results/integration*/*.xml, build/test-results/acceptance*/*.xml", allowEmptyResults:true) stash(name: "installation-test-reports-junit-xml-${context.componentId}-${context.buildNumber}", includes: 'build/test-results/installation*/*.xml', allowEmpty: true) stash(name: "integration-test-reports-junit-xml-${context.componentId}-${context.buildNumber}", includes: 'build/test-results/integration*/*.xml', allowEmpty: true) diff --git a/e2e-spock-geb/files/.pre-commit-config.yaml b/e2e-spock-geb/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/e2e-spock-geb/files/.pre-commit-config.yaml +++ b/e2e-spock-geb/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/e2e-spock-geb/files/gradle/wrapper/gradle-wrapper.properties b/e2e-spock-geb/files/gradle/wrapper/gradle-wrapper.properties index a59520664..e1adfb493 100644 --- a/e2e-spock-geb/files/gradle/wrapper/gradle-wrapper.properties +++ b/e2e-spock-geb/files/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/fe-angular/Jenkinsfile b/fe-angular/Jenkinsfile index 2856fd5e9..e6435ab7b 100644 --- a/fe-angular/Jenkinsfile +++ b/fe-angular/Jenkinsfile @@ -14,7 +14,7 @@ node { library("ods-jenkins-shared-library@${sharedLibraryRef}") -def angularCliVersion = "18.0.1" +def angularCliVersion = "18.2.1" odsQuickstarterPipeline( imageStreamTag: "${odsNamespace}/jenkins-agent-nodejs22:${agentImageTag}", diff --git a/fe-angular/files/.pre-commit-config.yaml b/fe-angular/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/fe-angular/files/.pre-commit-config.yaml +++ b/fe-angular/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/fe-angular/files/docker/Dockerfile b/fe-angular/files/docker/Dockerfile index fd514fadc..6b121d220 100644 --- a/fe-angular/files/docker/Dockerfile +++ b/fe-angular/files/docker/Dockerfile @@ -1,4 +1,8 @@ -FROM nginx:1.26.0-alpine +FROM nginx:1.27.1-alpine + +RUN apk update && \ + apk -i upgrade && \ + apk cache clean RUN chmod -R 777 /var/log/nginx /var/cache/nginx /var/run \ && chgrp -R 0 /etc/nginx \ diff --git a/fe-angular/files/metadata.yml b/fe-angular/files/metadata.yml index ac9aea96e..583efd1d0 100644 --- a/fe-angular/files/metadata.yml +++ b/fe-angular/files/metadata.yml @@ -1,6 +1,6 @@ --- name: Angular -description: "Angular is a TypeScript-based open-source web application framework led by the Angular Team at Google and by a community of individuals and corporations. Technologies: Angular 18.0.1" +description: "Angular is a TypeScript-based open-source web application framework led by the Angular Team at Google and by a community of individuals and corporations. Technologies: Angular 18.2.1" supplier: https://angular.io version: 4.x type: ods diff --git a/fe-ionic/files/.pre-commit-config.yaml b/fe-ionic/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/fe-ionic/files/.pre-commit-config.yaml +++ b/fe-ionic/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/fe-ionic/files/docker/Dockerfile b/fe-ionic/files/docker/Dockerfile index e6e0229f6..6b121d220 100644 --- a/fe-ionic/files/docker/Dockerfile +++ b/fe-ionic/files/docker/Dockerfile @@ -1,4 +1,8 @@ -FROM nginx:1.25.3-alpine +FROM nginx:1.27.1-alpine + +RUN apk update && \ + apk -i upgrade && \ + apk cache clean RUN chmod -R 777 /var/log/nginx /var/cache/nginx /var/run \ && chgrp -R 0 /etc/nginx \ diff --git a/inf-terraform-aws/files/.pre-commit-config.yaml b/inf-terraform-aws/files/.pre-commit-config.yaml index 921ce09aa..9acbcd4e9 100644 --- a/inf-terraform-aws/files/.pre-commit-config.yaml +++ b/inf-terraform-aws/files/.pre-commit-config.yaml @@ -3,7 +3,7 @@ fail_fast: true repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks - repo: https://github.com/pre-commit/pre-commit-hooks.git diff --git a/inf-terraform-azure/files/.pre-commit-config.yaml b/inf-terraform-azure/files/.pre-commit-config.yaml index 248faf615..108f29478 100644 --- a/inf-terraform-azure/files/.pre-commit-config.yaml +++ b/inf-terraform-azure/files/.pre-commit-config.yaml @@ -2,7 +2,7 @@ exclude: .terraform fail_fast: true repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks - repo: https://github.com/pre-commit/pre-commit-hooks.git diff --git a/release-manager/files/.pre-commit-config.yaml b/release-manager/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/release-manager/files/.pre-commit-config.yaml +++ b/release-manager/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks diff --git a/saas-documentation/files/.pre-commit-config.yaml b/saas-documentation/files/.pre-commit-config.yaml index c9528f476..f1f8f73f5 100644 --- a/saas-documentation/files/.pre-commit-config.yaml +++ b/saas-documentation/files/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.1 + rev: v8.18.4 hooks: - id: gitleaks