{"id":15166922,"url":"https://github.com/joelee2012/go-jenkins","last_synced_at":"2026-01-22T17:02:51.861Z","repository":{"id":43484554,"uuid":"353646925","full_name":"joelee2012/go-jenkins","owner":"joelee2012","description":"Go client library for Jenkins API","archived":false,"fork":false,"pushed_at":"2024-11-29T09:36:27.000Z","size":204,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-14T13:18:28.262Z","etag":null,"topics":["go-jenkins","jenkins","jenkinsapi","restapi"],"latest_commit_sha":null,"homepage":"","language":"Go","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/joelee2012.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":"2021-04-01T09:33:23.000Z","updated_at":"2024-11-08T06:40:20.000Z","dependencies_parsed_at":"2024-06-21T02:07:42.559Z","dependency_job_id":"e836cde9-c4c9-4898-bcaa-4295d5d0bf98","html_url":"https://github.com/joelee2012/go-jenkins","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"bd9d63c6a643e94e319a2a7c9d0ed62c5dbf6dc7"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelee2012%2Fgo-jenkins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelee2012%2Fgo-jenkins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelee2012%2Fgo-jenkins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelee2012%2Fgo-jenkins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joelee2012","download_url":"https://codeload.github.com/joelee2012/go-jenkins/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247886577,"owners_count":21012866,"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":["go-jenkins","jenkins","jenkinsapi","restapi"],"created_at":"2024-09-27T05:04:01.591Z","updated_at":"2026-01-22T17:02:51.792Z","avatar_url":"https://github.com/joelee2012.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Tests](https://github.com/joelee2012/go-jenkins/workflows/Tests/badge.svg?branch=main)\n![CodeQL](https://github.com/joelee2012/go-jenkins/workflows/CodeQL/badge.svg?branch=main)\n[![codecov](https://codecov.io/gh/joelee2012/go-jenkins/branch/main/graph/badge.svg?token=SEWFVZ7UT3)](https://codecov.io/gh/joelee2012/go-jenkins)\n![GitHub](https://img.shields.io/github/license/joelee2012/go-jenkins)\n\n# go-jenkins\n[Golang](https://golang.org/) client library for accessing [Jenkins API](https://www.jenkins.io/doc/book/using/remote-access-api/).\n\u003e Ported from [api4jenkins](https://github.com/joelee2012/api4jenkins\u003e), a [Python3](https://www.python.org/) client library for [Jenkins API](https://www.jenkins.io/doc/book/using/remote-access-api/).\n\n# Features\nThis API client package covers most of the existing Jenkins API calls and is updated regularly to add new and/or missing endpoints.\n\nCurrently, the following are supported:\n\n- Job\n- Build\n- Credential\n- View\n- Queue\n- Node\n\n# Usage\n\n```go\nimport \"github.com/joelee2012/go-jenkins\"\n```\n\n## Example\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"time\"\n\n\t\"github.com/joelee2012/go-jenkins\"\n)\n\nfunc main() {\n\t// Construct new client\n\tclient, err := jenkins.NewClient(\"http://localhost:8080/\", \"admin\", \"1234\")\n\tif err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\txml := `\u003c?xml version='1.1' encoding='UTF-8'?\u003e\n\t\u003cflow-definition plugin=\"workflow-job\"\u003e\n\t\t\u003cdefinition class=\"org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition\" plugin=\"workflow-cps\"\u003e\n\t\t\u003cscript\u003e#!groovy\n\t\t\tpipeline {\n\t\t\tagent any\n\t\t\tstages {\n\t\t\t\tstage('build'){\n\t\t\t\tsteps{\n\t\t\t\t\tsh 'echo $JENKINS_VERSION'\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\u003c/script\u003e\n\t\t\u003csandbox\u003etrue\u003c/sandbox\u003e\n\t\t\u003c/definition\u003e\n\t\t\u003cdisabled\u003efalse\u003c/disabled\u003e\n\t\u003c/flow-definition\u003e`\n\t// create jenkins job\n\tif err := client.CreateJob(\"pipeline\", xml); err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\t// Build Job and get BuildItem\n\tqitem, err := client.BuildJob(\"pipeline\", nil)\n\tif err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\tvar build *Build\n\tfor {\n\t\ttime.Sleep(1 * time.Second)\n\t\tbuild, err = qitem.GetBuild()\n\t\tif err != nil {\n\t\t\tlog.Fatalln(err)\n\t\t}\n\t\tif build != nil {\n\t\t\tbreak\n\t\t}\n\t}\n\t// tail the build log to end\n\tbuild.LoopProgressiveLog(\"text\", func(line string) error {\n\t\tlog.Println(line)\n\t\ttime.Sleep(1 * time.Second)\n\t\treturn nil\n\t})\n}\n```\n\n# Documentation\nSee https://pkg.go.dev/github.com/joelee2012/go-jenkins","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelee2012%2Fgo-jenkins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoelee2012%2Fgo-jenkins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelee2012%2Fgo-jenkins/lists"}