services/jenkins-scripts.git
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>
10 years agoFix image creation issue
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>
10 years agoPerform Tests on the images built successfully.
Igor Stoppa [Tue, 6 May 2014 10:30:20 +0000 (13:30 +0300)]
Perform Tests on the images built successfully.

Change-Id: I7c621e8f0020688810b42c2e22e92e88f1e8e0aa

10 years agoPylinted job_pre_release_obs
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>
10 years agoCatch error of sendmail in job_mail_sender.py
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

10 years agoChange the way of dealing with has_images()
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

10 years agoFix exception for no found git-obs-mapping entity
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>
10 years agoPylint for job_imager.py
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

10 years agoReset 'images' meta info for prerelease projects
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>
10 years agoRepomaker: Fix search criteria for image configuration packages
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>
10 years agoChanges path of finding repo packages
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

10 years agoUpdate the repo structure of prerelease
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>
10 years agoMerge all repos into one single snapshot
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>
10 years agoSupport multiply repos in repomaker
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>
10 years agoMake imagedata save function more generic
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>
10 years agoSupport multiply repos in snapshot module
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>
10 years agoSupoort new repos.yaml format in backenddb
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

10 years agoChanged version in devel to 0.16
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>
10 years agoRemoved branch check
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>
10 years agoAdd a UploadError class in common/upload_service.py
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

10 years agoAdd a new file for upload_service in common
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

10 years agoCatch buildservice ObsError exception
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

10 years agoEscape < > to fix xml syntax
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>
10 years agoPylint for job_submitobs.py
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

10 years agopylint for common/manifest.py
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

10 years agoPylint for common/utils.py
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

10 years agoPylint for common/repomaker.py
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

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

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

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

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

10 years agoCatch HTTPError:bad request for submit_req
ZhuoX Li [Mon, 24 Mar 2014 07:55:04 +0000 (15:55 +0800)]
Catch HTTPError:bad request for submit_req

After upload _service, if catches 'Bad Request',
Obs service should enough time to execute.

Change-Id: Ib52d1439ea3969d3f0d2021d4f8f12e86e32f5f9

10 years agoFix bug that package name causes for _service
ZhuoX Li [Fri, 21 Mar 2014 06:35:44 +0000 (14:35 +0800)]
Fix bug that package name causes for _service

 some 'package name' is different from 'spec name'.
When use 'package nam'e from gerrit to create package,
upload _service file is failed.So here use 'spec name'
to create package and upload _service file.

Change-Id: If9a49591edf6c4cf1ff9dc13170a8ee7b7a61ca0

10 years agosubmitobs: Do not submit to projects using prerelease workflow
Ed Bartosh [Fri, 21 Mar 2014 00:32:58 +0000 (02:32 +0200)]
submitobs: Do not submit to projects using prerelease workflow

Submitobs job should skip submission If staging project is set to
'prerelease' in git-obs mapping.

Fixes: #1744

Change-Id: I13b6b761e53337ce5afe3df1b93ef58a5c848c44
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
10 years agoPylinted
Ed Bartosh [Thu, 20 Mar 2014 23:59:47 +0000 (01:59 +0200)]
Pylinted

Fixed potential crash because of undefined variable 'name'.

Change-Id: I98d15460b846f31630a1f15a386d3105555ad7e6
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
10 years agojob_submit: Added commit id and submitter to meta
Ed Bartosh [Thu, 20 Mar 2014 23:53:27 +0000 (01:53 +0200)]
job_submit: Added commit id and submitter to meta

Repa will add commit id and submitter to SR, which is requested by
release engineers in this bug:
https://bugs.tizen.org/jira/browse/TINF-468

Fixes: #1679
Fixes: #TINF-468

Change-Id: I3c6e578eafc5f1c0e7e3194b27511fbc87d5a455
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
10 years agoDo not notify submitter about revoked SRs
Ed Bartosh [Sat, 15 Mar 2014 13:47:52 +0000 (15:47 +0200)]
Do not notify submitter about revoked SRs

This is a follow-up fix for previously 'fixed' issue. Second try to
disable notifications about 'revoked' SRs from build projects.
Developers are still getting those confusing emails.

Change-Id: I666713f407ebc0e164dc45e3802349cb6d390bbf
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
10 years agoTrigger post-image-creation job only for pre-release images
Hasan Wan [Tue, 11 Mar 2014 08:28:16 +0000 (10:28 +0200)]
Trigger post-image-creation job only for pre-release images

Fixes: 1678

Change-Id: I1f8c0a208e1d0e00763dc037dd613dd1d8697ebd
Signed-off-by: Hasan Wan <hasan.wan@intel.com>