{"id":18110987,"url":"https://github.com/simongolms/ods-jenkins-agent-nodejs","last_synced_at":"2026-05-10T06:46:16.500Z","repository":{"id":102060400,"uuid":"469735953","full_name":"SimonGolms/ods-jenkins-agent-nodejs","owner":"SimonGolms","description":"Customized Jenkins agents that helps me in my daily developer life with OpenDevStack","archived":false,"fork":false,"pushed_at":"2022-06-20T07:18:26.000Z","size":45,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-12T13:27:34.645Z","etag":null,"topics":["jenkins","nodejs","opendevstack","openshift"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SimonGolms.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-14T13:02:44.000Z","updated_at":"2022-08-09T19:59:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd28fdfb-1601-4461-8269-f4781b4b7965","html_url":"https://github.com/SimonGolms/ods-jenkins-agent-nodejs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonGolms%2Fods-jenkins-agent-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonGolms%2Fods-jenkins-agent-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonGolms%2Fods-jenkins-agent-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonGolms%2Fods-jenkins-agent-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SimonGolms","download_url":"https://codeload.github.com/SimonGolms/ods-jenkins-agent-nodejs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247451626,"owners_count":20940946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jenkins","nodejs","opendevstack","openshift"],"created_at":"2024-11-01T00:12:40.809Z","updated_at":"2026-05-10T06:46:11.462Z","avatar_url":"https://github.com/SimonGolms.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenDevStack 4.x - Jenkins Agent Node.js\n\n[![Version](https://img.shields.io/badge/version-2.1.0-blue.svg)](https://github.com/SimonGolms/ods-jenkins-agent-nodejs/releases)\n[![License: Apache-2.0](https://img.shields.io/github/license/simongolms/ods-jenkins-agent-nodejs)](https://github.com/simongolms/ods-jenkins-agent-nodejs/blob/master/LICENSE)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/simongolms/ods-jenkins-agent-nodejs/graphs/commit-activity)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-green.svg)](https://conventionalcommits.org)\n[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)\n[![OpenDevStack](https://img.shields.io/badge/OpenDevStack-4.x-9e312a)](https://www.opendevstack.org/)\n[![OpenShift Container Platform](https://img.shields.io/badge/OpenShift%20Container%20Platform-4.x-EE0000?logo=Red-Hat-Open-Shift)](https://docs.openshift.com/container-platform)\n[![Jenkins Agent](https://img.shields.io/badge/Jenkins-Agent-d24939?logo=jenkins)](https://www.jenkins.io/)\n\n## Introduction\n\nThis Jenkins agent is used to build Node.js based projects, thru `npm` and `npx`. It use `ods/jenkins-agent-base:4.x` as base image in an OpenShift 4 Instance with OpenDevStack 4.x.\n\n### Features\n\n1. Node.js `v16.x` | `v18.x` | `lts` | `current`\n2. npm `v8.x` | `latest`\n3. (optional) Nexus configuration\n\n### Usage\n\nThe image is built in your active OpenShift Project and is named `jenkins-agent-nodejs-\u003cVERSION\u003e`.\nIt can be referenced in a `Jenkinsfile` with `\u003cPROJECT\u003e/jenkins-agent-nodejs-\u003cVERSION\u003e`.\n\n```diff\n// Jenkinsfile\nodsComponentPipeline(\n-  imageStreamTag: 'ods/jenkins-agent-nodejs12:4.x',\n+  imageStreamTag: \"foo-cd/jenkins-agent-nodejs-16:latest\",\n)\n```\n\n```diff\n// Jenkinsfile with custom agent resources\nodsComponentPipeline(\n-  imageStreamTag: 'ods/jenkins-agent-nodejs12:4.x',\n+  podContainers: [\n+    containerTemplate(\n+      alwaysPullImage: true,\n+      args: '${computer.jnlpmac} ${computer.name}',\n+      image: \"image-registry.openshift-image-registry.svc:5000/foo-cd/jenkins-agent-nodejs-16:latest\",\n+      name: 'jnlp',\n+      resourceLimitCpu: '3',\n+      resourceLimitMemory: '8Gi',\n+      resourceRequestCpu: '10m',\n+      resourceRequestMemory: '4Gi',\n+      workingDir: '/tmp'\n+    )\n+  ],\n)\n```\n\n## Provisioning\n\n### CLI\n\n```sh\n# v16.x\noc process -f https://raw.githubusercontent.com/SimonGolms/ods-jenkins-agent-nodejs/main/jenkins-agent-nodejs-16-template.yaml | oc create -f -\n# v18.x\noc process -f https://raw.githubusercontent.com/SimonGolms/ods-jenkins-agent-nodejs/main/jenkins-agent-nodejs-18-template.yaml | oc create -f -\n# lts\noc process -f https://raw.githubusercontent.com/SimonGolms/ods-jenkins-agent-nodejs/main/jenkins-agent-nodejs-lts-template.yaml | oc create -f -\n# current\noc process -f https://raw.githubusercontent.com/SimonGolms/ods-jenkins-agent-nodejs/main/jenkins-agent-nodejs-current-template.yaml | oc create -f -\n```\n\n```sh\n# with nexus configuration\noc process -f https://raw.githubusercontent.com/SimonGolms/ods-jenkins-agent-nodejs/main/jenkins-agent-nodejs-\u003cVERSION\u003e-template.yaml \\\n  -p NEXUS_URL=https://NEXUS_INSTANCE \\\n  -p NEXUS_AUTH=USERNAME:PASSWORD \\\n  | oc create -f -\n```\n\n### Manual\n\nImport `jenkins-agent-nodejs-\u003cVERSION\u003e-template.yaml` into your OpenShift instance and process the template. Replace your project name if necessary (e.g. `foo-cd` -\u003e `bar-cd`).\n\nGo to \u003chttps://OPENSHIFT_INSTANCE/catalog/ns/PROJECT?catalogType=Template\u0026keyword=jenkins\u003e and click on `Jenkins Agent Node.js (\u003cVERSION\u003e)` -\u003e `Instantiate Template` -\u003e `Create`\n\n## Update\n\n### CLI\n\nIn case of a new version of Node.js or npm is released, run the following command to create a new image with updated versions:\n\n```sh\n# v16.x\noc start-build jenkins-agent-nodejs-16 --follow\n# v18.x\noc start-build jenkins-agent-nodejs-18 --follow\n# lts\noc start-build jenkins-agent-nodejs-lts --follow\n# current\noc start-build jenkins-agent-nodejs-current --follow\n```\n\nIn case it is necessary and you need a specific npm version, you can provide it via `--build-arg`:\n\n```sh\n# with specific npm version\noc start-build jenkins-agent-nodejs-\u003cVERSION\u003e --build-arg NPM_VERSION=8.5.3 --follow\n```\n\n### Manual\n\nGo to your Build Configs \u003chttps://OPENSHIFT_INSTANCE/k8s/ns/PROJECT/buildconfigs/jenkins-agent-nodejs-VERSION\u003e and click on `Actions` -\u003e `Start Build`.\n\n## Abandon\n\n### CLI\n\n```sh\n# v16.x\noc delete all --selector app=jenkins-agent-nodejs-16\n# v18.x\noc delete all --selector app=jenkins-agent-nodejs-18\n# lts\noc delete all --selector app=jenkins-agent-nodejs-lts\n# current\noc delete all --selector app=jenkins-agent-nodejs-current\n# v16.x \u0026 v18.x \u0026 lts \u0026 current\noc delete all --selector part-of=jenkins-agent-nodejs\n```\n\n#### (Optional) Template from workspace catalog\n\n```sh\noc delete template jenkins-agent-nodejs-\u003cVERSION\u003e\n```\n\n### Manual\n\n1. Go to your Image Streams \u003chttps://OPENSHIFT_INSTANCE/k8s/ns/PROJECT/imagestreams/jenkins-agent-nodejs-VERSION\u003e and click on `Actions` -\u003e `Delete ImageStream`.\n2. Go to your Build Configs \u003chttps://OPENSHIFT_INSTANCE/k8s/ns/PROJECT/buildconfigs/jenkins-agent-nodejs-VERSION\u003e and click on `Actions` -\u003e `Delete BuildConfig`.\n\n## Author\n\n**Simon Golms**\n\n- Digital Card: `npx simongolms`\n- Github: [@SimonGolms](https://github.com/SimonGolms)\n- Website: [gol.ms](https://gol.ms)\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## License\n\nCopyright © 2022 [Simon Golms](https://github.com/simongolms).\u003cbr /\u003e\nThis project is [Apache-2.0](https://github.com/simongolms/ods-jenkins-agent-nodejs/blob/master/LICENSE) licensed.\n\n## Resources\n\n- https://nodejs.org\n- https://docs.openshift.com/container-platform/4.10/openshift_images/using-templates.html\n- https://docs.openshift.com/container-platform/4.10/rest_api/template_apis/template-template-openshift-io-v1.html\n- https://github.com/opendevstack/ods-core/blob/master/jenkins/agent-base/Dockerfile.ubi8\n- https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/nodejs12/docker\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimongolms%2Fods-jenkins-agent-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimongolms%2Fods-jenkins-agent-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimongolms%2Fods-jenkins-agent-nodejs/lists"}