From d168e63d90772756e788d6d47ae7f2140ef1524c Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Tue, 20 Aug 2024 17:53:22 +0200 Subject: [PATCH 1/2] Update Quickstarters --- CHANGELOG.md | 1 + Makefile | 16 +++++++++++++--- be-typescript-express/Jenkinsfile | 10 +++++----- be-typescript-express/Jenkinsfile.template | 2 +- be-typescript-express/files/docker/Dockerfile | 2 +- be-typescript-express/files/metadata.yml | 2 +- .../pages/be-typescript-express.adoc | 12 ++++++------ docs/modules/quickstarters/pages/fe-angular.adoc | 2 +- fe-angular/Jenkinsfile | 2 +- fe-angular/files/docker/Dockerfile | 2 +- fe-angular/files/metadata.yml | 2 +- fe-ionic/files/docker/Dockerfile | 2 +- 12 files changed, 33 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 121227873..f9f65dee5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Update Rust Axum Quickstarter ([#1024](https://github.com/opendevstack/ods-quickstarters/pull/1024)) - 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)) +- Update Angular, Ionic and Typescript Quickstarters ([#1033](https://github.com/opendevstack/ods-quickstarters/issues/1033)) ### 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-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/docker/Dockerfile b/be-typescript-express/files/docker/Dockerfile index 3fd697ee1..3c5d42d02 100644 --- a/be-typescript-express/files/docker/Dockerfile +++ b/be-typescript-express/files/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-alpine +FROM node:22-alpine COPY dist /node 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/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/fe-angular.adoc b/docs/modules/quickstarters/pages/fe-angular.adoc index 081245305..c381d7896 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.0 ``` == How this quickstarter is built through Jenkins diff --git a/fe-angular/Jenkinsfile b/fe-angular/Jenkinsfile index 2856fd5e9..f344b149c 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.0" odsQuickstarterPipeline( imageStreamTag: "${odsNamespace}/jenkins-agent-nodejs22:${agentImageTag}", diff --git a/fe-angular/files/docker/Dockerfile b/fe-angular/files/docker/Dockerfile index fd514fadc..9818c78cf 100644 --- a/fe-angular/files/docker/Dockerfile +++ b/fe-angular/files/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM nginx:1.26.0-alpine +FROM nginx:1.27.1-alpine 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..38803aef4 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.0" supplier: https://angular.io version: 4.x type: ods diff --git a/fe-ionic/files/docker/Dockerfile b/fe-ionic/files/docker/Dockerfile index e6e0229f6..9818c78cf 100644 --- a/fe-ionic/files/docker/Dockerfile +++ b/fe-ionic/files/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM nginx:1.25.3-alpine +FROM nginx:1.27.1-alpine RUN chmod -R 777 /var/log/nginx /var/cache/nginx /var/run \ && chgrp -R 0 /etc/nginx \ From 4b1b435a466fef6ead67c04c40e451ee610363d9 Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Thu, 29 Aug 2024 09:14:24 +0200 Subject: [PATCH 2/2] Update angular version --- CHANGELOG.md | 2 +- docs/modules/quickstarters/pages/fe-angular.adoc | 2 +- fe-angular/Jenkinsfile | 2 +- fe-angular/files/metadata.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9f65dee5..274c555a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,10 @@ ## Unreleased +- Update Angular, Ionic and Typescript Quickstarters ([#1033](https://github.com/opendevstack/ods-quickstarters/issues/1033)) - Update Rust Axum Quickstarter ([#1024](https://github.com/opendevstack/ods-quickstarters/pull/1024)) - 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)) -- Update Angular, Ionic and Typescript Quickstarters ([#1033](https://github.com/opendevstack/ods-quickstarters/issues/1033)) ### Added diff --git a/docs/modules/quickstarters/pages/fe-angular.adoc b/docs/modules/quickstarters/pages/fe-angular.adoc index c381d7896..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.2.0 +runtimeVersion: 18.2.1 ``` == How this quickstarter is built through Jenkins diff --git a/fe-angular/Jenkinsfile b/fe-angular/Jenkinsfile index f344b149c..e6435ab7b 100644 --- a/fe-angular/Jenkinsfile +++ b/fe-angular/Jenkinsfile @@ -14,7 +14,7 @@ node { library("ods-jenkins-shared-library@${sharedLibraryRef}") -def angularCliVersion = "18.2.0" +def angularCliVersion = "18.2.1" odsQuickstarterPipeline( imageStreamTag: "${odsNamespace}/jenkins-agent-nodejs22:${agentImageTag}", diff --git a/fe-angular/files/metadata.yml b/fe-angular/files/metadata.yml index 38803aef4..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.2.0" +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