{"id":21347564,"url":"https://github.com/turbobasic/jenkinslibrary","last_synced_at":"2026-05-16T00:32:37.809Z","repository":{"id":213793452,"uuid":"734942507","full_name":"turboBasic/JenkinsLibrary","owner":"turboBasic","description":"Boilerplate project for development of Jenkins shared library and pipelines. It addresses poorly documented nuances of setting up Gradle project and build environment required for running Unit tests, adding correct versions of Jenkins plugins to dependencies etc.","archived":false,"fork":false,"pushed_at":"2024-04-18T09:08:43.000Z","size":114,"stargazers_count":1,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T16:33:14.883Z","etag":null,"topics":["jenkins","jenkins-pipeline-unit","junit5","pipeline-as-code","spock-framework","unit-testing"],"latest_commit_sha":null,"homepage":"","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/turboBasic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"turbobasic","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2023-12-23T05:19:38.000Z","updated_at":"2023-12-28T10:50:14.000Z","dependencies_parsed_at":"2025-01-22T16:33:21.201Z","dependency_job_id":"3fb35116-d847-4aec-ac46-46287c754008","html_url":"https://github.com/turboBasic/JenkinsLibrary","commit_stats":null,"previous_names":["turbobasic/jenkins-library","turbobasic/jenkinslibrary"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turboBasic%2FJenkinsLibrary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turboBasic%2FJenkinsLibrary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turboBasic%2FJenkinsLibrary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turboBasic%2FJenkinsLibrary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/turboBasic","download_url":"https://codeload.github.com/turboBasic/JenkinsLibrary/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822294,"owners_count":20353500,"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","jenkins-pipeline-unit","junit5","pipeline-as-code","spock-framework","unit-testing"],"created_at":"2024-11-22T02:14:41.602Z","updated_at":"2026-05-16T00:32:32.776Z","avatar_url":"https://github.com/turboBasic.png","language":"Groovy","funding_links":["https://ko-fi.com/turbobasic"],"categories":[],"sub_categories":[],"readme":"# JenkinsLibrary\n\nBoilerplate project for development of Jenkins shared library and pipelines.\n\nJenkinsLibrary aims to help developers to easily start new project with Jenkins Shared library and pipelines.\nIt addresses poorly documented nuances of setting up Gradle project and build environment required for\nrunning Unit and Integration tests, adding correct versions of Jenkins plugins to dependencies etc.\n\nImportant feature of JenkinsLibrary is that it keeps both Shared library and pipelines which use it inside the same\nproject which makes development and testing significantly simpler comparing with the setup where library and pipelines\nare kept in separate projects. Still, if you prefer to use JenkinsLibrary as a separate project for library classes\nonly and reuse it in multiple projects with pipeline-only code, it allows you to do so without any modifications.\n\nJenkinsLibrary uses [JenkinsPipelineUnit](https://github.com/jenkinsci/JenkinsPipelineUnit) library for\nmocking pipeline steps and variables, but on top of it adds [Spock](https://github.com/spockframework/spock) v2\nframework which allows to use more precise and self-explanatory syntax of describing test cases.\n\n\n## Table of Contents\n\n1. [Usage](#usage)\n1. [Setting up in JetBrains IDEA](#setting-up-project-in-jetbrains-idea)\n1. [Development environment](#development-environment)\n1. [Directory structure](#directory-structure)\n1. [Contributing](#contributing)\n\n\n\u003c!-- begin of help --\u003e\n\n## Usage\n\n### Build and test commands\n\n- `./dev all-test`: build project and execute Integration and Unit tests.\n- `./dev integration-test`: build project and execute Integration tests.\n- `./dev test`: build project and execute Unit tests.  \n  If you provide arguments after `./dev test` command, they are appended to `gradle clean test` command-line and\n  resulting command is executed\n- `./dev test --tests \"pipelines.admin.**\"`: build project and execute all tests in `pipelines.admin` package\n- `./dev test --tests \"pipelines.admin.**\" --tests org.example.FooSpec`: build project and execute all tests in\n  `pipelines.admin` package and tests for class `org.example.FooSpec`\n- `./dev test -Dpipeline.stack.write=true`: build project, execute tests and update\n  [call stack files](test/resources/callStacks/README.md)\n\n### Other commands\n\n- `./dev docker [--push]`: only build Docker image. If `--push` switch is provided, Docker image is pushed to Docker Hub\n- `./dev help`: display this help about commands\n- `./dev lint`: lint project with MegaLinter\n- `./dev lint-commits`: lint feature branch commits using [Conventional commit linter](https://commitlint.js.org/#/)\n- `./dev sh`: create development environment and enter shell session inside it. Inside development environment you can\n  use Gradle to execute any advanced commands\n\n\u003c!-- end of help --\u003e\n\n\n## Setting up project in JetBrains IDEA\n\nExecute `./gradlew openIdea` in the project. When IDEA opens the project click *Skip* if it proposes to import Gradle\nproject\n\n\n## Development environment\n\nThe development environment invoked by `./dev sh` command is very compact so in most situation you are\nfine to use your native environment for building and executing tests. All you need is to have Java 11\nand Gradle 8 available in the PATH.\n\nRecommended way of usage is the `./dev` wrapper (see [Usage](#usage))\nbut if you would like to use native environment you can use [SDKMan](https://sdkman.io) for installing\nand switching versions of tools from JVM stack.\n\n## Directory structure\n\nProject follows the directory structure of\n[Jenkins Shared Library](https://www.jenkins.io/doc/book/pipeline/shared-libraries/#directory-structure)\nproject. On top of that, `test` and other directories have been added for keeping files related to\nadditional features. Most directories have detailed Readme files with the description and other\nimportant information about their contents and naming conventions:\n\n- `pipelines`: [Jenkins pipelines](pipelines/README.md)\n- `resources`: [Production resources directory](resources/README.md)\n- `src`: Production source code for Jenkins Shared Library classes. Subdirectories here\n  follow conventional Groovy/Java package layout\n- `test`: Unit-tests' source code. Subdirectories here follow conventional Groovy/Java\n  package layout\n- `test/pipelines`: [Tests for jenkins pipelines](test/pipelines/README.md). Structure of this directory follows\n  the structure of `pipelines` directory\n- `test/resources`: [Test resources directory](test/resources/README.md)\n- `test/resources/callStacks`: [Call stack dumps directory](test/resources/callStacks/README.md). This directory\n  contains expected call stack dumps for the pipeline tests\n- `testIntegration`: Integration tests' source code\n- `testIntegration/resources`: [Resources directory](testIntegration/resources/README.md) for Integration tests\n- `vars`: Custom steps aka _Global vars_ in Jenkins Shared library\n\n\n## Contributing\n\nSee [How to contribute](CONTRIBUTING.md) document\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturbobasic%2Fjenkinslibrary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturbobasic%2Fjenkinslibrary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturbobasic%2Fjenkinslibrary/lists"}