Skip to content

Commit 6078abe

Browse files
committed
Merge pull request #11 from bcicen/add-setup-py
resolves #7 resolves #11
2 parents 28363d9 + a9905f2 commit 6078abe

6 files changed

Lines changed: 42 additions & 14 deletions

File tree

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
#usage:
1+
# Install:
2+
```bash
3+
git clone https://github.com/LD250/jenkins-cli-python.git
4+
cd jenkins-cli-python
5+
python setup.py install
6+
```
7+
8+
# Usage:
29

310
```bash
4-
jenkins [-h] [--host jenkins-url] [--username username]
11+
jenkins-cli [-h] [--host jenkins-url] [--username username]
512
[--password password]
613
{jobs,queue,building,start,info,set_branch,stop,console} ...
714
```
@@ -16,7 +23,7 @@ Server URL, Username and password may be specified either by the command line ar
1623
--password password Jenkins Password
1724
```
1825

19-
#Available commands:
26+
# Available commands:
2027
```bash
2128
{jobs,queue,building,start,info,set_branch,stop,console}
2229
jobs Show all jobs and their status

jenkins

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
##!/usr/bin/env python
21
import argparse
3-
import jenkins_cli
4-
2+
from jenkins_cli.cli import JenkinsCli, CliException
53

64
def main():
75
parser = argparse.ArgumentParser(prog='jenkins',
@@ -45,12 +43,12 @@ def main():
4543

4644
args = parser.parse_args()
4745
try:
48-
jenkins_cli.JenkinsCli(args).run_command(args)
49-
except jenkins_cli.jenkins.JenkinsException as e:
46+
JenkinsCli(args).run_command(args)
47+
except jenkins.JenkinsException as e:
5048
print e
5149
except KeyboardInterrupt:
5250
print "Aborted"
53-
except jenkins_cli.CliException as e:
51+
except CliException as e:
5452
print e
5553
print "Read jenkins --help"
5654
# except Exception as e:

jenkins_cli/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version = '0.1'

setup.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import os
2+
from setuptools import setup, find_packages
3+
4+
here = os.path.abspath(os.path.dirname(__file__))
5+
with open(os.path.join(here, 'README.md')) as f:
6+
README = f.read()
7+
8+
exec(open(os.path.join(here, 'jenkins_cli/version.py')).read())
9+
10+
requires = [ 'pbr>=1.3.0',
11+
'python-jenkins>=0.4.8',
12+
'six>=1.9.0' ]
13+
14+
setup(
15+
name='jenkins-cli',
16+
version=version,
17+
description='Commandline interface for Jenkins',
18+
long_description=README,
19+
author='Denys Levchenko',
20+
keywords='jenkins, commandline, cli',
21+
license='http://opensource.org/licenses/MIT',
22+
packages=find_packages(),
23+
install_requires=requires,
24+
entry_points = {
25+
'console_scripts' : [ 'jenkins = jenkins_cli:main' ]
26+
}
27+
)

0 commit comments

Comments
 (0)