Merge "Enable ignore_cache flag on jenkins_jobs.ini"
This commit is contained in:
commit
7959bf44db
@ -44,6 +44,7 @@ the following format::
|
||||
user=USERNAME
|
||||
password=PASSWORD
|
||||
url=JENKINS_URL
|
||||
ignore_cache=IGNORE_CACHE_FLAG
|
||||
|
||||
**user**
|
||||
This should be the name of a user previously defined in Jenkins.
|
||||
@ -60,6 +61,10 @@ the following format::
|
||||
**url**
|
||||
The base URL for your Jenkins installation.
|
||||
|
||||
**ignore_cache**
|
||||
(Optional) If set to True, jenkins job builder
|
||||
won't be using any cache.
|
||||
|
||||
|
||||
Running
|
||||
-------
|
||||
|
@ -2,3 +2,4 @@
|
||||
user=jenkins
|
||||
password=1234567890abcdef1234567890abcdef
|
||||
url=https://jenkins.example.com
|
||||
ignore_cache=True
|
||||
|
@ -90,17 +90,26 @@ def main():
|
||||
config.set("jenkins", "url", "http://localhost:8080")
|
||||
config.set("jenkins", "user", None)
|
||||
config.set("jenkins", "password", None)
|
||||
config.set("jenkins", "ignore_cache", False)
|
||||
logger.debug("Not reading config for test output generation")
|
||||
else:
|
||||
raise jenkins_jobs.errors.JenkinsJobsException(
|
||||
"A valid configuration file is required when not run as a test")
|
||||
|
||||
logger.debug("Config: {0}".format(config))
|
||||
|
||||
# check the ignore_cache setting: first from command line,
|
||||
# if not present check from ini file
|
||||
ignore_cache = False
|
||||
if options.ignore_cache:
|
||||
ignore_cache = options.ignore_cache
|
||||
elif config.has_option('jenkins', 'ignore_cache'):
|
||||
ignore_cache = config.get('jenkins', 'ignore_cache')
|
||||
builder = jenkins_jobs.builder.Builder(config.get('jenkins', 'url'),
|
||||
config.get('jenkins', 'user'),
|
||||
config.get('jenkins', 'password'),
|
||||
config,
|
||||
ignore_cache=options.ignore_cache,
|
||||
ignore_cache=ignore_cache,
|
||||
flush_cache=options.flush_cache)
|
||||
|
||||
if options.command == 'delete':
|
||||
|
Loading…
Reference in New Issue
Block a user