From 3bb0c6d209821505e9a680e8b0d1af76b0928833 Mon Sep 17 00:00:00 2001 From: Ivan Remizov Date: Thu, 4 May 2017 23:00:24 +0300 Subject: [PATCH] Create sample layout for library This patch creates directory layout. This layout is not final and will be changed in future --- .gitignore | 8 +++++++ conf/jenkins_job.ini.example | 14 ++++++++++++ conf/requirements.txt | 2 ++ library/macros/.gitkeep | 0 library/scripts/.gitkeep | 0 library/templates/.gitkeep | 0 reference/servers/example/projects/.gitkeep | 0 tox.ini | 25 +++++++++++++++++++++ 8 files changed, 49 insertions(+) create mode 100644 .gitignore create mode 100644 conf/jenkins_job.ini.example create mode 100644 conf/requirements.txt create mode 100644 library/macros/.gitkeep create mode 100644 library/scripts/.gitkeep create mode 100644 library/templates/.gitkeep create mode 100644 reference/servers/example/projects/.gitkeep create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..63638aa --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +*.pyc +output/ +*.ini +!tox.ini +.tox +.idea +.venv +venv \ No newline at end of file diff --git a/conf/jenkins_job.ini.example b/conf/jenkins_job.ini.example new file mode 100644 index 0000000..0e600d1 --- /dev/null +++ b/conf/jenkins_job.ini.example @@ -0,0 +1,14 @@ +[jenkins] +user=my_username +password=my_secret_password +url=https://my.jenkins.com/ +query_plugins_info=False + +[job_builder] +ignore_cache=True +keep_descriptions=False +recursive=True +include_path=.:scripts + +[__future__] +param_order_from_yaml=false diff --git a/conf/requirements.txt b/conf/requirements.txt new file mode 100644 index 0000000..dbd648c --- /dev/null +++ b/conf/requirements.txt @@ -0,0 +1,2 @@ +jenkins-job-builder==1.6.1 +git+https://github.com/bookwar/jenkins-job-builder-stash-pr \ No newline at end of file diff --git a/library/macros/.gitkeep b/library/macros/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/library/scripts/.gitkeep b/library/scripts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/library/templates/.gitkeep b/library/templates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/reference/servers/example/projects/.gitkeep b/reference/servers/example/projects/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..f2d193c --- /dev/null +++ b/tox.ini @@ -0,0 +1,25 @@ +[tox] +minversion = 1.6 +skipsdist = True +envlist = example,pep8 + +[testenv] +basepython = python2 +deps = -r{toxinidir}/conf/requirements.txt +usedevelop = False +commands = + jenkins-jobs --conf conf/jenkins_job.ini.example test reference/servers/{envname}:library -o {toxinidir}/output/{envname} + +[testenv:example] +commands = + jenkins-jobs --conf conf/jenkins_job.ini.example test reference/servers/{envname}:library -o {toxinidir}/output/{envname} + +[testenv:pep8] +deps = flake8 +commands = flake8 + +[flake8] +exclude = .git,.tox,.venv,venv +show-pep8 = True +show-source = True +count = True \ No newline at end of file