{"id":14984758,"url":"https://github.com/buildit/jenkins-pipeline-libraries","last_synced_at":"2025-06-15T04:37:22.603Z","repository":{"id":78235725,"uuid":"61820365","full_name":"buildit/jenkins-pipeline-libraries","owner":"buildit","description":"Useful Jenkins Pipeline Libraries to use for whatever.","archived":false,"fork":false,"pushed_at":"2017-07-19T20:20:14.000Z","size":163,"stargazers_count":81,"open_issues_count":0,"forks_count":39,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-24T19:22:18.299Z","etag":null,"topics":["jenkins","jenkins-pipeline","jenkins-shared-library"],"latest_commit_sha":null,"homepage":"","language":"Groovy","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/buildit.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-23T16:30:11.000Z","updated_at":"2025-01-21T13:26:06.000Z","dependencies_parsed_at":"2023-03-28T23:37:48.025Z","dependency_job_id":null,"html_url":"https://github.com/buildit/jenkins-pipeline-libraries","commit_stats":{"total_commits":152,"total_committers":7,"mean_commits":"21.714285714285715","dds":0.743421052631579,"last_synced_commit":"e1993375bebc21b490147b6bb2794420a2d9605d"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildit%2Fjenkins-pipeline-libraries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildit%2Fjenkins-pipeline-libraries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildit%2Fjenkins-pipeline-libraries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildit%2Fjenkins-pipeline-libraries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buildit","download_url":"https://codeload.github.com/buildit/jenkins-pipeline-libraries/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248311683,"owners_count":21082631,"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","jenkins-shared-library"],"created_at":"2024-09-24T14:09:37.691Z","updated_at":"2025-04-10T22:37:18.900Z","avatar_url":"https://github.com/buildit.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jenkins Pipeline Libraries\n[![Build Status](https://travis-ci.org/buildit/jenkins-pipeline-libraries.svg?branch=master)](https://travis-ci.org/buildit/jenkins-pipeline-libraries) \n[![Download](https://api.bintray.com/packages/buildit/maven/jenkins-pipeline-libraries/images/download.svg) ](https://bintray.com/buildit/maven/jenkins-pipeline-libraries/_latestVersion)\n\nUseful Jenkins Pipeline Libraries to use for whatever.\n\n##Prerequisites \n\n* Jenkins 2.30+\n* [Pipeline Shared Libraries](https://github.com/jenkinsci/workflow-cps-global-lib-plugin) plugin\n* Other plugins may be required for specific library calls (i.e. Docker)\n\n##Usage\n\n1. Add global library 'buildit' pointing to github in Jenkins settings (Manage Jenkins \u003e Configure System \u003e Global Pipeline Libraries)\n2. Add `@Library('buildit')` into your pipeline definition (more details [here](https://github.com/jenkinsci/workflow-cps-global-lib-plugin))\n\n##Examples\n###Build and push tag\n```groovy\nregistry = '\u003cSOME ECR REGISTRY\u003e'\n\nstage \"Set Up\"\nnode{\n    sh(\"if find lib/*; then rm lib/*; fi \u0026\u0026 curl -L https://github.com/buildit/jenkins-pipeline-libraries/archive/${env.PIPELINE_LIBS_VERSION}.zip -o lib.zip \u0026\u0026 echo 'A' | unzip -j lib.zip */lib/* -d lib\")\n\n    shell = load \"lib/shell.groovy\"\n    pom = load \"lib/pom.groovy\"\n    ecr = load \"lib/ecr.groovy\"\n    tools = load \"lib/tools.groovy\"\n}\n\nnode{\n    \n    git(url: \"https://github.com/dermotmburke/hello-boot.git\")\n    def version = pom.version(\"pom.xml\")\n    def artifactId = pom.artifactId(\"pom.xml\")\n    \n    stage \"Build\"\n    tools.configureMaven()\n    sh(\"mvn clean package\")\n    \n    docker.withRegistry(registry) {\n        ecr.authenticate(\"us-east-1\")\n        \n        def image = docker.build(\"${artifactId}:v${version}\", '.')\n        \n        stage \"Docker Push\"\n        image.push(version)\n        image.push(\"latest\")\n    }\n}\n```\n\n###Select tag\n```groovy\nregistry = '\u003cSOME ECR REGISTRY\u003e'\n\nstage \"Set Up\"\nnode{\n    sh(\"if find lib/*; then rm lib/*; fi \u0026\u0026 curl -L https://github.com/buildit/jenkins-pipeline-libraries/archive/${env.PIPELINE_LIBS_VERSION}.zip -o lib.zip \u0026\u0026 echo 'A' | unzip -j lib.zip */lib/* -d lib\")\n\n    ui = load \"lib/ui.groovy\"\n    ecr = load \"lib/ecr.groovy\"\n    template = load \"lib/template.groovy\"\n}\n\nnode{\n    git(url: \"https://github.com/dermotmburke/hello-boot.git\")\n    \n    def tag = input(message: \"Select Tag\", parameters: [ui.dropdown(\"tag\", \"Tag\") {\n        ecr.imageTags(\"hello-boot\", \"us-east-1\")\n    }], submitter: null)\n    \n    def tmpFile = UUID.randomUUID().toString() + \".tmp\"\n    def ymlData = template.transform(readFile(\"docker-compose.yml.template\"), [tag :tag])\n    \n    writeFile(file: tmpFile, text: ymlData)\n    \n    sh(\"convox login console.convox.com --password \u003cPASSWORD\u003e\")\n    sh(\"convox switch development\")\n    //sh(\"convox apps create hello-boot\")\n    sh(\"convox deploy --app hello-boot --file ${tmpFile}\")\n\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildit%2Fjenkins-pipeline-libraries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuildit%2Fjenkins-pipeline-libraries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildit%2Fjenkins-pipeline-libraries/lists"}