{"id":14984659,"url":"https://github.com/colinbut/jenkins-shared-library","last_synced_at":"2025-04-10T21:20:49.956Z","repository":{"id":38820583,"uuid":"259091006","full_name":"colinbut/jenkins-shared-library","owner":"colinbut","description":"My personal Jenkins Shared Library ","archived":false,"fork":false,"pushed_at":"2023-02-15T19:06:39.000Z","size":59,"stargazers_count":37,"open_issues_count":5,"forks_count":31,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T18:49:38.136Z","etag":null,"topics":["groovy","groovy-code","groovy-language","groovy-script","groovy-scripts","jenkins","jenkins-ci","jenkins-pipeline","jenkins-shared-library","jenkinsfile","pipeline","pipelines","pipelines-as-code"],"latest_commit_sha":null,"homepage":"","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/colinbut.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}},"created_at":"2020-04-26T17:25:30.000Z","updated_at":"2024-11-11T21:20:19.000Z","dependencies_parsed_at":"2024-09-25T00:31:22.619Z","dependency_job_id":null,"html_url":"https://github.com/colinbut/jenkins-shared-library","commit_stats":{"total_commits":86,"total_committers":2,"mean_commits":43.0,"dds":"0.023255813953488413","last_synced_commit":"7c14dcd3d13875ac2985be4abd708ca503bdab41"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colinbut%2Fjenkins-shared-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colinbut%2Fjenkins-shared-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colinbut%2Fjenkins-shared-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colinbut%2Fjenkins-shared-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colinbut","download_url":"https://codeload.github.com/colinbut/jenkins-shared-library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248298883,"owners_count":21080423,"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":["groovy","groovy-code","groovy-language","groovy-script","groovy-scripts","jenkins","jenkins-ci","jenkins-pipeline","jenkins-shared-library","jenkinsfile","pipeline","pipelines","pipelines-as-code"],"created_at":"2024-09-24T14:09:28.675Z","updated_at":"2025-04-10T21:20:49.933Z","avatar_url":"https://github.com/colinbut.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jenkins Shared Library\n\n[![CircleCI](https://circleci.com/gh/colinbut/jenkins-shared-library.svg?style=svg)](https://circleci.com/gh/colinbut/jenkins-shared-library)\n\nThis is my personal Jenkins Shared Library.\n\nThis repository contains a library of Jenkins Global Variables \u0026 Helper Variables that I can use in my project's `Jenkinsfile`\n\nBased on the following articles:\n- [How-To-Build-Your-Own-Jenkins-Shared-Library](https://itnext.io/how-to-build-your-own-jenkins-shared-library-9dc129db260c) \n- [Unit-Testing-A-Jenkins-Shared-Library](https://itnext.io/unit-testing-a-jenkins-shared-library-9bfb6b599748)\n\n## Usage\n\n### Import Library\n\nAs per the instructions on the [Jenkins Documentation], to include this library; in your `Jenkinsfile`:\n\n```groovy\n@Library('jenkins-shared-library@1.0.0') _\n```\nnote that the name is the `id` of the Shared Library configured under Jenkins Configuration and the version after the `@` sign \ncan be `master` which points to the master branch of this library or simply omitted which would pick up the \ndefault version configured under Jenkins Configuration (if you have it configured there).\n\n### Using Global Variables\n\nTo use one of the global variables or helper variables defined in this library you just simply call it like the following examples.\n\n```groovy\n@Library('jenkins-shared-library@1.0.0') _\nbuildJavaApp(repo: \"name of repo\")\n```\n\n```groovy\n@Library('jenkins-shared-library@1.0.0') _\nbuildJavaAppDockerFull(repo: \"name of repo\", microserviceName: \"example-app\")\n```\n\nSee under `vars/` to see list of full available Global Variables/Helper Variables to use.\n\nAlternatively, you can check out this example demo project which shows some use cases of this Shared Library:\n[Jenkins Pipelines](http://github.com/colinbut/jenkins-pipelines.git)\n\n### Configuration\n\nA lot of the configuration for external systems (Github, SonarQube etc) are set in the `Constants.groovy` constants class. \nYou can edit this to match according to your settings.\n\n### Global Vars Documentation\n\nEach of the global variables (helper functions) has its own documentation (corresponding *.txt file). You can access these documentation on the __Global Variable Reference__ link on the navigation sidebar of pipeline jobs that imported this shared library. \n\nNote that as per Jenkins documentation this is only visible after one successful run of the pipeline job for the documentation to be generated.\n\nThe documentation is in (.txt) file format and contains HTML.\n\n## Author\n\nColin But\n\n## Release Notes\n\n__v0.0.2__\n+ global variables documentation\n+ new log levels (fatal, trace) to log utility\n+ support for sonar in pipeline jobs\n\n__v0.0.1__\n+ basic Global Variables (steps) to build:\n    + a Java App\n    + a full pipeline of building a Java App (from checkout to deployment)\n+ Library classes to:\n    + build Docker Image\n    + Push Docker Image to AWS ECR (Elastic Container Registry) - AWS's Docker Registry\n    + basic Git helper commands\n+ utilities\n    + logging\n    + notifications\n+ Unit Tests using Jenkins-Spock\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolinbut%2Fjenkins-shared-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolinbut%2Fjenkins-shared-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolinbut%2Fjenkins-shared-library/lists"}