An integration package connecting Jenkins and LangChain
Project description
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"})
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file langchain_jenkins-0.1.2.tar.gz
.
File metadata
- Download URL: langchain_jenkins-0.1.2.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.12.8 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
5a87208ec07aea8325d8288e92457b30a18f090c6973bb397aed07bbbc51960e
|
|
MD5 |
7d84796ffc957ea904022b81d5b1aa22
|
|
BLAKE2b-256 |
4baac20747988df6c4f35879be59b79b4b2d31fbf6decf301b2ac7eba1c0d405
|
File details
Details for the file langchain_jenkins-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: langchain_jenkins-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.12.8 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
37b8fbc95a1d8a9500168ebe58af92a4efe44d3c172c3cc88d93542b5d5616a9
|
|
MD5 |
86e881df14f8ec4cdd1769e87ae27d25
|
|
BLAKE2b-256 |
c9ee102a39022d0378eab3b3f0e78cf809ac65b2c12d17ab171cafd15a4cba0f
|