Skip to content

Commit

Permalink
Merge branch 'master' into docker-plain-helm-chart
Browse files Browse the repository at this point in the history
  • Loading branch information
BraisVQ authored Sep 5, 2024
2 parents b64fd82 + 4d69f70 commit 4b74140
Show file tree
Hide file tree
Showing 95 changed files with 488 additions and 238 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog-enforcer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected].6
- uses: actions/[email protected].7
- uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: 'CHANGELOG.md'
Expand Down
30 changes: 17 additions & 13 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/[email protected].6
uses: actions/[email protected].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:
Expand All @@ -23,7 +24,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/[email protected].6
uses: actions/[email protected].7
-
name: Build docker image
working-directory: common/jenkins-agents/jdk/docker
Expand All @@ -40,7 +41,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/[email protected].6
uses: actions/[email protected].7
-
name: Build docker image
working-directory: common/jenkins-agents/nodejs16/docker
Expand All @@ -56,7 +57,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/[email protected].6
uses: actions/[email protected].7
-
name: Build docker image
working-directory: common/jenkins-agents/nodejs18/docker
Expand All @@ -72,7 +73,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/[email protected].6
uses: actions/[email protected].7
-
name: Build docker image
working-directory: common/jenkins-agents/nodejs20/docker
Expand All @@ -88,7 +89,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/[email protected].6
uses: actions/[email protected].7
-
name: Build docker image
working-directory: common/jenkins-agents/nodejs22/docker
Expand All @@ -104,7 +105,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/[email protected].6
uses: actions/[email protected].7
-
name: Build docker image
working-directory: common/jenkins-agents/python/docker
Expand All @@ -117,14 +118,17 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/[email protected].6
uses: actions/[email protected].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:
Expand All @@ -133,7 +137,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/[email protected].6
uses: actions/[email protected].7
-
name: Build docker image
working-directory: common/jenkins-agents/terraform/docker
Expand All @@ -146,7 +150,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/[email protected].6
uses: actions/[email protected].7
-
name: Build docker image
working-directory: common/jenkins-agents/terraform-2306/docker
Expand All @@ -159,7 +163,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/[email protected].6
uses: actions/[email protected].7
-
name: Build docker image
working-directory: common/jenkins-agents/scala/docker
Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion be-fe-mono-repo-plain/files/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.1
rev: v8.18.4
hooks:
- id: gitleaks
4 changes: 4 additions & 0 deletions be-fe-mono-repo-plain/files/docker_be/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)\""]
4 changes: 4 additions & 0 deletions be-fe-mono-repo-plain/files/docker_fe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)\""]
2 changes: 1 addition & 1 deletion be-gateway-nginx/files/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.1
rev: v8.18.4
hooks:
- id: gitleaks
5 changes: 4 additions & 1 deletion be-gateway-nginx/files/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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 && \
Expand Down
2 changes: 1 addition & 1 deletion be-gateway-nginx/files/metadata.yml
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.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
2 changes: 1 addition & 1 deletion be-golang-plain/files/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.1
rev: v8.18.4
hooks:
- id: gitleaks
4 changes: 4 additions & 0 deletions be-golang-plain/files/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
8 changes: 6 additions & 2 deletions be-java-springboot/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ def odsGitRef = ''
def odsImageTag = ''
def sharedLibraryRef = ''
def agentImageTag = ''
def javaVersion = '21'

node {
odsNamespace = env.ODS_NAMESPACE ?: 'ods'
Expand All @@ -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 \
Expand All @@ -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} \
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion be-java-springboot/Jenkinsfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
}
Expand Down
2 changes: 1 addition & 1 deletion be-java-springboot/files/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.1
rev: v8.18.4
hooks:
- id: gitleaks
7 changes: 7 additions & 0 deletions be-java-springboot/files/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
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.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion be-java-springboot/files/metadata.yml
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 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
4 changes: 2 additions & 2 deletions be-python-flask/Jenkinsfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion be-python-flask/files/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.1
rev: v8.18.4
hooks:
- id: gitleaks
Loading

0 comments on commit 4b74140

Please sign in to comment.