Skip to main content

langchain-jenkins

This package contains the LangChain integration with Jenkins

Installation

pip install -U langchain-jenkins

And you should configure credentials by setting the following environment variables:

export JENKINS_SERVER="https://example.com"
export USERNAME="admin"
export PASSWORD=""
  • TODO: fill this out

Tools

JenkinsJobRun class exposes tool models from Jenkins.

from langchain_jenkins import JenkinsAPIWrapper, JenkinsJobRun

tools = [
    JenkinsJobRun(
        api_wrapper=JenkinsAPIWrapper(
            jenkins_server="https://example.com",
            username="admin",
            password=os.environ["PASSWORD"],
        )
    )
]

Create the Jenkins job

jenkins_job_content = ""
src_file = "job1.xml"
with open(src_file) as fread:
    jenkins_job_content = fread.read()
tools[0].invoke({"job": "job01", "config_xml": jenkins_job_content, "action": "create"})

Run the job

tools[0].invoke({"job": "job01", "parameters": {}, "action": "run"})

Get job status

resp = tools[0].invoke({"job": "job01", "number": 1, "action": "status"})
if not resp["inProgress"]:
    print(resp["result"])

Delete the job

tools[0].invoke({"job": "job01", "action": "delete"})

Release files for langchain-jenkins 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-jenkins 0.1.2
File Size Uploaded
langchain_jenkins-0.1.2.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-jenkins 0.1.2
File Interpreter ABI Platform
langchain_jenkins-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 kB

Release files / langchain_jenkins-0.1.2.tar.gz

Download URL langchain_jenkins-0.1.2.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5a87208ec07aea8325d8288e92457b30a18f090c6973bb397aed07bbbc51960e
BLAKE2b-256 checksum
How to use checksums
4baac20747988df6c4f35879be59b79b4b2d31fbf6decf301b2ac7eba1c0d405
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.12.8 Darwin/23.6.0

Release files / langchain_jenkins-0.1.2-py3-none-any.whl

Download URL langchain_jenkins-0.1.2-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37b8fbc95a1d8a9500168ebe58af92a4efe44d3c172c3cc88d93542b5d5616a9
BLAKE2b-256 checksum
How to use checksums
c9ee102a39022d0378eab3b3f0e78cf809ac65b2c12d17ab171cafd15a4cba0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.12.8 Darwin/23.6.0

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page