services/jenkins-scripts.git
11 years agoPylint for requests/mailer.py
Lingchaox Xin [Thu, 4 Jul 2013 02:48:39 +0000 (10:48 +0800)]
Pylint for requests/mailer.py

Change-Id: I9dd63af3776022f53bafb7590f0bb549907c8335

11 years agoDo NOT keep json backwards compatibility with Python 2.5
Lingchaox Xin [Wed, 3 Jul 2013 08:18:47 +0000 (16:18 +0800)]
Do NOT keep json backwards compatibility with Python 2.5

Change-Id: Ieb0e96aa79a9a3b2e91eb27ad269a2b8479f632c

11 years agoMove get_gerrit_event method to common/gerrit.py
Lingchaox Xin [Wed, 3 Jul 2013 08:11:22 +0000 (16:11 +0800)]
Move get_gerrit_event method to common/gerrit.py

No need to remain gerritevent module to keep get_gerrit_event method.

Change-Id: I76cb0419255e8bdcb495305b69594809ca15457d

11 years agoPylint for job_mail_sender.py
Lingchaox Xin [Tue, 2 Jul 2013 08:35:51 +0000 (16:35 +0800)]
Pylint for job_mail_sender.py

Remove base64 encoded judgement, thanks Ed's suggestion,
"it's better to ask for forgiveness than permission".

Change-Id: I8df8a40c55a9aace811f1c1ebabcb8ecf7a1316d

11 years agoFix multiple exceptions handle
Lingchaox Xin [Wed, 3 Jul 2013 06:28:15 +0000 (14:28 +0800)]
Fix multiple exceptions handle

Change-Id: I95483f488a7a1a6487c9a3c6cec95829eb9e19b9

11 years agoPylint for job_jobs_dispatcher.py
Lingchaox Xin [Tue, 2 Jul 2013 07:12:07 +0000 (15:12 +0800)]
Pylint for job_jobs_dispatcher.py

Change-Id: Iaa8150a9f03db2030549791823ccebef03979df8

11 years agoPylint for job_imager.py
Lingchaox Xin [Tue, 2 Jul 2013 06:50:36 +0000 (14:50 +0800)]
Pylint for job_imager.py

Change-Id: I0aab62dd84faa0c9b1426ab0cf9789afc24bedcc

11 years agoRevert Exception handle in 2c7ea4c
Lingchaox Xin [Mon, 1 Jul 2013 08:33:51 +0000 (16:33 +0800)]
Revert Exception handle in 2c7ea4c

Change-Id: I0f9f21abf483f47339bcf2d153b7f65e211e9db0

11 years agoPylint for job_request.py and cleanups
Lingchaox Xin [Mon, 1 Jul 2013 07:38:09 +0000 (15:38 +0800)]
Pylint for job_request.py and cleanups

Change-Id: Ia47b56ba66211374a4c3b145953155f45fdc54aa

11 years agoAdd more specific exception for backenddb Entity
Lin Yang [Mon, 1 Jul 2013 08:18:52 +0000 (16:18 +0800)]
Add more specific exception for backenddb Entity

Change-Id: Ie232a034c1fc753d3c07d83b4a612a51ac395890
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
11 years agoAdapted for new git describe method in gbp
Lingchaox Xin [Mon, 1 Jul 2013 06:49:55 +0000 (14:49 +0800)]
Adapted for new git describe method in gbp

Change-Id: Ia7e4dbbb44dcfa0587c65f9d83d0c7ece280ecd4

11 years agoPylint for job_submitobs.py
Lingchaox Xin [Mon, 1 Jul 2013 02:17:06 +0000 (10:17 +0800)]
Pylint for job_submitobs.py

Change-Id: Ie15d2abe06bbfc65ae288ffbf5bdd1f5068be2e2

11 years agofix several errors to make prerelease process work again
Hasan Wan [Mon, 1 Jul 2013 07:11:44 +0000 (15:11 +0800)]
fix several errors to make prerelease process work again

Change-Id: I3b9ea88daf18f03cf4b257d82af9404dd76fdf0a
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agoAvoid import whole gbp.rpm module
Lin Yang [Mon, 1 Jul 2013 03:00:31 +0000 (11:00 +0800)]
Avoid import whole gbp.rpm module

Change-Id: I5b5cf368f968690b93bff8c30f0428038f1e9e9f
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
11 years agoCatch exception when git describe
Lin Yang [Mon, 1 Jul 2013 02:58:27 +0000 (10:58 +0800)]
Catch exception when git describe

Change-Id: I0c5b19348ae8b4a09f884929dd40aa129a6b3ebb
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
11 years agoFix call get_obs_repo_map error
Lin Yang [Mon, 1 Jul 2013 04:18:46 +0000 (12:18 +0800)]
Fix call get_obs_repo_map error

Change-Id: I005c26b0d1af84d50419ebd6b6a2fdd37383bd67
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
11 years agoRepomaker related codes cleanups
Lingchaox Xin [Fri, 28 Jun 2013 09:01:48 +0000 (17:01 +0800)]
Repomaker related codes cleanups

Change-Id: I4b8baceb14063997b1ca01246b5a650a8f10f6e7
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com>
11 years agoFill obsrepomaps when reading repos.yaml
Ed Bartosh [Fri, 28 Jun 2013 12:17:25 +0000 (15:17 +0300)]
Fill obsrepomaps when reading repos.yaml

obsrepomaps is a mapping between OBS project name and repo name from
repos.yaml. This change implements filling mappings while parsing
repo.yaml in BackendDb::read_repos()

Fixes: #1031

Change-Id: I01efb4b1717e5971a83a1984dc2e3245244977d5
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoBackendDB: Get rid of latest-snapshot field
Ed Bartosh [Fri, 28 Jun 2013 11:36:22 +0000 (14:36 +0300)]
BackendDB: Get rid of latest-snapshot field

All application-level fields should be filled in get_prerelease_data API.
Redis db now contains only data from repos.yaml. if something else is
needed on application level it should be handled in get_prerelease_data
or another application level API.

As latest-snapshot field is not used anywhere it doesn't need to
be moved to get_prerelease_data. So, removing it should be safe.

Change-Id: I442d2be43e8fd1b66a8e6e4e73288b421f0c0f7a
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoImplemented BackendDB/get_releases API
Ed Bartosh [Fri, 28 Jun 2013 10:49:47 +0000 (13:49 +0300)]
Implemented BackendDB/get_releases API

This API should be used to get latest release for the product.

Fixes: #1027

Change-Id: Id05bf798557dccc60ebd5cd5c19a20b345e3c8e2
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoadd new job to store repos.yaml to redis
Lin Yang [Fri, 28 Jun 2013 08:45:32 +0000 (16:45 +0800)]
add new job to store repos.yaml to redis

This job will monitor repos.yaml project maintained in gerrit, if anything
change, it will store this change to redis.

Change-Id: I0ed3bc7f4a2a83a9ef7a4ce53fbb8971de4a6e1e
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
11 years agofix mistakes in job_pre_releas_obs
Hasan Wan [Fri, 28 Jun 2013 03:20:47 +0000 (11:20 +0800)]
fix mistakes in job_pre_releas_obs

Change-Id: I3a090b04471e2cb5360a89a967073d5cb1cc34e8
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agoImplemented BackendDB/get_obs_repo_map API
Ed Bartosh [Thu, 27 Jun 2013 13:22:08 +0000 (16:22 +0300)]
Implemented BackendDB/get_obs_repo_map API

This API should be used to map OBS project to 'repo' value used in .ks
file for the repository from this OBS project.

Change-Id: I9047e31a9ab604a8d3f504077817c2c9618e1d7d

11 years agoSpec clean with spec-cleaner
Lingchaox Xin [Thu, 27 Jun 2013 01:42:01 +0000 (09:42 +0800)]
Spec clean with spec-cleaner

Maybe we should execute it when we change specfile each time to keep
a consistent style.

Change-Id: I28fb0b6a85f89ef95609c78a5a3d654428b54b83

11 years agoAdd python-Cheetah dependence
Lingchaox Xin [Thu, 27 Jun 2013 01:26:53 +0000 (09:26 +0800)]
Add python-Cheetah dependence

This patch should fix `unable to import Cheetah.Template` in
requests/mailer.py.

Change-Id: I72dd92be5203772d64753e276b19f0927b2c475c

11 years agoclean up group/patterns/buildconf files in repodata
Zhang Qiang [Fri, 31 May 2013 08:53:34 +0000 (16:53 +0800)]
clean up group/patterns/buildconf files in repodata

Change-Id: I49223221b477510a8d43386248df662eaaa6e71c

11 years agoput build conf file under repodata directory
Zhang Qiang [Fri, 31 May 2013 08:45:52 +0000 (16:45 +0800)]
put build conf file under repodata directory

Change-Id: I77444c09559eb244e200db5f74bd53e132df1580

11 years agocleanup should be called when SR end-of-life
Hasan Wan [Wed, 26 Jun 2013 03:23:18 +0000 (11:23 +0800)]
cleanup should be called when SR end-of-life

Change-Id: Ibbc123ee5c71513d07a6fbf62e0f108d751305fa
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agoadapted to new trigger method
Hasan Wan [Wed, 26 Jun 2013 03:02:53 +0000 (11:02 +0800)]
adapted to new trigger method

Change-Id: Iaed4a53cf6896f956b326dc47580c5ac7e63603f
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agomodify to fit obs event keyword change
Lin Yang [Wed, 26 Jun 2013 07:27:27 +0000 (15:27 +0800)]
modify to fit obs event keyword change

Change-Id: I0ea579bb83271c5f5ce99619ea0c5223ca6b4625
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
11 years agoRemove common/errors.py, no need to keep it
Lingchaox Xin [Wed, 26 Jun 2013 03:07:48 +0000 (11:07 +0800)]
Remove common/errors.py, no need to keep it

Change-Id: Id0a8f8e8f6acd70625c15d4b88210a3b8c64cae6

11 years agoAdd blocked as a OBS active status
Lin Yang [Tue, 25 Jun 2013 08:35:40 +0000 (16:35 +0800)]
Add blocked as a OBS active status

OBS build status blocked means its dependency package is still building, in
this situation, it should continue to wait until next repo publish event.

Change-Id: I338a50a6cc7dc29ded3b9b0f07c3bcdc98006c6d
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
11 years agoAdd buildcheck project name check
Lin Yang [Tue, 25 Jun 2013 08:29:11 +0000 (16:29 +0800)]
Add buildcheck project name check

Check whether this repo publish event is from build check project at the
beginning. If not, exit directly.

Change-Id: I9c5973a3b426f294ac7697e6ea76d8b4a3e013cf
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
11 years agoPylint for common/gerrit.py
Lingchaox Xin [Thu, 20 Jun 2013 07:32:06 +0000 (15:32 +0800)]
Pylint for common/gerrit.py

Change-Id: I756344890766eafbbebe382f78a28f6418600471

11 years agoPylint for common/runner.py and cleanups
Lingchaox Xin [Thu, 20 Jun 2013 02:55:25 +0000 (10:55 +0800)]
Pylint for common/runner.py and cleanups

Change-Id: I384d50dc13c07f129e1e8f30bbd4691c671e7f1e

11 years agoPylint for common/repomaker.py
Lingchaox Xin [Thu, 20 Jun 2013 02:36:09 +0000 (10:36 +0800)]
Pylint for common/repomaker.py

In hashlib module, md5, sha256 ... are defined dynamically according to
Openssl library availability in order to use the fastest available
implementation, but pylint can NOT understand it, so diable it.

Change-Id: I5f43625fe87aa0971a9a109258b6529c2ab9857f

11 years agoFix self.describe method call in gbp.git.repository
Lingchaox Xin [Wed, 19 Jun 2013 09:04:59 +0000 (17:04 +0800)]
Fix self.describe method call in gbp.git.repository

A new method named describe appeared in gbp 36341dda, so use it instead
of using customed describe method.

Change-Id: Ie9cf5f8c61246f957789a102930e3b81cafac98d
Reported-by: Hao H Huang <hao.h.huang@intel.com>
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com>
11 years agoFixed packaging
Ed Bartosh [Tue, 18 Jun 2013 16:51:46 +0000 (19:51 +0300)]
Fixed packaging

Fixed empty binary package
Changed versioning scheme

Change-Id: I01e0083e9c79c6d9784b5ba0197a598a94ee00cd
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoPylint for common/imagedata.py
Lingchaox Xin [Wed, 19 Jun 2013 08:43:34 +0000 (16:43 +0800)]
Pylint for common/imagedata.py

Change-Id: I7203dd08ff9454c4f45bffa6d851377b7f38442f

11 years agoPylint for common/mapping.py
Lingchaox Xin [Tue, 18 Jun 2013 09:39:33 +0000 (17:39 +0800)]
Pylint for common/mapping.py

Change-Id: Ibbac7014c7c02daeb4f034a504e1b96587128b1c

11 years agoPylint for common/obspkg.py
Lingchaox Xin [Tue, 18 Jun 2013 06:22:44 +0000 (14:22 +0800)]
Pylint for common/obspkg.py

Use absolute import instead of relative import, replace `cmp` parameter
with `key` since the latter is faster.

Change-Id: I004dff6de87c17935e8bb6ec36a3426b94bdd4d6

11 years agoAdded support of complex data types to BackendDB
Ed Bartosh [Mon, 17 Jun 2013 12:50:53 +0000 (15:50 +0300)]
Added support of complex data types to BackendDB

It's implemented using json. When some key or list item or string is
marked as jsoned BackendDB will try to encode it to json before
storing in Redis and decode it when retriving.

Change-Id: Ifdba0453fa9bbef173cef301e587ded536c98be3
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoPylint for job_obsevent_dispatcher.py
Lingchaox Xin [Mon, 17 Jun 2013 06:44:33 +0000 (14:44 +0800)]
Pylint for job_obsevent_dispatcher.py

Use pylint disable-msg=E1101 since sys.setdefaultencoding is special
and gets removed from the namespace.

In dict, `in` is not just pythonic but also in performance than `has_key`, e.g.:

$ python -mtimeit -s'd=dict.fromkeys(range(99))' '12 in d'
10000000 loops, best of 3: 0.0492 usec per loop
$ python -mtimeit -s'd=dict.fromkeys(range(99))' 'd.has_key(12)'
10000000 loops, best of 3: 0.0937 usec per loop

In addition, has_key() is deprecated in favor of key in d:

http://docs.python.org/2/library/stdtypes.html#dict.has_key

Change-Id: Ic8b087d99ff8557c0c7f6a786478c037be03f0cf
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com>
11 years agoPylint for common/git.py
Lingchaox Xin [Fri, 14 Jun 2013 03:05:45 +0000 (11:05 +0800)]
Pylint for common/git.py

Change-Id: Ibcafeff673d52193c8a9e66ead89904211a49005

11 years agoPylint for common/utils.py
Lingchaox Xin [Fri, 14 Jun 2013 02:20:10 +0000 (10:20 +0800)]
Pylint for common/utils.py

Replace apply() with the extended call syntax:
function(*args, **keywords).

Fix no RuntimeException found error.

Change-Id: I6dbe96c23e982726d4ac0281cb2075288d5f24b9

11 years agoPylint for common/buildtrigger.py
Lingchaox Xin [Fri, 14 Jun 2013 01:19:05 +0000 (09:19 +0800)]
Pylint for common/buildtrigger.py

Change-Id: I0ae68ca260ad6397e96baca25d4968ea1224ce46

11 years agoPylint for common/buildservice.py and typo fixed
Lingchaox Xin [Fri, 14 Jun 2013 01:09:28 +0000 (09:09 +0800)]
Pylint for common/buildservice.py and typo fixed

Change-Id: I17568aec04f840765ea57146d838fbba2ad9073b

11 years agoRemove unused mysql lib
Lingchaox Xin [Fri, 14 Jun 2013 00:24:40 +0000 (08:24 +0800)]
Remove unused mysql lib

Change-Id: Id88cdb9fe96811142900b03796da23e9f988707d

11 years agoPylint for common/rpmlint.py
Lingchaox Xin [Thu, 13 Jun 2013 07:38:45 +0000 (15:38 +0800)]
Pylint for common/rpmlint.py

Change-Id: Ib69c6c20cc6db5191517e1c49e0e14a854b745e0

11 years agoPylint for common/tempbuildpkg.py
Lingchaox Xin [Thu, 13 Jun 2013 05:41:16 +0000 (13:41 +0800)]
Pylint for common/tempbuildpkg.py

Change-Id: I04695536c813585e54eee1a4b9ad998ddc37f050

11 years agoImplemented get_prerelease_data
Ed Bartosh [Sat, 8 Jun 2013 20:54:31 +0000 (23:54 +0300)]
Implemented get_prerelease_data

Collected all pre-release paths and url making in one place:
application level pre-release API get_prerelease_data. This function
returns all data, required by prerelease applications.

This function can be moved under common/ when there will be more than
one consumers of prerelease data.

Left only read_ and get_ methods in BackendDB as the rest of
functionality is implemented in get_prerelease_data.

Change-Id: I40a311f98d32002cdd10931baa80b75f9b2955de
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoPylint for common/send_mail.py
Lingchaox Xin [Sun, 9 Jun 2013 03:17:07 +0000 (11:17 +0800)]
Pylint for common/send_mail.py

The various uppercase names were renamed in Python 2.5. The base email
package's __init__.py does some tricks to make the old names work in
python, but because pylint has its own separate method of doing imports,
those tricks don't work in pylint. So obey pylint.

Change-Id: If03641ae94e7f1da34a2593913f80c2e5bc7034a

11 years agoAdd function to cleanup pre-release repos
Hasan Wan [Thu, 6 Jun 2013 07:09:14 +0000 (15:09 +0800)]
Add function to cleanup pre-release repos

Change-Id: I51f4061baebd32b71574e19b5721a42688ecf36d
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agofix a typo in job_pre_release_gerrit
Hasan Wan [Thu, 6 Jun 2013 06:18:58 +0000 (14:18 +0800)]
fix a typo in job_pre_release_gerrit

Change-Id: I610bf6bf26f799593d740f3b130c8834a9431799
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agosync image to SYNC_DEST
Hasan Wan [Thu, 6 Jun 2013 03:48:02 +0000 (11:48 +0800)]
sync image to SYNC_DEST

Change-Id: Iab1ae95b46b005e26da52b4089c9b7b9aa35495c
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agoconvert port number to int
Hasan Wan [Wed, 5 Jun 2013 03:02:28 +0000 (11:02 +0800)]
convert port number to int

Change-Id: I6a3419ae6528603fe734b2bbcd06fa67e8a10850
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agocheck the repo status before start create repo
Hasan Wan [Fri, 31 May 2013 09:06:51 +0000 (17:06 +0800)]
check the repo status before start create repo

Change-Id: Iffe047b3d5a3bed7fe100c941128549dec5bcc9f
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agoremove the old package if exists, remove the debug message
Hasan Wan [Fri, 31 May 2013 08:44:50 +0000 (16:44 +0800)]
remove the old package if exists, remove the debug message

Change-Id: If18611e8398ec105c63d2f2cf993bb5f290ac2ba
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agofix some errors when working with backenddb
Hasan Wan [Thu, 30 May 2013 05:36:16 +0000 (13:36 +0800)]
fix some errors when working with backenddb

Change-Id: I0aaa891bde3c6151a7e9e81212054d5f5b7adba3
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agojob_pre_release_obs: code cleanup
Ed Bartosh [Mon, 3 Jun 2013 13:44:02 +0000 (16:44 +0300)]
job_pre_release_obs: code cleanup

cleaned up and restructured the code of job_pre_release_obs

Change-Id: Icd8e087505850942d8d58fe5ca6cafdf52576087
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoCleaned up trigger_image_creation function
Ed Bartosh [Mon, 3 Jun 2013 12:07:12 +0000 (15:07 +0300)]
Cleaned up trigger_image_creation function

Change-Id: I59503aaba7612902c60f8a585248218c29821783
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoRemoved testprojects/
Ed Bartosh [Mon, 3 Jun 2013 11:18:08 +0000 (14:18 +0300)]
Removed testprojects/

The only thing which is used from testprojects/ was
get_prerelease_project_name function. Moved it to
job_pre_release_gerrit as it was used only there. If it will be used
somewhere else we can move it to common/

Change-Id: I4c1cb26b56e8bb369f8bd6f57004a06ab693c17f
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoCode cleanup
Ed Bartosh [Mon, 3 Jun 2013 11:01:23 +0000 (14:01 +0300)]
Code cleanup

Fixed unused imports, using .keys() method for dict and other small code
style issues.

Change-Id: I9c66e60ddd3f879f51f8991c345e2a006b3b7360
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoFix unittests' errors
Lingchaox Xin [Thu, 30 May 2013 03:19:09 +0000 (11:19 +0800)]
Fix unittests' errors

Change-Id: Id18a6f378575ca9a2434a98c716de2457c92719a

11 years agoFix tag exsisting check logic
Lingchaox Xin [Wed, 29 May 2013 02:40:55 +0000 (10:40 +0800)]
Fix tag exsisting check logic

We maybe need rev_parse method to ensure tag exsisting indeed,
rather than simple str split.

Change-Id: I672fc38b8d839d0fe54890fb7e339b1564585a32

11 years agoFix spec file logic
Lingchaox Xin [Tue, 28 May 2013 03:23:56 +0000 (11:23 +0800)]
Fix spec file logic

We must ensure /etc/sysconfig/jenkins existing, then come next;
And also update it from obs.

Change-Id: Ibb7757fbdf61f5a4860208fb1a7646b07b6bb780

11 years agoAdd interface to query prerelease related info
Lin Yang [Wed, 29 May 2013 09:50:59 +0000 (17:50 +0800)]
Add interface to query prerelease related info

1. Support List and String type in redis, besides Dict, to support more type
   backend info
2. Add interface get_project_data to query prerelease info

Change-Id: I6718930435353e7fe4ff110e2cb65100544a98e4
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
11 years agouse target project to get backend data
Hasan Wan [Wed, 29 May 2013 09:05:29 +0000 (17:05 +0800)]
use target project to get backend data

Change-Id: Icb823f6f8389c95eb1b1cd5750d19c4409f9ae39
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agouse dict to store ks info, save updated ks file to builddata dir
Hasan Wan [Wed, 29 May 2013 08:49:45 +0000 (16:49 +0800)]
use dict to store ks info, save updated ks file to builddata dir

Change-Id: I14f242fd791ce02ce6e3703fd28c7e9553a7ebf8
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agoremove image conf operations
Hasan Wan [Wed, 29 May 2013 06:47:44 +0000 (14:47 +0800)]
remove image conf operations

Change-Id: I4cac0a138cdd3d9b595fb66524edbdf44fdc0135
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agoMove all image conf operations into imagedata class,
Hasan Wan [Wed, 29 May 2013 06:43:02 +0000 (14:43 +0800)]
Move all image conf operations into imagedata class,
repomaker use imagedata class to handle image conf

Change-Id: I8d2d57c3e8d5029cb645057cffd7ff0134feff47
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agotrigger imager jobs after repo created
Hasan Wan [Wed, 29 May 2013 02:27:36 +0000 (10:27 +0800)]
trigger imager jobs after repo created

Change-Id: I0ffced291ba57a20b064abfc4d2ba03a1779314f
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agofix adding group/pattern files to repo
Zhang Qiang [Wed, 29 May 2013 05:20:09 +0000 (13:20 +0800)]
fix adding group/pattern files to repo

Change-Id: I047b6d68e851dde94b63168b9f749e9d5093b42b

11 years agomake pre-release repo-maker works on slave
Hasan Wan [Mon, 27 May 2013 08:55:06 +0000 (16:55 +0800)]
make pre-release repo-maker works on slave

Change-Id: I39d2b1904ed64460fc89ff8e3a12cbe86eb9dc6a
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agofix errors about class importing and file opening
Hasan Wan [Mon, 27 May 2013 08:29:01 +0000 (16:29 +0800)]
fix errors about class importing and file opening

Change-Id: I085820d9f9c0e04b501769907c943fe999e0a503
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agoskip the buildconf section if not present
Hasan Wan [Mon, 27 May 2013 07:39:00 +0000 (15:39 +0800)]
skip the buildconf section if not present

Change-Id: I5cd4803dbf1f0d6ca68183feeebe849857b417f4
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agofix an error when find files
Hasan Wan [Mon, 27 May 2013 06:37:30 +0000 (14:37 +0800)]
fix an error when find files

Change-Id: If5ea13ff2b6c1303fb6925c55c4681c4f125b689
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agofix import error and function name mistakes
Hasan Wan [Mon, 27 May 2013 03:16:59 +0000 (11:16 +0800)]
fix import error and function name mistakes

Change-Id: Ib202849860fe5e93f85e1ad841c24df465312931
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agofix event_type key error
Hasan Wan [Mon, 27 May 2013 03:01:24 +0000 (11:01 +0800)]
fix event_type key error

Change-Id: Iabc65296d56b3c7803c1129b8896c2a56217e131
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agoFix rpmlint checker bug when rpmlint config not exists
Lingchaox Xin [Fri, 24 May 2013 03:20:39 +0000 (11:20 +0800)]
Fix rpmlint checker bug when rpmlint config not exists

We have added git-obs-mapping project judgement to ensure it existing
indeed, so give an equal treatment to rpmlint-config project in Gerrit.

Change-Id: I70ed0314651bcd1d327279e915a2b578ecb11ecc

11 years agoImplemented ImageData API
Ed Bartosh [Mon, 20 May 2013 17:48:35 +0000 (20:48 +0300)]
Implemented ImageData API

This API is responcible for generating and parsing images.xml

Change-Id: Id0e36d6371f173b7cdaf862bc120db886d42e830
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agodraft implementation of BackendDB API
Ed Bartosh [Sat, 18 May 2013 21:07:50 +0000 (00:07 +0300)]
draft implementation of BackendDB API

This is generic API, which allows to store repository data in Redis.
API utilizes Redis hashes:
    'repo:<name>' hash contains attributes of the repository and their values

It's also an attempt to build generic API to store any type of data in Redis.
The ideas is that any type of data can be stored in Redis as set of
<type>:<subtype1>:<subtype2>... records, which point to data in Redis
hash format.

For example:
  Git->OBS mappings can be stored as set of keys with this format:
  gitobs-map:<project>:<branch>
  and hashes of this format: {"OBS_project": "home:user:project",
                              "OBS_staging_project": "home:user:staging"}

Format of hashes is not strict, so it can be extended whenever
needed.

Format of keys is stricter, but also flexible in a sense that
it's easy to change it or even increase amount of levels(depth) of it.

Change-Id: I2eb5d92d0ff6f5536a230068783a6507dfd6134d
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoDraft of refactored create_images
Ed Bartosh [Wed, 15 May 2013 17:31:40 +0000 (20:31 +0300)]
Draft of refactored create_images

I'm sending it for review just to show the approach. This code is not
ready for merging yet.

Change-Id: Ibda3f0ac3e95901ea4a972b891860ad3f6cc1b22

11 years agoUsed RepoMaker and BackendDb APIs
Ed Bartosh [Wed, 8 May 2013 15:36:44 +0000 (18:36 +0300)]
Used RepoMaker and BackendDb APIs

Change-Id: Ib81b887c7607149104d2bc5a0bc915cc4af34413
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoFix clone_gitproject invocation in job_policycheck.py
Lingchaox Xin [Thu, 23 May 2013 08:57:25 +0000 (16:57 +0800)]
Fix clone_gitproject invocation in job_policycheck.py

Since we try to clone git project for 3 times in clone_gitproject method,
no need using retry method here.

Change-Id: I07d0c72440e260d3f0e425805f06bcce13c3f545

11 years agocreate temp configuration file when runs on slave
Hasan Wan [Mon, 20 May 2013 06:15:44 +0000 (14:15 +0800)]
create temp configuration file when runs on slave

Change-Id: Ie22e6cf6b9f74f5834afdd006509b9f0e1809907

11 years agoimplement the sync api
Hasan Wan [Thu, 16 May 2013 09:25:40 +0000 (17:25 +0800)]
implement the sync api

Change-Id: I237184d6ffd48ab0a07279eb372500e580f4bf1d
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agoFix function arguments typo and gerrit msg push
Lingchaox Xin [Tue, 14 May 2013 01:40:26 +0000 (09:40 +0800)]
Fix function arguments typo and gerrit msg push

Change-Id: I7ad37f19615ba53f8c0f8f59a33fbc6e27360ac2

11 years agoFinished implementation of builddata API
Ed Bartosh [Wed, 15 May 2013 11:57:50 +0000 (14:57 +0300)]
Finished implementation of builddata API

Updated the code and tests to handle this format of build target:
    <buildtarget name="atom">
      <buildconf>
        <location href="3bd64bd5fa862d99dbc363ccb1557d137b5685bc3bfe9a86bcbf50767da5e2e8-build.conf"/>
        <checksum type="sh256">3bd64bd5fa862d99dbc363ccb1557d137b5685bc3bfe9a86bcbf50767da5e2e8</checksum>
      </buildconf>
      <repo arch="i586" type="binary">repos/atom/i586/packages</repo>
      <repo arch="i586" type="binary">repos/atom/i586/debug</repo>
      <repo arch="x86_64" type="binary">repos/atom/x86_64/packages</repo>
      <repo arch="x86_64" type="binary">repos/atom/x86_64/debug</repo>
      <repo type="source">repos/atom/sources</repo>
    </buildtarget>

Change-Id: Ie300bff66699eb402af4b0ca7eaddc37a238c136

11 years agoImplemented repomaker API
Ed Bartosh [Mon, 13 May 2013 11:38:03 +0000 (14:38 +0300)]
Implemented repomaker API

This API takes care of generating rpm repos in appropriate directory
structure. It also generates build.xml and images.xml

Change-Id: Ib2b31ea0173581d8a0d150ec12474d8b68548967
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoImplemented BuildData API
Ed Bartosh [Mon, 13 May 2013 11:30:21 +0000 (14:30 +0300)]
Implemented BuildData API

This API is responcible for generating and parsing build.xml

Change-Id: If580443977f20fd2266ebbd64e027c59d1aa63fd
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoAdded dependency to python-yaml
Ed Bartosh [Mon, 13 May 2013 12:29:40 +0000 (15:29 +0300)]
Added dependency to python-yaml

As repomaker/__init__.py imports yaml package should depend on
python-yaml.

Change-Id: I80eefb1f4a7fcb33718c4a095d3f0e7f638cb823
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoget project name from OBS event content, fix an import error
Hasan Wan [Wed, 8 May 2013 02:36:17 +0000 (10:36 +0800)]
get project name from OBS event content, fix an import error

Change-Id: I50edefde3dae06b10d66279a2b8d53dd6672407b
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
11 years agoAdd job_local_cache_cleanups.py to make local cache cleanups
Lingchao Xin [Sat, 27 Apr 2013 07:41:46 +0000 (15:41 +0800)]
Add job_local_cache_cleanups.py to make local cache cleanups

Thanks for Ed's a lot of helpful advice, such as:
directory walking, env judgement and so on.

Change-Id: I39f69eb64ae774e4182e9779514eb4449dbee6b2

11 years agoReimplemented generation of build.xml release-0.12 0.12
Ed Bartosh [Fri, 26 Apr 2013 16:17:58 +0000 (19:17 +0300)]
Reimplemented generation of build.xml

Refactored and reimplemented generation of build.xml according to new
download structure.

Change-Id: Iff7c246200ca412294ed129eab7f9728ae2f3cf4

11 years agoAdd args parameter to be flexible when list needed projects
Lingchao Xin [Sat, 27 Apr 2013 02:46:40 +0000 (10:46 +0800)]
Add args parameter to be flexible when list needed projects

Such as, I want to just list CODE type's projects,
so use `ls-projects --type CODE`, thanks Yang Lin's reminder.

Change-Id: Ifdd05598e9be1285cc3f8091944ed1df343f94c7

11 years agoFix exception of deleting a non-exist directory
Lin Yang [Sun, 28 Apr 2013 02:30:23 +0000 (10:30 +0800)]
Fix exception of deleting a non-exist directory

Change-Id: I488160a87576923212da67ff6214d05f416e0bd7
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
11 years agoMoved cleanup to BuildService.
Ed Bartosh [Fri, 26 Apr 2013 13:32:31 +0000 (16:32 +0300)]
Moved cleanup to BuildService.

As cleanup is used by job_pre_release_gerrit and job_pre_release_obs
it's better to move it to common API. BuildService is a good candidate
for this API.

Change-Id: I1e5c7a7e7612ade64b8249fc7143b72c7f61f57e

11 years agoReturned back right info structure
Ed Bartosh [Wed, 17 Apr 2013 14:55:06 +0000 (17:55 +0300)]
Returned back right info structure

Structure of info structure in job_pre_release_gerrit was changed on
some rebase or merge. Returning it back to the right one.

Change-Id: I424c1aa5ac833c7f1b2d838227b56dc1591cb2e8
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoReturn proper exit code from job_pre_release_gerrit
Ed Bartosh [Thu, 11 Apr 2013 07:52:53 +0000 (10:52 +0300)]
Return proper exit code from job_pre_release_gerrit

Change-Id: I100ff0c55cba4b908f6c091aed539816cf7bde57
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>