{"id":21634800,"url":"https://github.com/opendevstack/ods-jenkinsfile-converter","last_synced_at":"2026-05-20T02:37:01.253Z","repository":{"id":41902006,"uuid":"400459380","full_name":"opendevstack/ods-jenkinsfile-converter","owner":"opendevstack","description":"Convert a Jenkinsfile from ODS 3.x to 4.x","archived":false,"fork":false,"pushed_at":"2022-04-23T16:38:57.000Z","size":22,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-01-25T00:20:10.237Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opendevstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-27T09:36:55.000Z","updated_at":"2021-09-07T07:06:55.000Z","dependencies_parsed_at":"2022-08-11T20:40:36.702Z","dependency_job_id":null,"html_url":"https://github.com/opendevstack/ods-jenkinsfile-converter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendevstack%2Fods-jenkinsfile-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendevstack%2Fods-jenkinsfile-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendevstack%2Fods-jenkinsfile-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendevstack%2Fods-jenkinsfile-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opendevstack","download_url":"https://codeload.github.com/opendevstack/ods-jenkinsfile-converter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244320322,"owners_count":20434090,"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":[],"created_at":"2024-11-25T03:18:12.424Z","updated_at":"2026-05-20T02:37:01.207Z","avatar_url":"https://github.com/opendevstack.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ods-jenkinsfile-converter\n[![build](https://github.com/opendevstack/ods-jenkinsfile-converter/actions/workflows/build.yml/badge.svg)](https://github.com/opendevstack/ods-jenkinsfile-converter/actions/workflows/build.yml)\n\n## Introduction\n\nThis is a Golang CLI to convert the a Jenkinsfile based on 3.x to 4.x based on the [official required changes](https://www.opendevstack.org/ods-documentation/opendevstack/4.x/update-guides/4x.html).\n\n## Download\n\nTarget a specific version and platform for the binary. For version `v0.1.2` and linux, you would:\n\n```cli\n  curl -L https://github.com/opendevstack/ods-jenkinsfile-converter/releases/download/v0.1.2/converter -o converter\n  sudo mv converter /usr/local/bin\n```\n\nFor other platforms like Windows or MacOS choose the binary from the links [here](https://github.com/opendevstack/ods-jenkinsfile-converter/releases).\n\n## Usage\n\nGiven a Jenkinsfile based on 3.x, to preview the changes that will result when migrating to ODS 4.x, use the `--dry-run` flag\n\n```cli\n  converter -filename=\"examples/machine-learning/Jenkinsfile\" --dry-run\n```\n\nor to persist the changes in an output file\n\n```cli\n  converter -filename=\"examples/machine-learning/Jenkinsfile\" -out \"out/Jenkinsfile\"\n```\n\nThe converted Jenkinsfile with the ODS 4.x adopted changes will be under the [out](./out) directory:\n\n```cli\n  cat out/Jenkinsfile\n```\n\n## Building it locally\n\nGenerate the binaries under [bin](./bin)\n\n```cli\n  make all\n```\n\nYou can run the binary for your platform. To preview the changes that will be done, use the `--dry-run` flag\n\n```cli\n  ./bin/converter -filename=\"examples/machine-learning/Jenkinsfile\" --dry-run\n```\n\n## Run it with `Go`\n\n```cli\n  go run . -filename=\"examples/machine-learning/Jenkinsfile\" -out \"out/Jenkinsfile\"\n```\n\n## Features\n\nThis tool will carry out the following changes in an ODS 3.x Jenkinsfile:\n\n- [X] Update `@Library('ods-jenkins-shared-library@3.x') _` to `@Library('ods-jenkins-shared-library@4.x') _`\n- [X] Point to agent images with the 4.x tag, e.g. change imageStreamTag: `ods/jenkins-agent-golang:3.x` to imageStreamTag: `ods/jenkins-agent-golang:4.x`.\n- [X] NodeJS agent name is going to change in ODS 4. From `jenkins-agent-nodejs10-angular` to `jenkins-agent-nodejs12`.\n- [X] `odsComponentStageImportOpenShiftImageOrElse` has been deprecated, and is now aliased to the new method, `odsComponentFindOpenShiftImageOrElse`.\n- [X] `odsComponentStageRolloutOpenShiftDeployment` rolls out all deployment resources together now. If you had multiple DeploymentConfig resources previously, you had to target each one by specifying the config option resourceName. This is no longer possible - instead the stage iterates over all DeploymentConfig resources with the component label (app=${projectId}-${componentId}). Changes must be made to pipelines that have multiple deployments, such as components based on the ds-jupyter-notebook and ds-rshiny quickstarter.\n\n  For instance, the following must be changed from:\n  \n    `odsComponentStageRolloutOpenShiftDeployment(context, [resourceName: \"${context.componentId}-auth-proxy\"])`\n  \n  to:\n\n    `odsComponentStageRolloutOpenShiftDeployment(context)`\n  \n## Limitations\n- Only Jenkinsfiles from 3.x are supported.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendevstack%2Fods-jenkinsfile-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopendevstack%2Fods-jenkinsfile-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendevstack%2Fods-jenkinsfile-converter/lists"}