services/jenkins-scripts.git
9 years agoUpdate the license to GPLv2
ZhuoX Li [Mon, 17 Nov 2014 03:09:17 +0000 (11:09 +0800)]
Update the license to GPLv2

Change-Id: I905bb9e9baee9638a1daccd525d91c28144f3355
Fixes: #2231

9 years agoFix duplicate prefix on package version.
ZhuoX Li [Wed, 12 Nov 2014 10:08:44 +0000 (18:08 +0800)]
Fix duplicate prefix on package version.

Duplicate prefix on package version on prerelease project.
Eg: The error prefix:
    Modello-Homescreen-0.0.2-20141111.000000.20141111.20141111.000000.1.1.noarch.rpm
    We should create the prefix, like this:
    Modello-Homescreen-0.0.2-20141111.000000.1.1.noarch.rpm

Fixes: #2218

Change-Id: Ie9d552628eefd799a4983c40b137585fba66cb40

9 years agoAdd download url, obs url to meta
ZhuoX Li [Wed, 5 Nov 2014 05:58:41 +0000 (13:58 +0800)]
Add download url, obs url to meta

Change-Id: If52205e06fd783debe3f780650d2ca3ddc26ffb3
Fixes: #1732

9 years agoMake Pylint happier.
Igor Stoppa [Tue, 4 Nov 2014 09:28:32 +0000 (11:28 +0200)]
Make Pylint happier.

This patch removes a handful of pylint warning:
* indentations
* unused imports and variables

It also replace the error code with its symbolic counterpart,
to make the code more readable.

Change-Id: Ib4910068be77ca694632f7559bc105a012b7e68e

9 years agoMove image filtering to tester job.
Igor Stoppa [Tue, 4 Nov 2014 14:50:47 +0000 (16:50 +0200)]
Move image filtering to tester job.

To simplify the interaction between jobs, the tester job_will
be executed with all the images produced.

The tester job will perform the filtering, deciding which images to
download and test.

Empty data will be providedi for images that are not supported.

Change-Id: I554e51e9125dadc522e45351e14b70df4f757775

9 years agoTransition to logging facility.
Igor Stoppa [Tue, 4 Nov 2014 13:31:11 +0000 (15:31 +0200)]
Transition to logging facility.

Use logging library.

Change-Id: I4331d7b1ac08f6d8c16e95899b1b4e1d4179e5c0

9 years agoRemove HACK for BOSS. BOSS is dead \o/
Igor Stoppa [Tue, 4 Nov 2014 08:51:11 +0000 (10:51 +0200)]
Remove HACK for BOSS. BOSS is dead \o/

The code is not needed anymore.

Change-Id: I1465395b88d2df98d6ab2d65afb50eb3c7157b41

9 years agoDelete the ks file message when trigger job-sync-snapdiff
Liu jue [Mon, 9 Jun 2014 03:04:54 +0000 (11:04 +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: Ie73c3dff6d33900910fee3d2839c88659d73f186

9 years agoGenerate MAC address by random.
ZhuoX Li [Thu, 23 Oct 2014 11:16:00 +0000 (19:16 +0800)]
Generate MAC address by random.

Using the simple random number instead of the global variables
to generate a MAC address.

Change-Id: If3700e1374e1be4410f7504659348dddd1a24637
Fixes: 2132

9 years agoChange release name in prjconf from OBS.
ZhuoX Li [Wed, 22 Oct 2014 10:07:20 +0000 (18:07 +0800)]
Change release name in prjconf from OBS.

Set release tag in prjconf so that the rpm version
in target project will be greater than those in the base project.
To solve the issue 'package version in prerelease project must be
higher than in target project'

Change-Id: Icdc2cc40befcd370b61bc6df3c33ace9aebfdb1c
Fixes: #1846

9 years agoAdd MAC addrees into mic-appliance.
ZhuoX Li [Fri, 17 Oct 2014 01:49:31 +0000 (09:49 +0800)]
Add MAC addrees into mic-appliance.

When create imager, Mic-appliance is started without specified MAC address.
As the result, all mic-appliance instances that run in same network,
get also same default MAC address.
This potentially leads to collisions and conflicts in addressing
mic-appliance VM sessions.
So need to add unique MAC addresses, when run mic-appliance.

Fixes: #2132

Change-Id: I870798cabb8f6043a4a0182619b8e49c04fdba59

9 years agoIgnore verifying the SSL certificate
gaoxuesx [Fri, 17 Oct 2014 05:34:51 +0000 (13:34 +0800)]
Ignore verifying the SSL certificate

Change-Id: If3211a1b60c2bbef86513b0c6eed142838619aea
Signed-off-by: gaoxuesx <xuesongx.gao@intel.com>
9 years agoProvide a open OBS url to IRIS.
ZhuoX Li [Wed, 15 Oct 2014 01:41:50 +0000 (09:41 +0800)]
Provide a open OBS url to IRIS.

In 'package built' event, jenkins jobs publish a private url
to IRIS, others can't get access to it.
So change it to an open url.

Fixes: #2164

Change-Id: Ia87d9af4d13e611083b0fa23c5162c87a497d78b

9 years agoModify the testcase for the new gbp version(0.6.15)
ZhuoX Li [Fri, 17 Oct 2014 08:45:46 +0000 (16:45 +0800)]
Modify the testcase for the new gbp version(0.6.15)

Change-Id: If6884072f0ab974f486d9e8a1bf779c1a93ad47a

9 years agoChange the filter to trigger post-image-creation
ZhuoX Li [Fri, 10 Oct 2014 07:05:48 +0000 (15:05 +0800)]
Change the filter to trigger post-image-creation

All project will trigger the post-image-creation in job_image.py
to provide more image info for IRIS.

Change-Id: Ib20875a4f433790df923941f87e2e2c29c73c17a

9 years agoPublish 'image_created' event to IRIS.
ZhuoX Li [Tue, 30 Sep 2014 06:06:47 +0000 (14:06 +0800)]
Publish 'image_created' event to IRIS.

Add 'image_created' event after running image job.

Change-Id: I0d347b045c67b19d660a97fb908346b721873cc7

9 years agoPublish 'image_building' event to IRIS.
ZhuoX Li [Tue, 30 Sep 2014 05:58:58 +0000 (13:58 +0800)]
Publish 'image_building' event to IRIS.

Add 'image_building' event before trigger image job.

Change-Id: Ie68daaf8a93388646f82a0fc1f69c0e71eec8b89

9 years agoPublish 'repa action' event to IRIS
ZhuoX Li [Tue, 30 Sep 2014 04:55:44 +0000 (12:55 +0800)]
Publish 'repa action' event to IRIS

Publish 'repa action' event when a pre-project is accepted/rejected
by repa.

Change-Id: Ia5d7968793aba0a124ea78f82e4e10b70e4213e6

9 years agoPublish 'rpm build' event to IRIS
ZhuoX Li [Mon, 29 Sep 2014 12:43:34 +0000 (20:43 +0800)]
Publish 'rpm build' event to IRIS

Add a job to get the result of being built rpm.

Change-Id: Ie3b823e48c0e942cd3c2da501ea6862614df4f1e

9 years agoPublish 'pre_created' event to IRIS
ZhuoX Li [Mon, 29 Sep 2014 06:30:09 +0000 (14:30 +0800)]
Publish 'pre_created' event to IRIS

Publish 'pre_created' event when a pre_project is
created for a submission tag

Change-Id: Ib824f46e7d1163b18d780e395328ff2e1ee56eab

9 years agoImport get_python_lib to pornt the python module.
ZhuoX Li [Fri, 10 Oct 2014 05:29:35 +0000 (13:29 +0800)]
Import get_python_lib to pornt the python module.

Change-Id: I1e200794582248a07cb18fcd19123a0d5ae3885a

9 years agoCatch exceptions for IrisRestClient.
Huang Hao [Mon, 29 Sep 2014 06:29:26 +0000 (14:29 +0800)]
Catch exceptions for IrisRestClient.

Print exception when execption raised in IrisRestClient code. But
don't break original workflow.

Also change event type into a part of url, so it's more easier
to see that in access log.

Change-Id: Idca9874e4904366b3333d57b6be531548e0e8401

9 years agoRemove some useless code
gaoxuesx [Thu, 18 Sep 2014 05:44:37 +0000 (13:44 +0800)]
Remove some useless code

Change-Id: Ic7a22b7be9761074c7d4a3e666674a47337ceb8c
Signed-off-by: gaoxuesx <xuesongx.gao@intel.com>
9 years agoPublish "submitted" event to IRIS.
ZhuoX Li [Wed, 3 Sep 2014 08:44:40 +0000 (16:44 +0800)]
Publish "submitted" event to IRIS.

Add a new function publish_event() in IrisRestClient class.

Use this function to publish "submitted" event when a submission
tag is just received.

Change-Id: I2a23b6b221e79dcb6b99bc78fd0126516407fae4

9 years agoStop writing to /etc/repos/repos.yaml
Ed Bartosh [Thu, 18 Sep 2014 08:13:24 +0000 (11:13 +0300)]
Stop writing to /etc/repos/repos.yaml

As BOSS is no more we don't need to write this file. It was used only by
BOSS participants.

Change-Id: I757f206f2421d671810697cf695f7f9b8c1615d3
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
9 years agoLogin immediately when client is created.
Huang Hao [Fri, 19 Sep 2014 06:38:08 +0000 (14:38 +0800)]
Login immediately when client is created.

Usually we have to login otherwise request always fails.

Change-Id: Ibe67204987f09cd1cf32cf274ce88515e1e39d33

9 years agoTo use "--delay-updates" for rsync for atomic sync
JF Ding [Fri, 15 Aug 2014 11:18:07 +0000 (19:18 +0800)]
To use "--delay-updates" for rsync for atomic sync

Sometime, the users noticed the images in download server have wrong
md5sum and cannot boot. It's possible it's a partial downloaded file,
caused by atomic rsyncing problem. This rsync command line option
will help it.

Change-Id: I9ef2344cd01594fb33080feaaa193714cb4a5570
Signed-off-by: JF Ding <jian-feng.ding@intel.com>
9 years agojob_accept_or_reject: Fixed bug in state name
Ed Bartosh [Tue, 23 Sep 2014 08:07:45 +0000 (11:07 +0300)]
job_accept_or_reject: Fixed bug in state name

Valid state name for SR is 'declined'. The code was using 'rejected',
which caused 'Bad request' OBS response.

Change-Id: I464befb33f21d9a13929d99632535833971f39c0
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
9 years agoFix a bug about requesting git-obs-mapping.xml
ZhuoX Li [Fri, 19 Sep 2014 07:09:05 +0000 (15:09 +0800)]
Fix a bug about requesting git-obs-mapping.xml

Change-Id: I07891b714a8a0407f63472fc11e79479bc775124

9 years agoFix potential issue on git-obs-mapping query
Lin Yang [Fri, 12 Sep 2014 07:33:17 +0000 (15:33 +0800)]
Fix potential issue on git-obs-mapping query

When search on default section, project name will be joined with prefix '/'
automatically. So it should do the same action to path name to support missed
prefix '/' issue.

Change-Id: I21a48c1b845d23b80a72a207dcdeb942067a9892
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
9 years agoSupport no particular project setting
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>
9 years agoAdd trailing slash to POST URL
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>
9 years agorename requests to obs_request
Liu jue [Tue, 16 Sep 2014 07:13:33 +0000 (15:13 +0800)]
rename requests to obs_request

Change-Id: Iab87c78fd5097e2ca22432afc93fabaf61964640

9 years agoOnly allow 'prerelease' type into pre-workflow.
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

9 years agoImplemented new job job_accept_or_reject
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>
9 years agoImplemented create_sr and set_sr_state
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>
9 years agoRemoving redundant git clone operation.
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

9 years agoChanging the exit code of scm check script.
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

9 years agoConvert GERRIT_SILENT_MODE to int
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>
9 years agoAdd fetch and check change feature
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>
9 years agoModify the way of using 'request_accepted'.
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

9 years agoMake the scm script name to be more professional
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>
9 years agoAdd gbs-api into the dependency list of jenkins.
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

9 years ago[draft]Job for syncing IRIS data from scm/meta/git project
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>
9 years agoTest fixed backenddb functionality
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>
9 years agotest_backenddb: Implement hdel
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>
9 years agoFix setting hash values
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>
9 years agobackenddb: Fix error in Entity.__getitem__
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>
9 years agoFixed mock implementation of hgetall
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>
9 years agoGet rid of dependency of 'gbs'.
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

9 years agoFix the wrong close paren
Liu jue [Mon, 4 Aug 2014 07:43:46 +0000 (15:43 +0800)]
Fix the wrong close paren

Change-Id: I0061645278b04fd7b443cff11d246e15de5bba79

9 years agoDelete the no use parameter.
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

10 years agoRemove the void prerelease snapshots
Liu jue [Thu, 31 Jul 2014 04:04:10 +0000 (12:04 +0800)]
Remove the void prerelease snapshots

Fixes #1665

Change-Id: I99ae4528dc16929916eb29fcafdbbc4f5e7be805

10 years agoAdd execute permission to release_snapshot job
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>
10 years agoJob syncsnapdiff use hard code to search last buildid
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

10 years agocomment out the url description in manifest files
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

10 years agoRemove commit id in message.
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

10 years ago', ' replaces ',' to separate the projects name.
ZhuoX Li [Tue, 15 Jul 2014 05:03:37 +0000 (13:03 +0800)]
', ' replaces ',' to separate the projects name.

Change-Id: Ia1c853c396bcf1dc2df42c82b88309d3561fdecc

10 years agoAdd return proper result when syncing
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

10 years agoModify the data structure for new description info.
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

10 years agogbs-service: enable 'error-pkg' parameter
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>
10 years agoUpdate bare repository failed .
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

10 years agoUse xml.sax module to solve the encode issue
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

10 years agoImprove logging and archiving.
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

10 years agoAdd clarification comment in testing job.
Igor Stoppa [Thu, 19 Jun 2014 15:18:25 +0000 (18:18 +0300)]
Add clarification comment in testing job.

Change-Id: Id9cfbe9f4db3c12fa36c94889c3f5bc74bb04695

10 years agoPublish test results to OBS
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

10 years agoReduce wget output when downloading.
Igor Stoppa [Thu, 19 Jun 2014 09:26:14 +0000 (12:26 +0300)]
Reduce wget output when downloading.

Change-Id: I2492da49ec9c69b49ce9f55178d47906acf29c4d

10 years agoCreate a tarball with the results of the testing.
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

10 years agoFix the ascii encode issue about sending mail
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:
  '&lt;stephane.desneux@open.eurogiciel.org&gt;' should be changed to
  '<stephane.desneux@open.eurogiciel.org>'

Fixes: #2010

Change-Id: Ib0d1b0c32f37a2a1f007ac8bc5e319f98f1175db

10 years agoAdd two blanks to ensure manifest can work
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

10 years ago Catch the exception come from delete obs project/package
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

10 years agosupport multiply version of rpm packages in manifest
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

10 years agoAdd a filter for updating repos.yaml in job_load_repos.yaml.py
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

10 years agoFix the IndexError issue for job_sync_snapdiff.py
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

10 years agoutils/make_latest_link: make the link target a relative path
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>
10 years agoFetch complete buildconf for each repo
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>
10 years agoRemove buildconf from builddata directory
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>
10 years agoAdd 'unknown' state into the filter regular of generating snapshot.
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

10 years agoFix the crash about getting repo name from redis
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

10 years agoFix some trivial pylint issues
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

10 years agoPylint for job_create_snapshot.py
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)

10 years agoDelete 'PrereleaseDir' key in condition
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

10 years agoPylint for job_release_snapshot.py
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

10 years agoadd new job script to create release repo from snapshot
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>
10 years agomove make_latest_link to common/utils, add a parameter to keep the origin copy
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>
10 years agoDelete the ks file message when trigger job-sync-snapdiff
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

10 years agoFix the debug of uploading service file is failed to a linked
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

10 years agoFix "line too long" warning.
Igor Stoppa [Wed, 21 May 2014 13:34:47 +0000 (16:34 +0300)]
Fix "line too long" warning.

Change-Id: Ia414ab9ba445d7c4e7a72f3986e64bceb7455372

10 years agoChange the filter regular of generating snapshot.
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

10 years agoMake the tester job more verbose
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

10 years agoJenkins Build Testing script
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

10 years agoTurn on generation of git meta for obs-gbs-service
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>
10 years agoFix bug on submit tag check
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>
10 years agoChange manifest for new build.xml structure
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

10 years agoUpdate the function to match new data structure
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

10 years agoUpdate build.xml to match the new repo structure
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

10 years agoFix the bug : reject/request event without complete description
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

10 years agoUpdate debug and packages directory structure
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

10 years agoFix interface mismatch of extract_image_conf
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>
10 years agoSupport get project name of OBS_SRCSRV_REQUEST_*
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>