{"id":20426753,"url":"https://github.com/sergioalberto/pipeline-library","last_synced_at":"2026-04-22T05:34:29.124Z","repository":{"id":43480288,"uuid":"464534494","full_name":"sergioalberto/pipeline-library","owner":"sergioalberto","description":"This is a Jenkins library example","archived":false,"fork":false,"pushed_at":"2022-02-28T16:23:19.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T05:19:03.075Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Groovy","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/sergioalberto.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}},"created_at":"2022-02-28T15:20:58.000Z","updated_at":"2022-02-28T15:32:57.000Z","dependencies_parsed_at":"2022-08-23T14:41:02.176Z","dependency_job_id":null,"html_url":"https://github.com/sergioalberto/pipeline-library","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sergioalberto/pipeline-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergioalberto%2Fpipeline-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergioalberto%2Fpipeline-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergioalberto%2Fpipeline-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergioalberto%2Fpipeline-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergioalberto","download_url":"https://codeload.github.com/sergioalberto/pipeline-library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergioalberto%2Fpipeline-library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32122772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"online","status_checked_at":"2026-04-22T02:00:05.693Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-15T07:17:32.631Z","updated_at":"2026-04-22T05:34:29.108Z","avatar_url":"https://github.com/sergioalberto.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pipeline-library\n\nDemonstrates how to use a Shared Library in Jenkins pipelines. This repository defines a single function, `sayHello`, which will echo a greeting.\n\n## Setup instructions\n\n1. In Jenkins, go to Manage Jenkins \u0026rarr; Configure System. Under _Global Pipeline Libraries_, add a library with the following settings:\n\n    - Name: `pipeline-library`\n    - Default version: Specify a Git reference (branch or commit SHA), e.g. `master`\n    - Retrieval method: _Modern SCM_\n    - Select the _Git_ type\n    - Project repository: `https://github.com/sergioalberto/pipeline-library.git`\n    - Credentials: (leave blank)\n\n2. Then create a Jenkins job with the following pipeline (note that the underscore `_` is not a typo):\n\n    ```\n    @Library('pipeline-library')_\n    stage('Demo') {\n      echo 'Hello World'\n      sayHello 'Dave'\n    }\n    ```\n\nThis will output the following from the build:\n\n   ```\n   [Pipeline] stage\n   [Pipeline] { (Demo)\n   [Pipeline] echo\n   Hello world\n   [Pipeline] echo\n   Hello, Dave.\n   [Pipeline] }\n   [Pipeline] // stage\n   [Pipeline] End of Pipeline\n   Finished: SUCCESS\n   ```\n\n3. If you want to test another version from another branch of the library, just add `@` and the `branch name`, for example:\n\n    ```\n    @Library('pipeline-library@another-branch')_\n    import com.sergiogq.GlobalVars\n\n    stage('Demo') {\n      echo 'Hello World'\n      sayHello 'Dave'\n      println GlobalVars.foo\n    }\n    ```\n\n   ```\n   @Library('my-shared-library@master') _\n   /* Using a version specifier, such as branch, tag, etc */\n   @Library('my-shared-library@1.0') _\n   /* Accessing multiple libraries with one statement */\n   @Library(['my-shared-library', 'otherlib@abc1234']) _\n   ```\n\n### Resources\n- https://www.jenkins.io/doc/book/pipeline/shared-libraries/#legacy-scm\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergioalberto%2Fpipeline-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergioalberto%2Fpipeline-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergioalberto%2Fpipeline-library/lists"}