diff options
author | Fathi Boudra <fathi.boudra@linaro.org> | 2017-04-06 15:19:10 +0300 |
---|---|---|
committer | Fathi Boudra <fathi.boudra@linaro.org> | 2017-04-06 15:19:10 +0300 |
commit | 6776de4d26a1e3838995558b5f170135a4a6a5c7 (patch) | |
tree | 3625b27be01fa4c99d0febff8ed89844b3615a65 /run-jjb.py | |
parent | c145de0d82d9ee81b255cb0492202773761b54d7 (diff) |
trigger-ci-job-configs: use credentials binding for jenkins-job-builders
Change-Id: I0a0dc403643acea342a382ae4711abfea2496b95
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Diffstat (limited to 'run-jjb.py')
-rwxr-xr-x | run-jjb.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/run-jjb.py b/run-jjb.py index 18608e30ef..c4188b800f 100755 --- a/run-jjb.py +++ b/run-jjb.py @@ -64,6 +64,10 @@ for filename in data.splitlines(): # Remove dplicate entries in the list filelist = list(set(filelist)) +jenkins_jobs_ini = '[job_builder]\nignore_cache=True\nkeep_descriptions=False\n\n[jenkins]\nuser=john.doe@linaro.org\npassword=xxx\nurl=https://ci.linaro.org/\n' +with open('jenkins_jobs.ini', 'w') as f: + f.write(jenkins_jobs_ini) + for conf_filename in filelist: with open(conf_filename) as f: buffer = f.read() @@ -76,7 +80,10 @@ for conf_filename in filelist: with open('template.yaml', 'w') as f: f.write(buffer) try: - arguments = [jjb_cmd, 'update', 'template.yaml'] + arguments = [jjb_cmd, '--conf=jenkins_jobs.ini', + '--user=%s' % os.environ.get('JJB_USER'), + '--password=%s' % os.environ.get('JJB_PASSWORD'), + 'update', 'template.yaml'] # arguments = [jjb_cmd, 'test', conf_filename, '-o', 'out'] proc = subprocess.Popen(arguments, stdin=subprocess.PIPE, |