{"id":23458220,"url":"https://github.com/moxio/jenkins-pipeline-utils","last_synced_at":"2026-04-30T13:34:29.784Z","repository":{"id":77212850,"uuid":"241565080","full_name":"Moxio/jenkins-pipeline-utils","owner":"Moxio","description":"Shared library with common utility functions for building your own Jenkins pipelines","archived":false,"fork":false,"pushed_at":"2022-10-05T09:17:29.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2026-03-28T15:58:28.827Z","etag":null,"topics":["groovy","jenkins","jenkins-pipeline"],"latest_commit_sha":null,"homepage":null,"language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Moxio.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2020-02-19T08:00:56.000Z","updated_at":"2023-01-01T04:33:17.000Z","dependencies_parsed_at":"2023-03-12T00:15:54.871Z","dependency_job_id":null,"html_url":"https://github.com/Moxio/jenkins-pipeline-utils","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Moxio/jenkins-pipeline-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moxio%2Fjenkins-pipeline-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moxio%2Fjenkins-pipeline-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moxio%2Fjenkins-pipeline-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moxio%2Fjenkins-pipeline-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Moxio","download_url":"https://codeload.github.com/Moxio/jenkins-pipeline-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moxio%2Fjenkins-pipeline-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32466333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["groovy","jenkins","jenkins-pipeline"],"created_at":"2024-12-24T05:17:38.394Z","updated_at":"2026-04-30T13:34:29.779Z","avatar_url":"https://github.com/Moxio.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"Moxio Jenkins pipeline utils\n============================\nThis project is a [Shared Library](https://jenkins.io/doc/book/pipeline/shared-libraries/)\nwith common utility functions for building your own Jenkins pipelines.\n\nUsage\n-----\nThere are two possible ways to reference this library in your own pipeline:\n\n1. Using a direct reference to this library on GitHub. Add the following annotation\n    to the top of your `Jenkinsfile`:\n    ```groovy\n    @Library('github.com/moxio/jenkins-pipeline-utils@master') _\n    ```\n    Please note the trailing underscore! Instead of referencing master you can (and\n    actually should) fix the dependency on a specific tag or commit hash.\n2. By adding this library as a global pipeline library to your Jenkins instance.\n    Go to `Manage Jenkins \u003e Configure System \u003e Global Pipeline Libraries` and add\n    this library using a reference to its GitHub repository and a name of your choice\n    (e.g. `moxio-pipeline-utils`). You can then either check `Load implicitly` to\n    make the library available by default, or reference it explicitly by its name at\n    the top of your `Jenkinsfile`:\n    ```groovy\n    @Library('moxio-pipeline-utils') _\n    ```\n    Again, note the trailing underscore.\n\nFunctions\n---------\nThe library defines the following functions:\n\n### cleanCheckout\nChecks out code from the SCM and ensures a clean working copy state: any local\nmodifications are rolled back and unversioned files are deleted. Supports both\nsubversion and git. In case of a git repository, any git hooks configured in the\nlocal checkout are cleaned up as well.\n\nYou can use the function by calling `cleanCheckout scm` as a drop-in replacement\nfor the default `checkout scm` step. You probably want to use `skipDefaultCheckout()`\nin your pipeline `options {}` block to prevent Jenkins from already checking out\nthe code using the 'default' `checkout` by itself.\n\n### dirExists\nAlternative for the built-in `fileExists` that only returns true if the path\nactually represents a directory.\n\n### importShellScript\nIn your own shared pipeline library, this function gets a shell script from the\n`resources/` directory, makes it available and executable locally, and returns\na path by which it can be executed. In essence this is a variant of [`libraryResource`](https://jenkins.io/doc/pipeline/steps/workflow-cps-global-lib/#libraryresource-load-a-resource-file-from-a-shared-library)\nmore suitable for shell scripts.\n\n### isCausedByCronTrigger\nReturns whether the current build was started by a cron trigger. This is useful\nfor pipelines that need to perform different steps for builds triggered by SCM\nevents (e.g. only 'light' unit tests) than for nightly builds triggered by cron\n(e.g. also 'heavy' integration tests).\n\n### isGitlabRepository\nReturns whether the given SCM corresponds to a repository hosted on `gitlab.com`.\nThis can be useful if you want to share a default pipeline between Gitlab- and\nnon-Gitlab-repositories, but still update the Gitlab commit status if relevant, e.g.:\n```groovy\nif (isGitlabRepository(scm)) {\n    updateGitlabCommitStatus name: 'Jenkins', state: 'failed'\n}\n```\n\nVersioning\n----------\nThis project adheres to [Semantic Versioning](http://semver.org/).\n\nContributing\n------------\nContributions to this project are more than welcome.\n\nLicense\n-------\nThis project is released under the MIT license.\n\n---\nMade with love, coffee and fun by the [Moxio](https://www.moxio.com) team from\nDelft, The Netherlands. Interested in joining our awesome team? Check out our\n[vacancies](https://werkenbij.moxio.com/) (in Dutch).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoxio%2Fjenkins-pipeline-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoxio%2Fjenkins-pipeline-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoxio%2Fjenkins-pipeline-utils/lists"}