diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c5ab4c48..3c3ee692d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Maintenance for Golang Agent and QuickStarter ([#955](https://github.com/opendevstack/ods-quickstarters/issues/955)) - jenkins agents can not import private keys into gpg keyring to use with helm secrets ([#945](https://github.com/opendevstack/ods-quickstarters/issues/945)) - Streamlit quickstarter build fails to import nexus host certificates into truststore ([#951](https://github.com/opendevstack/ods-quickstarters/issues/951)) +- Update Angular, TypeScript, Cypress and Ionic quickstarters ([#962](https://github.com/opendevstack/ods-quickstarters/issues/962)) ## [4.3.0] - 2023-07-13 diff --git a/be-typescript-express/Jenkinsfile b/be-typescript-express/Jenkinsfile index 9a0627478..1cfb95f99 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-nodejs18:${agentImageTag}", + imageStreamTag: "${odsNamespace}/jenkins-agent-nodejs20:${agentImageTag}", ) { context -> stage("init Project") { @@ -24,13 +24,14 @@ odsQuickstarterPipeline( sh "npm init -y" print "Install dependencies" - def typescriptVersion = "5.0.2" - def nodeTypeVersion = "18.15.10" + def typescriptVersion = "5.3.2" + def nodeTypeVersion = "20.10.0" def expressVersion = "4.18.2" - def jestVersion = "29.5.0" - def jestJunitVersion = "15.0.0" + def jestVersion = "29.7.0" + def jestTypeVersion = "29.5.10" + def jestJunitVersion = "16.0.0" - sh "npm i typescript@$typescriptVersion express@$expressVersion @types/node@$nodeTypeVersion jest@$jestVersion @types/jest@$jestVersion" + sh "npm i typescript@$typescriptVersion express@$expressVersion @types/node@$nodeTypeVersion jest@$jestVersion @types/jest@$jestTypeVersion" sh "npm i jest-junit@$jestJunitVersion --save-dev" print "Generate ts config file. Skip library check and redirect transpiled ts files to dist folder." diff --git a/be-typescript-express/Jenkinsfile.template b/be-typescript-express/Jenkinsfile.template index a92954c09..1538fbfa7 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-nodejs18:@agent_image_tag@', + imageStreamTag: '@ods_namespace@/jenkins-agent-nodejs20:@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 1bb55581e..3fd697ee1 100644 --- a/be-typescript-express/files/docker/Dockerfile +++ b/be-typescript-express/files/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine +FROM node:20-alpine COPY dist /node diff --git a/be-typescript-express/files/metadata.yml b/be-typescript-express/files/metadata.yml index 63aa292fc..2f0b52dfb 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 unpinned, Node 10.18" +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" supplier: https://www.typescriptlang.org version: 4.x type: ods diff --git a/docs/modules/jenkins-agents/pages/nodejs20.adoc b/docs/modules/jenkins-agents/pages/nodejs20.adoc new file mode 100644 index 000000000..bb8905e7d --- /dev/null +++ b/docs/modules/jenkins-agents/pages/nodejs20.adoc @@ -0,0 +1,17 @@ += Node.js 20 - Jenkins agent + +== Introduction +This agent is used to build Node.js-based projects, through `npm` or `yarn`. + +The image is built in the global `ods` project and is named `jenkins-agent-nodejs20`. +It can be referenced in a `Jenkinsfile` with `ods/jenkins-agent-nodejs20`. + +IMPORTANT: Node.js version 20 reaches end-of-life in 2026-04-30. Support for this version will be removed in releases after this date. Please consider switching to newer versions of this agent as soon as they are available. + +== Features +1. Nexus configuration +2. HTTP proxy awareness +3. Yarn & Cypress dependencies pre-installed + +== Known limitations +n/a diff --git a/docs/modules/quickstarters/nav.adoc b/docs/modules/quickstarters/nav.adoc index ca4754081..aa21d85d9 100644 --- a/docs/modules/quickstarters/nav.adoc +++ b/docs/modules/quickstarters/nav.adoc @@ -24,6 +24,7 @@ *** xref:jenkins-agents:nodejs12.adoc[Node.js 12] *** xref:jenkins-agents:nodejs16.adoc[Node.js 16] *** xref:jenkins-agents:nodejs18.adoc[Node.js 18] +*** xref:jenkins-agents:nodejs20.adoc[Node.js 20] *** xref:jenkins-agents:python.adoc[Python] *** xref:jenkins-agents:scala.adoc[Scala] ** xref:quickstarters:authoring-quickstarters.adoc[Authoring Quickstarters] diff --git a/docs/modules/quickstarters/pages/be-typescript-express.adoc b/docs/modules/quickstarters/pages/be-typescript-express.adoc index 3c438a5c9..0e731f0cf 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] (v18) quickstarter with https://expressjs.com/[express] using http://www.typescriptlang.org/[Typescript]. +This is a https://nodejs.org/en/[Node.js] (v20) 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]. @@ -34,14 +34,14 @@ 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://jestjs.io/[Jest ({caret}29.5.0) for Unit Testing] -. http://www.typescriptlang.org/[Typescript ({caret}5.0.2)] +. https://jestjs.io/[Jest ({caret}29.7.0) for Unit Testing] +. http://www.typescriptlang.org/[Typescript ({caret}5.3.2)] == Libraries On top of the mentioned frameworks above, we use libraries: -. https://www.npmjs.com/package/jest-junit/[Jest Junit ({caret}15.0.0)] -. https://www.npmjs.com/package/@types/node[@types/node ({caret}18.15.10)] +. 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)] == 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: 18 +runtimeVersion: 20 ``` @@ -91,7 +91,7 @@ include::partial$secret-scanning-with-gitleaks.adoc == Builder agent used -This quickstarter uses https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/nodejs18[Node.JS 18 builder agent] for Jenkins. +This quickstarter uses https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/nodejs20[Node.JS 20 builder agent] for Jenkins. == Known limitations diff --git a/docs/modules/quickstarters/pages/e2e-cypress.adoc b/docs/modules/quickstarters/pages/e2e-cypress.adoc index e5ea7da95..c43c1e767 100644 --- a/docs/modules/quickstarters/pages/e2e-cypress.adoc +++ b/docs/modules/quickstarters/pages/e2e-cypress.adoc @@ -67,9 +67,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-nodejs18:4.x +FROM ods/jenkins-agent-nodejs20:4.x -ARG cypressVersion=12.9.0 +ARG cypressVersion=13.6.0 ARG cypressHash=... USER root @@ -129,7 +129,7 @@ include::partial$secret-scanning-with-gitleaks.adoc == Builder agent used This quickstarter uses -https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/nodejs18[Node.js 18 builder agent] for Jenkins. +https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/nodejs20[Node.js 20 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 afede7676..476137cd7 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: 15.2.7 +runtimeVersion: 17.0.3 ``` == How this quickstarter is built through Jenkins @@ -91,7 +91,7 @@ include::partial$secret-scanning-with-gitleaks.adoc == Builder agent used -This quickstarter uses https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/nodejs18[Node.js 18 builder agent] for Jenkins. +This quickstarter uses https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/nodejs20[Node.js 20 builder agent] for Jenkins. == Known limitations diff --git a/docs/modules/quickstarters/pages/fe-ionic.adoc b/docs/modules/quickstarters/pages/fe-ionic.adoc index 87228738e..a03ecbff1 100644 --- a/docs/modules/quickstarters/pages/fe-ionic.adoc +++ b/docs/modules/quickstarters/pages/fe-ionic.adoc @@ -4,7 +4,7 @@ Ionic quickstarter project == Purpose of this quickstarter -This quickstarter generates an *Ionic 6.19.0* project, you can use it when you want to develop a cross platform mobile app (iOS, android and PWA) in one codebase using Web technologies like CSS, HTML and JavaScript/TypeScript. +This quickstarter generates an *Ionic 7.1.5* project, you can use it when you want to develop a cross platform mobile app (iOS, android and PWA) in one codebase using Web technologies like CSS, HTML and JavaScript/TypeScript. It contains the basic setup for https://www.docker.com/[Docker], https://jenkins.io/[Jenkins], https://www.sonarqube.org/[SonarQube] and https://www.openshift.com/[OpenShift], so you have your CI/CD process out of the box. @@ -98,10 +98,10 @@ Note that the xref:jenkins-shared-library:labelling.adoc[OpenShift resources wil name: Ionic component: frontend instance: -description: "Ionic Framework is the free, open source mobile UI toolkit for developing high-quality cross-platform apps for native iOS, Android, and the web—all from a single codebase. Technologies: Ionic 6.19.x" +description: "Ionic Framework is the free, open source mobile UI toolkit for developing high-quality cross-platform apps for native iOS, Android, and the web—all from a single codebase. Technologies: Ionic 7.1.5" supplier: https://ionicframework.com type: ods -version: 6.19.x +version: 7.1.5 ``` == How this quickstarter is built thru Jenkins @@ -119,7 +119,7 @@ include::partial$secret-scanning-with-gitleaks.adoc == Builder agent used -This quickstarter uses https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/nodejs16[Node.js 16 builder agent] for Jenkins. +This quickstarter uses https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/nodejs20[Node.js 20 builder agent] for Jenkins. == Known Limitation diff --git a/e2e-cypress/Jenkinsfile b/e2e-cypress/Jenkinsfile index 3e629d125..d7984781c 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-nodejs18:${agentImageTag}", + imageStreamTag: "${odsNamespace}/jenkins-agent-nodejs20:${agentImageTag}", ) { context -> odsQuickstarterStageCopyFiles(context) diff --git a/e2e-cypress/Jenkinsfile.template b/e2e-cypress/Jenkinsfile.template index 7a27b076b..d34a4eecf 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-nodejs18:@shared_library_ref@", + image: "${dockerRegistry}/ods/jenkins-agent-nodejs20:@agent_image_tag@", workingDir: '/tmp', envVars: [ envVar(key: 'CYPRESS_RECORD_KEY', value: cypressRecordKey) diff --git a/e2e-cypress/files/metadata.yml b/e2e-cypress/files/metadata.yml index 9fdda0324..21666a71d 100644 --- a/e2e-cypress/files/metadata.yml +++ b/e2e-cypress/files/metadata.yml @@ -1,6 +1,6 @@ --- name: Cypress -description: "Cypress is a JavaScript-based end-to-end testing framework. It is built on top of Mocha, which is again a feature-rich JavaScript test framework running on and in the browser, making asynchronous testing simple and fun. Technologies: Cypress 9.5, TypeScript 4.6" +description: "Cypress is a JavaScript-based end-to-end testing framework. It is built on top of Mocha, which is again a feature-rich JavaScript test framework running on and in the browser, making asynchronous testing simple and fun. Technologies: Cypress 13.x, TypeScript 5.x" supplier: https://www.cypress.io version: 4.x type: ods-test diff --git a/e2e-cypress/files/package.json b/e2e-cypress/files/package.json index 02f05932a..f1cbf76a3 100644 --- a/e2e-cypress/files/package.json +++ b/e2e-cypress/files/package.json @@ -19,12 +19,12 @@ }, "private": true, "devDependencies": { - "@types/node": "^17.0.23", - "cypress": "^12.9.0", + "@types/node": "^20.10.0", + "cypress": "^13.6.0", "cypress-junit-reporter": "^1.3.1", - "junit-report-merger": "^5.0.0", + "junit-report-merger": "^6.0.3", "npm-run-all": "^4.1.5", - "rimraf": "^3.0.2", - "typescript": "^4.6.3" + "rimraf": "^5.0.5", + "typescript": "^5.3.2" } } diff --git a/fe-angular/Jenkinsfile b/fe-angular/Jenkinsfile index 83387b558..4be64b1ac 100644 --- a/fe-angular/Jenkinsfile +++ b/fe-angular/Jenkinsfile @@ -14,10 +14,10 @@ node { library("ods-jenkins-shared-library@${sharedLibraryRef}") -def angularCliVersion = "15.2.7" +def angularCliVersion = "17.0.3" odsQuickstarterPipeline( - imageStreamTag: "${odsNamespace}/jenkins-agent-nodejs18:${agentImageTag}", + imageStreamTag: "${odsNamespace}/jenkins-agent-nodejs20:${agentImageTag}", ) { context -> stage("update angular cli") { diff --git a/fe-angular/Jenkinsfile.template b/fe-angular/Jenkinsfile.template index 0641949db..cfdcc5250 100644 --- a/fe-angular/Jenkinsfile.template +++ b/fe-angular/Jenkinsfile.template @@ -3,7 +3,7 @@ @Library('ods-jenkins-shared-library@@shared_library_ref@') _ odsComponentPipeline( - imageStreamTag: '@ods_namespace@/jenkins-agent-nodejs18:@agent_image_tag@', + imageStreamTag: '@ods_namespace@/jenkins-agent-nodejs20:@agent_image_tag@', branchToEnvironmentMapping: [ 'master': 'dev', // 'release/': 'test' diff --git a/fe-angular/files/docker/Dockerfile b/fe-angular/files/docker/Dockerfile index 91b9a6463..e6e0229f6 100644 --- a/fe-angular/files/docker/Dockerfile +++ b/fe-angular/files/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM nginx:1.24.0-alpine +FROM nginx:1.25.3-alpine RUN chmod -R 777 /var/log/nginx /var/cache/nginx /var/run \ && chgrp -R 0 /etc/nginx \ diff --git a/fe-angular/files/docker/nginx.vh.default.conf.nginx b/fe-angular/files/docker/nginx.vh.default.conf.nginx index 672aef6a8..7ddbaa502 100644 --- a/fe-angular/files/docker/nginx.vh.default.conf.nginx +++ b/fe-angular/files/docker/nginx.vh.default.conf.nginx @@ -30,7 +30,7 @@ server { server_tokens off; location / { - root /docroot; + root /docroot/browser; index index.html; # this is for angular try_files $uri$args $uri$args/ $uri $uri/ /index.html =404; diff --git a/fe-angular/files/metadata.yml b/fe-angular/files/metadata.yml index acf5d9606..23193b1ad 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 8.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 17.0.3" supplier: https://angular.io version: 4.x type: ods diff --git a/fe-ionic/Jenkinsfile b/fe-ionic/Jenkinsfile index 3553f6844..070d4756d 100644 --- a/fe-ionic/Jenkinsfile +++ b/fe-ionic/Jenkinsfile @@ -14,10 +14,10 @@ node { library("ods-jenkins-shared-library@${sharedLibraryRef}") -def ionicVersion = "7.1.1" +def ionicVersion = "7.1.5" odsQuickstarterPipeline( - imageStreamTag: "${odsNamespace}/jenkins-agent-nodejs18:${agentImageTag}", + imageStreamTag: "${odsNamespace}/jenkins-agent-nodejs20:${agentImageTag}", resourceRequestMemory: '1Gi', resourceLimitMemory: '2Gi', ) { context -> diff --git a/fe-ionic/Jenkinsfile.template b/fe-ionic/Jenkinsfile.template index 7ebd6010a..68ca3909a 100644 --- a/fe-ionic/Jenkinsfile.template +++ b/fe-ionic/Jenkinsfile.template @@ -3,7 +3,7 @@ @Library('ods-jenkins-shared-library@@shared_library_ref@') _ odsComponentPipeline( - imageStreamTag: '@ods_namespace@/jenkins-agent-nodejs18:@agent_image_tag@', + imageStreamTag: '@ods_namespace@/jenkins-agent-nodejs20:@agent_image_tag@', branchToEnvironmentMapping: [ 'master': 'dev', // 'release/': 'test' @@ -22,7 +22,7 @@ odsComponentPipeline( def stageBuild(def context) { stage('Build') { withEnv(["TAGVERSION=${context.tagversion}", "NEXUS_HOST=${context.nexusHost}"]) { - sh 'npm i -g @ionic/cli@7.1.1' + sh 'npm i -g @ionic/cli@7.1.5' sh 'npm install' if ('master'.equals(context.gitBranch)) { sh 'ionic build --prod' diff --git a/fe-ionic/files/README.md b/fe-ionic/files/README.md index 8a3c798d3..2a2571cc2 100644 --- a/fe-ionic/files/README.md +++ b/fe-ionic/files/README.md @@ -1,5 +1,5 @@ # Ionic Quickstarter -Quickstarter created with Ionic CLI 7.1.1 +Quickstarter created with Ionic CLI 7.1.5 ## Running unit tests All files with the ending `.spec.ts` in the src folder will be tested with karma diff --git a/fe-ionic/files/docker/Dockerfile b/fe-ionic/files/docker/Dockerfile index 91b9a6463..e6e0229f6 100644 --- a/fe-ionic/files/docker/Dockerfile +++ b/fe-ionic/files/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM nginx:1.24.0-alpine +FROM nginx:1.25.3-alpine RUN chmod -R 777 /var/log/nginx /var/cache/nginx /var/run \ && chgrp -R 0 /etc/nginx \ diff --git a/fe-ionic/files/metadata.yml b/fe-ionic/files/metadata.yml index 8d613c1e6..fb09199a3 100644 --- a/fe-ionic/files/metadata.yml +++ b/fe-ionic/files/metadata.yml @@ -1,6 +1,6 @@ --- name: Ionic -description: "Ionic Framework is the free, open source mobile UI toolkit for developing high-quality cross-platform apps for native iOS, Android, and the web—all from a single codebase. Technologies: Ionic 6.19.x" +description: "Ionic Framework is the free, open source mobile UI toolkit for developing high-quality cross-platform apps for native iOS, Android, and the web—all from a single codebase. Technologies: Ionic 7.1.5" supplier: https://ionicframework.com +version: 4.x type: ods -version: 7.1.x