Lin Yang [Fri, 12 Sep 2014 06:48:06 +0000 (14:48 +0800)]
Support no particular project setting
In special case, git-obs-mapping.xml doesn't contain the setting section for
particular projects. The script will crash when query mapping on such file.
It should check whether this section exists at first.
Fixes: #2111
Change-Id: Ib9a80ca135e311b8f8b103298ec300a3a7ba9e42
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
gaoxuesx [Tue, 16 Sep 2014 06:51:12 +0000 (14:51 +0800)]
Add trailing slash to POST URL
We called this URL via POST, but the URL doesn't end in a slash,
Django can't redirect to the slash URL while maintaining POST data.
Change-Id: Id1de27deabd096679233057091fc4891e2d431c0
Signed-off-by: gaoxuesx <xuesongx.gao@intel.com>
Liu jue [Tue, 16 Sep 2014 07:13:33 +0000 (15:13 +0800)]
rename requests to obs_request
Change-Id: Iab87c78fd5097e2ca22432afc93fabaf61964640
ZhuoX Li [Wed, 13 Aug 2014 10:52:53 +0000 (18:52 +0800)]
Only allow 'prerelease' type into pre-workflow.
If obs_stg_prj from git-obs-mapping.xml is not 'prerelease',
it should not be executed prerelease workflow in job_submit.py.
Fixes: #2073
Change-Id: Ide4f0aebf035bbaf77e672e88bb29dd0eada91aa
Ed Bartosh [Sat, 13 Sep 2014 11:15:45 +0000 (14:15 +0300)]
Implemented new job job_accept_or_reject
This job will be run by RE. It doesn't require RE to be maintainer of
the target project as it uses maintainer account for its operations.
Fixes: #1886
Change-Id: I77d38377c1b9a9d4646aeae94ba77d4c22f61b19
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Ed Bartosh [Sat, 13 Sep 2014 11:10:02 +0000 (14:10 +0300)]
Implemented create_sr and set_sr_state
Extended buildservice API to create SR and change SR status. Both
methods will be used in the new job for accepting or rejecting SRs.
Change-Id: Ic38473ab99f2185fe32bda29eaaa18a654cd167c
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Huang Hao [Tue, 9 Sep 2014 10:33:08 +0000 (18:33 +0800)]
Removing redundant git clone operation.
This script use common.git.fetch_change() to create an empty
local git repository and then fetch change from Gerrit.
So the clone operation is totally useless. Removing it will save
more time.
Change-Id: Ia5583e1d3b7f3b342fd9cf68651afb3059e482d3
Huang Hao [Tue, 9 Sep 2014 10:16:39 +0000 (18:16 +0800)]
Changing the exit code of scm check script.
If scm check/update found errors in scm text, it should return
non-zero, otherwise it should exit with 0.
Removing the try/catch block of GerritError, because if this
error happens, then we can't see comments from Gerrit. So just
keep the traceback in Jenkins console, it's better for debugging.
Returns 0 if http status code is 2XX, otherwise it means error
happens, then we should return non-zero.
Change-Id: I4cb7c01ad95e6185c1236e8933d59f6005ad8b8f
Fixes: #2106
gaoxuesx [Thu, 4 Sep 2014 10:40:13 +0000 (18:40 +0800)]
Convert GERRIT_SILENT_MODE to int
GERRIT_SILENT_MODE must be int type.
Improve the scm_check feature.
Change-Id: I7e25c0b8265ec8f489c8a224920da561f2f48897
Signed-off-by: gaoxuesx <xuesongx.gao@intel.com>
gaoxuesx [Thu, 4 Sep 2014 08:23:20 +0000 (16:23 +0800)]
Add fetch and check change feature
We can use fetch_change function to check out one change.
Change-Id: Ie836c1f287fcd438632116cdf39d78ce2da35da4
Signed-off-by: gaoxuesx <xuesongx.gao@intel.com>
ZhuoX Li [Thu, 4 Sep 2014 07:09:22 +0000 (15:09 +0800)]
Modify the way of using 'request_accepted'.
Don't return anything, when calling the function of reqeust_accepted.
Change-Id: I4fd7492bed1bda634bf299c2a4b4165e00ef1cb8
gaoxuesx [Fri, 15 Aug 2014 11:24:27 +0000 (19:24 +0800)]
Make the scm script name to be more professional
Change-Id: Ib0f508ed37250df559e05711b1a76bd9812246c8
Signed-off-by: gaoxuesx <xuesongx.gao@intel.com>
ZhuoX Li [Wed, 13 Aug 2014 10:08:05 +0000 (18:08 +0800)]
Add gbs-api into the dependency list of jenkins.
Although we have got rid of dependency of gbs,
Jenkins depends on gbs-api.So gbs-api should
be add into the dependency list of jenkins.
Change-Id: I4c64db4941d35d96b197618029c1f050237e3c01
gaoxuesx [Thu, 31 Jul 2014 07:37:36 +0000 (15:37 +0800)]
[draft]Job for syncing IRIS data from scm/meta/git project
client.py is IRIS Client which is a wrap of python requests,
it against CSRF protection.
This job will clone scm/meta/git project then check domains and
git-trees files syntax and update them to IRIS by call IRIS Client.
Change-Id: I9722faf15f0bf7b7bb18142c0073062d96a46b34
Signed-off-by: gaoxuesx <xuesongx.gao@intel.com>
Ed Bartosh [Sun, 10 Aug 2014 21:34:37 +0000 (00:34 +0300)]
Test fixed backenddb functionality
Added tests to ensure that old fields are cleaned up
when reading repos.
References: #2070
Change-Id: Ie9526c9feacd1105d071a2086101f523623fff0a
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Ed Bartosh [Sun, 10 Aug 2014 21:31:08 +0000 (00:31 +0300)]
test_backenddb: Implement hdel
This API is required by fixed version of backenddb:Entity.__setitem__
Change-Id: Ia8739a1008801e9ed8f6e4c8a9abb33da510fe8b
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Ed Bartosh [Sun, 10 Aug 2014 21:14:47 +0000 (00:14 +0300)]
Fix setting hash values
As hmset call doesn't remove old values this fuctionality
worked incorrectly and old values were not removed.
For example, removing 'PrereleaseDir' from repos.yaml and loading
it to the database was not removing this field in Redis.
Fixes: #2070
Change-Id: Ida42bd2a24a128b0f82f67bcc2a3b3905ff49920
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Ed Bartosh [Sun, 10 Aug 2014 21:08:01 +0000 (00:08 +0300)]
backenddb: Fix error in Entity.__getitem__
Used deepcopy to avoid modifications of the same dictionary.
This error broke tests in a very strange way: second call
of Entity.__getitem__ raised json exception.
Change-Id: I2ef33d67c4e046d24133d9f60ac5f92d9c5dd4fe
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Ed Bartosh [Sun, 10 Aug 2014 21:40:13 +0000 (00:40 +0300)]
Fixed mock implementation of hgetall
python-redis:hgetall returns empty dictionary if key doesn't exist.
This commit fixes this in mock. Previously it returned None in this
case.
Change-Id: I76f38d15d3918f0b7bbd41d9f3e1907f5e3b61db
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
ZhuoX Li [Fri, 8 Aug 2014 08:09:25 +0000 (16:09 +0800)]
Get rid of dependency of 'gbs'.
Jenkins scripts job_buildcheck_post.py job_policycheck.py
is unused for us. They should be removed. And get rid of
dependency of 'gbs', the test case about 'gbs' should be
also removed.
Fixes: #1546
Change-Id: I65e9596d35fba8c0bc6ad526cb2ea46a7176acf0
Liu jue [Mon, 4 Aug 2014 07:43:46 +0000 (15:43 +0800)]
Fix the wrong close paren
Change-Id: I0061645278b04fd7b443cff11d246e15de5bba79
Liu jue [Mon, 4 Aug 2014 06:30:45 +0000 (14:30 +0800)]
Delete the no use parameter.
The judgement of buildconf will leads to all repo use the same buildconf
Fixes: #2066
Change-Id: I07719e52dc2a55ab67741e4a45330df12a36f962
Liu jue [Thu, 31 Jul 2014 04:04:10 +0000 (12:04 +0800)]
Remove the void prerelease snapshots
Fixes #1665
Change-Id: I99ae4528dc16929916eb29fcafdbbc4f5e7be805
Lin Yang [Wed, 23 Jul 2014 06:01:55 +0000 (14:01 +0800)]
Add execute permission to release_snapshot job
The job_release_snapshot.py script is the only one on top level of package
is not executable. Fix it to align with others.
Change-Id: I382bfd38bc5b57be9dbd270ce1b4be872fe1d81b
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
Liu jue [Fri, 25 Jul 2014 07:42:42 +0000 (15:42 +0800)]
Job syncsnapdiff use hard code to search last buildid
1.Add exception log
2.Use release name instead of the hard code for searching
last build id
Fixes #2054
Change-Id: Iaec84cc6e706b6465c1a1998548b183543095f7a
Liu jue [Wed, 23 Jul 2014 02:19:56 +0000 (10:19 +0800)]
comment out the url description in manifest files
Change-Id: Ib4e2c01d5e47c4b3097c4553aff8e6c66e0ed508
Fixes: #2030
ZhuoX Li [Tue, 15 Jul 2014 05:52:22 +0000 (13:52 +0800)]
Remove commit id in message.
The repa wouldn't provide the commit id.
And it is not important to show for submitter.
So it shuold be removed.
Change-Id: Ife84eb6be9ce355f70da193a7cef6b128431c056
ZhuoX Li [Tue, 15 Jul 2014 05:03:37 +0000 (13:03 +0800)]
', ' replaces ',' to separate the projects name.
Change-Id: Ia1c853c396bcf1dc2df42c82b88309d3561fdecc
Liu jue [Mon, 14 Jul 2014 04:26:58 +0000 (12:26 +0800)]
Add return proper result when syncing
When rsync to download server, this job should return
proper result
Change-Id: I2779d7b3ea3a9e14a0ffdd41a975361ef0a6d085
Fixes: #2045
ZhuoX Li [Fri, 11 Jul 2014 01:58:47 +0000 (09:58 +0800)]
Modify the data structure for new description info.
When accept group submission, repa will only list the first one
on project name list in the previous. So jenkins can't get
complete project name list to update accepted branch on them.
Now the latest released repa will list the all projects name.
To be compatible the old and the new, so should modify it.
As below, the old formate and the new:
{"description": "project: platform/upstream/e2fsprogs"} -->
{"description": "project: [platform/upstream/e2fsprogs,
profile/ivi/meta-ivi]"}
Fixes: #2025
Change-Id: I9392d485484383233d43c78faf278c126f26de0f
Markus Lehtonen [Mon, 7 Jul 2014 08:11:09 +0000 (11:11 +0300)]
gbs-service: enable 'error-pkg' parameter
Enable the the generation of a special "error package" (instead of a
service error) in case of gbs export failures.
Only catches service return value 2, i.e. "normal" gbs export failures.
Internal service errors (1) and gbs crashes (3) still cause a service
error as these can be considered as bugs and we want to catch these.
Change-Id: Ied7bc8010351026e047e368be97bb71a9da3ee1e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Liu jue [Tue, 8 Jul 2014 08:33:59 +0000 (16:33 +0800)]
Update bare repository failed .
1. If the remote origin url is incorrect , re-clone.
2. If the remote origin url does not exsits re-clone.
Change-Id: I35e6ff2081a96e5da84a3db7b8d6e05dd24f5676
ZhuoX Li [Fri, 4 Jul 2014 05:44:04 +0000 (13:44 +0800)]
Use xml.sax module to solve the encode issue
xml.sax module as a better substitute for the 'replace' property of string,
to solve the encode issue.
Change-Id: I167a217895536adfb58ecd9b320f510ecda5e9de
Igor Stoppa [Thu, 19 Jun 2014 15:25:33 +0000 (18:25 +0300)]
Improve logging and archiving.
Produces more meaningful messages and
stores the test results only when present.
Change-Id: I4cf695f299fcfe2fe91758093b34e3314d6b171b
Igor Stoppa [Thu, 19 Jun 2014 15:18:25 +0000 (18:18 +0300)]
Add clarification comment in testing job.
Change-Id: Id9cfbe9f4db3c12fa36c94889c3f5bc74bb04695
Igor Stoppa [Mon, 16 Jun 2014 10:52:28 +0000 (13:52 +0300)]
Publish test results to OBS
Fix parameters passed down from imager job,
through tester and add job for publishing results to OBS.
Change-Id: I96c2d6f1226c3259e1ea1dcbf696e8b20f0f2358
Igor Stoppa [Thu, 19 Jun 2014 09:26:14 +0000 (12:26 +0300)]
Reduce wget output when downloading.
Change-Id: I2492da49ec9c69b49ce9f55178d47906acf29c4d
Igor Stoppa [Mon, 16 Jun 2014 10:51:33 +0000 (13:51 +0300)]
Create a tarball with the results of the testing.
Change-Id: Iebbbee94306e11a616fb3da2daa00fa3458eb968
ZhuoX Li [Fri, 27 Jun 2014 08:12:39 +0000 (16:12 +0800)]
Fix the ascii encode issue about sending mail
When we send mail to submitter,need a specific format of address
in job_request.py.Sometimes it maybe have the escape character,
that causes the encode issue.We should check and change it.
eg:
'<stephane.desneux@open.eurogiciel.org>' should be changed to
'<stephane.desneux@open.eurogiciel.org>'
Fixes: #2010
Change-Id: Ib0d1b0c32f37a2a1f007ac8bc5e319f98f1175db
Liu jue [Wed, 25 Jun 2014 06:36:03 +0000 (14:36 +0800)]
Add two blanks to ensure manifest can work
Fixes #2006
Change-Id: I4c47af02beaa25f7af7f423b0e5e45c3e19721a8
Liu jue [Tue, 24 Jun 2014 10:47:04 +0000 (18:47 +0800)]
Catch the exception come from delete obs project/package
1. Ensure it is exist before delete it.
2. Try it .
Change-Id: Ia31960382d7e317d98672bc844b7f945862a1dbf
Fixes: #2001
Liu jue [Tue, 24 Jun 2014 12:05:44 +0000 (20:05 +0800)]
support multiply version of rpm packages in manifest
If two versions of one package both exist on repo, jenkins will
use the latter one overwrite the previous on when generating
manifest. A more direct method is jenkins insert the info of all
packages in repo into manifest.
Change-Id: I242342ddcfca604d44227ffff7940b015f89f156
Fixes: #2002
ZhuoX Li [Tue, 24 Jun 2014 09:57:48 +0000 (17:57 +0800)]
Add a filter for updating repos.yaml in job_load_repos.yaml.py
When refname start with 'refs/changes/', should not update.
Fixes: #1957
Change-Id: Ifaf98acb28b15f3a7891aa12216163b4eb5a23de
ZhuoX Li [Tue, 24 Jun 2014 08:22:13 +0000 (16:22 +0800)]
Fix the IndexError issue for job_sync_snapdiff.py
Maybe not find the matched snapshot, should skip it.
Fixes: #1992
Change-Id: Ic658de194f5db423d1e6fcc7a23f92ac458b79b8
Markus Lehtonen [Tue, 24 Jun 2014 12:12:37 +0000 (15:12 +0300)]
utils/make_latest_link: make the link target a relative path
Absolute paths break mirroring of the server content.
Fixes: TINF-636
Change-Id: I1af46a7ad5f6e98627412bd900c30d5a88fe19ef
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Lin Yang [Tue, 24 Jun 2014 03:53:41 +0000 (11:53 +0800)]
Fetch complete buildconf for each repo
OBS will insert serveral runtime parameters at the beginning of the build conf,
which are critical to gbs local build. Current the api jenkins used can not
fetch those parameters, only fetch the build conf text. Should use another api
https://api.tizen.org/build/Tizen:Common/atom/_buildconfig.
Fixes: #1997
Change-Id: I8876e6e84bcf3bddbd3119d35f111ac7c3b738fe
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
Lin Yang [Tue, 24 Jun 2014 03:25:48 +0000 (11:25 +0800)]
Remove buildconf from builddata directory
Because OBS project build conf for each target has already been placed on the
repodata directory of each repo, the global build conf on builddata directory
is not necessary anymore.
Fixes: #1998
Change-Id: Id4f1f01a112d25d0e6481d08c89406c438057dee
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
ZhuoX Li [Tue, 24 Jun 2014 02:53:55 +0000 (10:53 +0800)]
Add 'unknown' state into the filter regular of generating snapshot.
When some targets of OBS project are disabled, maybe get the 'unknown' status,
we also should ignore it ,to create snapshot/prerelease repos.
Change-Id: I1caa47b31e2d82043a5dd25ffbd953901dad90ab
ZhuoX Li [Fri, 20 Jun 2014 07:46:02 +0000 (15:46 +0800)]
Fix the crash about getting repo name from redis
When the repo name doesn't exist in redis,we can't get it from redis.
It should normally stop to create repos, not raise exception.
Fixes: #1993
Change-Id: Iac77e7c3321071c6db0360998f45f642504ad4f2
Igor Stoppa [Mon, 16 Jun 2014 10:50:43 +0000 (13:50 +0300)]
Fix some trivial pylint issues
* lines too long
* missing docstrings
* extra spaces
Change-Id: I9345cfa2f0dceb61e9a5e52294d9ce776a24c2f2
ZhuoX Li [Fri, 20 Jun 2014 10:27:44 +0000 (18:27 +0800)]
Pylint for job_create_snapshot.py
Change-Id: I30d4e9886aed653b8eff71ced4687e1ef0905257
C: 45,0: Line too long (82/80)
C:111,0: Line too long (83/80)
C:173,0: Line too long (83/80)
C:181,0: Line too long (83/80)
ZhuoX Li [Fri, 20 Jun 2014 08:41:32 +0000 (16:41 +0800)]
Delete 'PrereleaseDir' key in condition
'PrereleaseDir' don't exist for some project in redis.
And it is unnecessary.So delete it.
Fixes: #1994
Change-Id: I936d4383dec26ced875fccc3bb19fb7320786f4b
ZhuoX Li [Fri, 20 Jun 2014 10:31:25 +0000 (18:31 +0800)]
Pylint for job_release_snapshot.py
C: 50,4:main: Operator not followed by a space
release_dir = "releases/%s" %release_type
^
E: 58,8:main: Undefined variable 'printf'
Change-Id: I87559a669b7f3a4bfe0be9105d28a3022e6e4d6e
Hasan Wan [Mon, 19 May 2014 09:28:58 +0000 (12:28 +0300)]
add new job script to create release repo from snapshot
Change-Id: I5e773019ca1c278d40b1b204932d8e31f02cf8e8
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
Hasan Wan [Mon, 19 May 2014 09:13:22 +0000 (12:13 +0300)]
move make_latest_link to common/utils, add a parameter to keep the origin copy
Change-Id: I80aa2ca36b810818fa0bd726789591c2912621c3
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
Liu jue [Thu, 5 Jun 2014 10:51:03 +0000 (18:51 +0800)]
Delete the ks file message when trigger job-sync-snapdiff
Because if not do like this , when jenkins use the data as a shell
command's parameter , it will cause an error because of the too long
data .
Change-Id: Ibaf5d7b5586b1b6c436a888854ab2d8f1f731a80
Fixes: #1946
ZhuoX Li [Wed, 4 Jun 2014 10:46:52 +0000 (18:46 +0800)]
Fix the debug of uploading service file is failed to a linked
one example shows as below:
When the Tizen:Mobile:build OBS project links the Tizen:Mobile,
we can get the package meta by Tizen:Mobile:build, but the package isn't
in the Tizen:Mobile:build, so the package of _service file can't be uploaded.
Before uploading, we should check it.
Fixes: #1944
Change-Id: I676525a26e8bfa5b382b4bffffd97a39f2e7d4a8
Igor Stoppa [Wed, 21 May 2014 13:34:47 +0000 (16:34 +0300)]
Fix "line too long" warning.
Change-Id: Ia414ab9ba445d7c4e7a72f3986e64bceb7455372
ZhuoX Li [Fri, 23 May 2014 05:56:57 +0000 (13:56 +0800)]
Change the filter regular of generating snapshot.
When some targets of OBS project are disabled, we should create
snapshot/prerelease repos.
Change-Id: I7f79f2a45a7a346362611a84e36a2eafde14332f
Fixes: #1908
Igor Stoppa [Tue, 20 May 2014 08:28:52 +0000 (11:28 +0300)]
Make the tester job more verbose
Log more infor about downloading, flashing and testing the image.
Change-Id: I3c3fb2c96543c05892ad55055c1f8898327377ed
Igor Stoppa [Wed, 7 May 2014 13:20:23 +0000 (16:20 +0300)]
Jenkins Build Testing script
Downloads the image, flashes it to the appropriate target device
and runs the related smoke test.
Change-Id: I6b58a37608f970402d038f248e6f61f8051ee728
Ed Bartosh [Sun, 18 May 2014 11:35:05 +0000 (14:35 +0300)]
Turn on generation of git meta for obs-gbs-service
Added git-meta parameter to the _service file to generate git meta
information about tag and commit on the server side.
References: #1888
Change-Id: Icd4770e5b6c9db9c5155daf7dd14fc907dca0fec
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Lin Yang [Wed, 14 May 2014 08:25:59 +0000 (16:25 +0800)]
Fix bug on submit tag check
Jenkins should check whether the submit tag has been merged into git tree, if
not, then check whether it is still open on gerrit. It will give out mistake
message if check on gerrit at first.
Fixes: #1876
Change-Id: I72b6a0bacdb427b69a33cc16e77a89820c8672ec
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
ZhuoX Li [Wed, 14 May 2014 02:58:38 +0000 (10:58 +0800)]
Change manifest for new build.xml structure
In current version, one repo of OBS project will generate one manifest file.
All archs from one repo will point to the same manifest file.
So change 'buildid'_'repo_name'_'arch_name'.xml name to 'buildid'_'repo_name'.xml
one example shows as below:
previous manifest file name: tizen_20140513.1_ia32-wayland_ia32.xml
current manifest file name: tizen_20140513.1_ia32-wayland.xml
Change-Id: I962062037f8af361b4e2a87bb928e8e8f0030ef8
ZhuoX Li [Tue, 13 May 2014 09:27:13 +0000 (17:27 +0800)]
Update the function to match new data structure
In previous version, get repo_name by obs_project:obs_repo.
Now, we want get repo_name by obs_project
Change-Id: I3173c53c31d3a16e9299147eeea26e3e9f36fff0
ZhuoX Li [Fri, 9 May 2014 06:48:25 +0000 (14:48 +0800)]
Update build.xml to match the new repo structure
One example shows as below:
<build version="1.0">
<id>tizen_20140509.20</id>
<buildtargets>
<buildtarget name="ia32-wayland">
<archs>
<arch>ia32</arch>
</archs>
<repo type="debug">repos/ia32-wayland/debug</repo>
<repo type="source">repos/ia32-wayland/source</repo>
<repo type="binary">repos/ia32-wayland/packages</repo>
</buildtarget>
<buildtarget name="x86_64-wayland">
<archs>
<arch>x86_64</arch>
</archs>
<repo type="source">repos/x86_64-wayland/source</repo>
<repo type="binary">repos/x86_64-wayland/packages</repo>
<repo type="debug">repos/x86_64-wayland/debug</repo>
</buildtarget>
</buildtargets>
</build>
Fixes: #1863
Change-Id: Ie7545a0df1c3011510f50d351639565995edb712
Liu jue [Thu, 8 May 2014 09:14:32 +0000 (17:14 +0800)]
Fix the bug : reject/request event without complete description
When someone reject/request a submit from obs by man made , he/she
may do it without a complete description . So we can not get the
"source project" from description , and it will cause a bug . So we
use "source project" field in event directly .
Change-Id: I9ab929760be146816e849f234433ee3f4621b4c5
Fixes: #1841
ZhuoX Li [Thu, 8 May 2014 04:33:25 +0000 (12:33 +0800)]
Update debug and packages directory structure
Delete the subdirectory is named for archs in debug directory.
Original .rpm are in subdirectory will be put directly into parent directory.
And use the archs name of OBS replaces the unified archs name 'ia32',
to name the subdirectory in packages directory.
Change-Id: Iec48ec926639dc153bd88d6b8fd53591bd450099
Lin Yang [Wed, 7 May 2014 07:37:36 +0000 (15:37 +0800)]
Fix interface mismatch of extract_image_conf
The only one parameter of function imagedata.extract_image_conf is image
configuration rpm location, fix incorrect call for it.
Change-Id: I33a56b8718a90dddddbc11f88d70a92fc221ec11
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
Lin Yang [Wed, 7 May 2014 07:01:28 +0000 (15:01 +0800)]
Support get project name of OBS_SRCSRV_REQUEST_*
For OBS request event, like OBS_SRCSRV_REQUEST_*, it don't have 'project'
attribute, just 'sourceproject'. So try to get 'sourceproject' if don't
find 'project'.
Change-Id: I93b72ba1d76e26131619272f85a7bc575c2c1222
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
Ed Bartosh [Wed, 7 May 2014 16:22:02 +0000 (19:22 +0300)]
Fix image creation issue
job_prerelease_obs strips all lines of .ks file. This breaks patches in
%post section and results in non-functional images.
Example: this stripped patch
patch -p1 -d/ <<'EOF'
diff -urN bad/etc/pam.d/systemd-user good/etc/pam.d/systemd-user
--- bad/etc/pam.d/systemd-user 2014-03-20 10:01:36.
657843073 +0100
+++ good/etc/pam.d/systemd-user 2014-03-20 10:06:51.
586121696 +0100
@@ -4,5 +4,6 @@
account include system-auth
session include system-auth
+session required pam_systemd.so
auth required pam_deny.so
password required pam_deny.so
EOF
causes this message in the log:
Applying configurations ...
Running scripts ...
patching file etc/pam.d/systemd-user
patch: **** malformed patch at line 6: account include system-auth
and the image doesn't boot to UI because of broken systemd configuration.
Change-Id: Id4e8d391036b67ba2a62a18766e9f369106ea4af
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Igor Stoppa [Tue, 6 May 2014 10:30:20 +0000 (13:30 +0300)]
Perform Tests on the images built successfully.
Change-Id: I7c621e8f0020688810b42c2e22e92e88f1e8e0aa
Ed Bartosh [Sun, 4 May 2014 19:55:46 +0000 (22:55 +0300)]
Pylinted job_pre_release_obs
Change-Id: I6f63f0abfd60f1f4b2ac30fa5f3732e6ccf0d4f9
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
ZhuoX Li [Fri, 4 Apr 2014 09:16:12 +0000 (17:16 +0800)]
Catch error of sendmail in job_mail_sender.py
Catch the error,when happens '5.5.1 Error: no valid recipients'
Change-Id: I8a0cc8d424014c0a86bfdd919438da894ccbdf6f
Fixes: #1404
ZhuoX Li [Wed, 30 Apr 2014 09:33:54 +0000 (17:33 +0800)]
Change the way of dealing with has_images()
After adding filter, some repos have no ks.
so need to make a distinction between not have image-configuration package,
and not have ks.
Change-Id: I5088c35a2c23f79557f277ccf0e04418c28ae471
Yang Lin [Fri, 25 Apr 2014 06:42:19 +0000 (14:42 +0800)]
Fix exception for no found git-obs-mapping entity
When don't find git-obs-mapping entity for one gerrit project, it mean this
project is not need in OBS. This is not an exception for backend scripts. So
just skip this event.
Fixes: #1785
Change-Id: I28935870d0af9118eb4c2dda09129a59462931ee
Signed-off-by: Yang Lin <lin.a.yang@intel.com>
ZhuoX Li [Tue, 4 Mar 2014 10:43:48 +0000 (18:43 +0800)]
Pylint for job_imager.py
: 31,0: Line too long (83/80)
Change-Id: I9f73d78cb8c4021e1f1953fcf4efe9655bca4ed0
Ed Bartosh [Sun, 4 May 2014 19:44:09 +0000 (22:44 +0300)]
Reset 'images' meta info for prerelease projects
Reset 'images' meta information when tag is updated (job_submit) or
package build is publised (job_prerelease_obs).
Fixes: #1854
Change-Id: Idf15c2110ac165cbc6f2917280c1da4ccd39c571
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Ed Bartosh [Sun, 4 May 2014 14:34:55 +0000 (17:34 +0300)]
Repomaker: Fix search criteria for image configuration packages
With current search criteria image-configurations-*.src.rpm was
considered as image configuration binary package, which resulted
in empty list of ks files and images in repomaker structures.
This caused job_prerelease_obs to skip triggering of image creation
as .ks files were not found.
Fixes: #1844
Change-Id: I68c715dde1aa8397952e50ec83fb7d9d2c0293f7
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
ZhuoX Li [Tue, 22 Apr 2014 03:51:48 +0000 (11:51 +0800)]
Changes path of finding repo packages
Use specific path of repo to collect packages for new structure.
Change-Id: Id7ba9f21c698a153abc58b5235a5fff828176828
Lin Yang [Mon, 21 Apr 2014 08:02:59 +0000 (16:02 +0800)]
Update the repo structure of prerelease
As the same as regular snapshot, merge all repos of prerelease project into one
single snapshot.
Fixes: #1819
Change-Id: I05a05f3a389aa27fb6ddfcd887ed9f8d7e4f817b
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
Lin Yang [Mon, 21 Apr 2014 07:41:22 +0000 (15:41 +0800)]
Merge all repos into one single snapshot
Original every each repo of OBS project will generate one separate snapshot. To
make it be compatible with OBS project structure, merge all repos and related
images into one single snapshot.
Fixes: #1819
Change-Id: Id01e4c333b0615244137f5de50525c0b11865e22
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
Lin Yang [Fri, 18 Apr 2014 05:01:39 +0000 (13:01 +0800)]
Support multiply repos in repomaker
Change-Id: Ib3294d690a5aef840c626093b20b22b10aa6a50a
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
Lin Yang [Fri, 18 Apr 2014 04:01:02 +0000 (12:01 +0800)]
Make imagedata save function more generic
When save image config and ks to one directory, it should not limit the
directory to the repo directory. The directory hierarchy, like 'buiddata'
should be handled by high module.
Change-Id: Iabe8b1b4970d24449ee6734f2e9d53393d01b2a8
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
Lin Yang [Mon, 21 Apr 2014 07:05:37 +0000 (15:05 +0800)]
Support multiply repos in snapshot module
Change-Id: I0fb3df6e41fab0545a5e7d8ee1e360fb68f9062f
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
ZhuoX Li [Fri, 18 Apr 2014 10:08:56 +0000 (18:08 +0800)]
Supoort new repos.yaml format in backenddb
To support merge multiply repos into one single snapshot,
add new keyword'Targets' in repos.yaml and remove origin 'Target'.
One example shows asbelow.
- Name: Tizen-generic
Link: latest
Release: "tizen"
TopLevel: /srv/builds/temp/generic
Project: Tizen:Generic
ProjectConfig: yes
SnapshotDir: snapshots/tizen/generic/
PrereleaseDir: prerelease/tizen/generic/
Targets:
- Name: ia32-wayland
Architectures:
- ia32
- Name: ia32-x11
Architectures:
- ia32
Fixes: #1820
Change-Id: I81adb4e9333b770e119755168a79400b91cee262
Ed Bartosh [Tue, 15 Apr 2014 07:19:25 +0000 (10:19 +0300)]
Changed version in devel to 0.16
Change-Id: I2f7a9b33d3c6c31c881a135fa39dc47d8bb99de4
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Ed Bartosh [Fri, 11 Apr 2014 09:31:01 +0000 (12:31 +0300)]
Removed branch check
This check confuses and restricts developers and prevents them to submit
changes from tizen branch to tizen_ivi, tizen_generic and similar submit
targets.
Fixes: #1813
Change-Id: I58747824f663f0f85485bb5385eb7680dca15e8c
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
ZhuoX Li [Fri, 4 Apr 2014 06:24:16 +0000 (14:24 +0800)]
Add a UploadError class in common/upload_service.py
Change-Id: I6d459707b1dff6c27124f2cc929130364709267b
ZhuoX Li [Thu, 3 Apr 2014 04:47:48 +0000 (12:47 +0800)]
Add a new file for upload_service in common
The server include job_image.py doesn't have gitbuildsys module.
When executes job_image.py, the gitbuildsys module in common/utils.py
is imported and causes 'No module named gitbuildsys.errors'.
In common/utils.py, the only method of upload_service needs gitbuildsys,
so here should put the method in a new file.
Change-Id: Ib4df37a580c47c430caa39d09865cf877cdeedc6
ZhuoX Li [Wed, 19 Mar 2014 05:50:28 +0000 (13:50 +0800)]
Catch buildservice ObsError exception
When modify the meta conf to unlink raise ObsError exception,
it should be catched.
Fixes: #1726
Change-Id: Icf7602ba813db5a3c0ca9ead4171dd2072b767d5
Lin Yang [Wed, 26 Mar 2014 07:49:36 +0000 (15:49 +0800)]
Escape < > to fix xml syntax
The prerelease project description contains < and > in submitter email address.
When update project meta in xml meta, it break xml syntax. So escape them when
format the meta.
Fixes: #1754
Change-Id: Ic623959270e2b4ab4ccd207710c4901c86810b70
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
ZhuoX Li [Mon, 10 Mar 2014 12:21:39 +0000 (20:21 +0800)]
Pylint for job_submitobs.py
C:543,0: Line too long (83/80)
C:294,8:check_sync_pattern: Invalid name "p" (should match [a-z_][a-z0-9_]{2,30}$)
Change-Id: If1ce83ae16bb4bc18b28bfca42b27d2c4616c510
ZhuoX Li [Thu, 6 Mar 2014 10:22:31 +0000 (18:22 +0800)]
pylint for common/manifest.py
C: 1,0: Missing docstring
F: 22,0: Unable to import 'common.utils'
C: 24,0: Operator not preceded by a space
HEADER="""<?xml version="1.0" encoding="UTF-8"?>
^
"""
C: 29,0: Operator not preceded by a space
XML_ITEM="""<project name="%s" path="%s" revision="%s"/>\n"""
^
C: 30,0: Operator not preceded by a space
FOOTER="""</manifest>"""
^
C: 35,4:gen_repo_manifest: Operator not followed by a space
manifest_head = HEADER %(fetch_url, review_url)
^
C: 40,8:gen_repo_manifest: Operator not followed by a space
manifest_body +=XML_ITEM %(prj_name, prj_path, revision)
^^
C: 67,4:get_repo_primary_md: Operator not preceded by a space
ret_data= {}
^
Change-Id: I1e6b6255fdfd814518adbb4d08e3a484b0f91d2a
ZhuoX Li [Thu, 6 Mar 2014 10:10:53 +0000 (18:10 +0800)]
Pylint for common/utils.py
C:196,0: Line too long (83/80)
C:254,0: Line too long (81/80)
F: 27,0: Unable to import 'common'
R: 34,0:Workdir: Too few public methods (0/2)
C: 53,4:retry.deco_retry: Missing docstring
C: 54,8:retry.deco_retry.f_retry: Missing docstring
C: 56,12:retry.deco_retry.f_retry: Invalid name "f" (should match [a-z_][a-z0-9_]{2,30}$)
Change-Id: I24b4185632a1dda96faa3d47e09f3e4724cb5ca0
ZhuoX Li [Wed, 5 Mar 2014 11:52:43 +0000 (19:52 +0800)]
Pylint for common/repomaker.py
C: 82,4:create_dirs: Operator not preceded by a space
repo_dirs=set([])
^
C:102,8:gen_target_dirs: Comma not followed by a space
return [os.path.join(repo_dir,["packages", "debug"][is_debug], ftype)]
^^
Change-Id: I0d2c1f634f66a8d08f10ad79923ed53e40d62830
ZhuoX Li [Wed, 5 Mar 2014 07:10:03 +0000 (15:10 +0800)]
Pylint for job_policycheck.py
Change-Id: Ic7a8080056f3a936d1de8c9ec43b4a08490c0b67
W:195,23:main: Unused variable 'obs_stg_prj'
ZhuoX Li [Wed, 5 Mar 2014 02:31:34 +0000 (10:31 +0800)]
Pylint for job_buildcheck_post.py
C:100,0: Line too long
Change-Id: If51d9bab7adf6172d254b39fe175a51a6149035b
ZhuoX Li [Tue, 4 Mar 2014 10:44:31 +0000 (18:44 +0800)]
Pylint for job_pre_release_obs.py
C:115,0: Line too long (81/80)
Change-Id: I4daeeb6d744c9ee72187694ea3853c8bf7b8a56a
ZhuoX Li [Tue, 4 Mar 2014 10:42:56 +0000 (18:42 +0800)]
Pylint for job_request.py
C:202,0: Line too long (82/80)
C:332,0: Line too long (85/80)
C:310,8:main: Operator not followed by a space
print >>sys.stderr, err
^ '
Change-Id: I85b24bc05cdeb25dc7c327c98e038399a56f26d3