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
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
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
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>
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>
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>
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>
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>
ZhuoX Li [Mon, 10 Mar 2014 11:00:17 +0000 (19:00 +0800)]
Use utils.upload_obs_service to replace the method of upload
Change-Id: I46e6f04043dca6d1aaf5db5e395e599a0d5722f8
ZhuoX Li [Thu, 27 Feb 2014 10:57:26 +0000 (18:57 +0800)]
Change the method of updating package in job_submitobs.py by using _service
Fixes: #1353
Change-Id: Iee9bbf8906a71a68e829618ee32537731921ad4a
ZhuoX Li [Tue, 4 Mar 2014 10:40:29 +0000 (18:40 +0800)]
Pylint for job_update_local_git.py
C: 28,0: Line too long (83/80)
Change-Id: I18160bbea39ce5262935f4fb1b08bdcade435228
Lingchaox Xin [Wed, 5 Mar 2014 03:05:08 +0000 (11:05 +0800)]
Pylint for common/runner.py
C: 87, 0: Exactly one space required after assignment
msg = 'running command: "%s"' % cmd
^ (bad-whitespace)
W: 80, 4: Attempting to unpack a non-sequence defined at line 40 (unpacking-non-sequence)
Change-Id: I30de9764b6df5792f6c0fff297b71e7ad09df361
Lingchaox Xin [Tue, 4 Mar 2014 09:57:18 +0000 (17:57 +0800)]
Pylint for common/mapping.py
C: 36, 0: No space allowed around keyword argument assignment
def __get_mapping(self, obj, branch = None):
^ (bad-whitespace)
C: 66, 0: No space allowed around keyword argument assignment
def get_submit_mapping(self, project, branch = None):
^ (bad-whitespace)
C: 11, 0: Old-style class defined. (old-style-class)
Change-Id: I399144061a1c564344cad68438fbb596b132da6d
Lingchaox Xin [Tue, 4 Mar 2014 08:32:16 +0000 (16:32 +0800)]
Pylint common/git.py
Change-Id: I410c4f48a7d75a261b5d2a45685aa57a8cefa2d9
Lingchaox Xin [Fri, 28 Feb 2014 09:09:25 +0000 (17:09 +0800)]
Codes pylinted
This patch just contains some of them, the rest will be fixed later.
Change-Id: I437f9622ccd812d0c3389d2cfbd970303e5eaa2c
Ed Bartosh [Wed, 26 Feb 2014 13:09:25 +0000 (15:09 +0200)]
Updated comment about accepted branches
Change-Id: I56cea82d3c47724b6ed115e460a10eb1e597c25a
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Ed Bartosh [Tue, 25 Feb 2014 11:25:30 +0000 (13:25 +0200)]
Fixed naming of accepted branches
Name of accepted branches were made by replacing ':' to '/' in OBS
project name. That caused conflict between branches for subprojects and
main project, e.g. Tizen:IVI and Tizen:IVI:Genivi. For this pair of
projects accepted branches were named as accepted/tizen/ivi and
accepted/tizen/ivi/genivi. This naming approach creates a conflict as
.git/refs/accepted/tizen/ivi can't be directory (for
accepted/tizen/ivi/genivi) and file (for accepted/tizen/ivi) branches at
the same time.
This issue caused failures on backend to update accepted branches.
Fixed by using '_' instead of '/' in branch names, so above 2 example
branches are named as accepted/tizen_ivi and accepted/tizen_ivi_genivi
now and do not conflict with each other.
Fixes: #1435
Change-Id: I3f253f0d438bf9b455a4fc24de151eefa1903ae5
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Lin Yang [Mon, 24 Feb 2014 03:48:04 +0000 (11:48 +0800)]
Remove duplicate function call for SR revoke event
Change-Id: Ie4898a1f0abc62830e344c57851c0b998954b309
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
Ed Bartosh [Thu, 13 Feb 2014 11:57:10 +0000 (13:57 +0200)]
Fixed bug in cleanup job
Cleanup job now takes project name either from 'project' or 'sourceproject'
field of the event structure, passed from OBS.
Previously it was taking project name only from 'project' field, which is set
for OBS_REPO_PUBLISHED event and is not set for SR_ACCEPTED event.
This was the reason for not removing prerelease projects when SR is accepted.
Fixes: #1649
Change-Id: Ie9d37f0dbba7e9d92a436e755ec0a32d636f7d3c
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Alexander Kanevskiy [Sat, 14 Dec 2013 21:34:04 +0000 (23:34 +0200)]
Removing unused imports from common/prerelease.py
Change-Id: I1a5bfe5b390d0ee01bebb3e155565d2064b3d39a
Ed Bartosh [Sat, 15 Feb 2014 16:09:58 +0000 (18:09 +0200)]
Remove prerelease project when SR is accepted
Prerelease projects should be removed from OBS when their SRs are
accepted as they're not needed anymore.
Fixes: #1649
Change-Id: I7563e19ac2c4be21b1530d110ff771fd996ba7cc
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Ed Bartosh [Sat, 15 Feb 2014 15:34:53 +0000 (17:34 +0200)]
Fixed crash in job_requests
job_requests code assumes that GIT_AUTHOR_EMAIL is set and crashes when
SR is created by repa:
info sending mail for OBS_SRCSRV_REQUEST_ACCEPTED obs_request_accept
Traceback (most recent call last):
File "/var/lib/jenkins/jenkins-scripts/job_request.py", line 342,
sys.exit(main())
File "/var/lib/jenkins/jenkins-scripts/job_request.py", line 307, in
notify_submiter(event_fields, data)
File "/var/lib/jenkins/jenkins-scripts/job_request.py", line 281, in
os.getenv('EMAIL_TEMPLATES_DIR'))
File "/var/lib/jenkins/jenkins-scripts/requests/mailer.py", line 267,
if isinstance(request_data[_to], list):
KeyError: 'GIT_AUTHOR_EMAIL'
The reason for this is that repa's SRs don't have 'Submitter' field,
which is used to set GIT_AUTHOR_EMAIL. However, it's not mandatory as
even current code gets submitter name and email from git.
This change sets GIT_AUTHOR_EMAIL using information from git.
Fixes: #1653
Change-Id: I4349687d04717e11f0cbe42819a75356fd029a61
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Ed Bartosh [Sat, 15 Feb 2014 15:10:42 +0000 (17:10 +0200)]
Skipped notification about SR creation for prerelease projects
As repa creates SRs and immediately accepts/rejects them there is no
need to notify submitter about SR creation as he/she will be anyway
notified about SR acceptance or rejection.
Fixes: #1655
Change-Id: Ice23ca4338c1b5de0e64117abec10b4ed5d167b0
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Ed Bartosh [Sat, 15 Feb 2014 13:02:21 +0000 (15:02 +0200)]
Do not notify submitter when SR is revoked
This is done to stop confusing developers by sending them notifications
about revoked SRs. SRs are revoked because submissions are accepted by
repa tool.
Fixes: #1652
Change-Id: I2663899ef9a90538c89fc4f485ef34e6cacd2203
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Ed Bartosh [Sat, 15 Feb 2014 12:53:54 +0000 (14:53 +0200)]
Delete package when SR is revoked
OBS event OBS_SRCSRV_REQUEST_REVOKED was not processed correctly in
job_requests and projects were not deleted.
Fixes: #1654
Change-Id: I92e47978e20c7e111af332e7a082037f3d8eb140
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Hasan Wan [Tue, 18 Feb 2014 03:00:50 +0000 (05:00 +0200)]
Fix the prerelease repo inconsistent with new repo structure issues
Fixes: #1658
Change-Id: If66d81ec1ceeebd4438c20c9251be5fc73d56892
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
Hasan Wan [Tue, 18 Feb 2014 02:53:11 +0000 (04:53 +0200)]
use modifyrepo_c to modify repo
keep the groups.xml and patterns.xml in repo to avoid the patterns
not found issues
Fixes: #1657
Change-Id: Ia5701206386ae056ba2a735048336b22dae24aab
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
Lingchaox Xin [Tue, 11 Feb 2014 09:10:46 +0000 (17:10 +0800)]
Limit python-requests version 2.0.1+ to have a good no_proxy support
Since python-requests in our Service Repo is 1.1.0 version, we need
upgrade it to a higher version(now the latest is 2.2.1).
Change-Id: I1bfcf1c5de2b0c7998d3615bb5b7fc658b88bd97
Lingchaox Xin [Mon, 10 Feb 2014 09:23:23 +0000 (17:23 +0800)]
Fix `IOError: [Errno 2] No such file or directory` when sync diff
Change-Id: I1c128842679e7c6f220103dc929055fb8210a8bc
Alexander Kanevskiy [Sat, 14 Dec 2013 21:32:05 +0000 (23:32 +0200)]
Fix pylint warning: redefining build-in function 'map'
W: 44, 8: Redefining built-in 'map' (redefined-builtin)
Change-Id: Ia657e719a565c3924c8505c3e9be910ea1e039c9
JF Ding [Sat, 8 Feb 2014 09:04:16 +0000 (17:04 +0800)]
Added GPLv2 COPYING file and correct the License in spec
Because we have passed the company's open-sourcing approval long before,
we need to align the license description in spec file accordingly.
And added the license file for GPLv2 by the way, the source of copy:
http://www.gnu.org/licenses/gpl-2.0.txt
Change-Id: Ibb49999d8fca9f5eeb234fc5372f016d387e0fbc
Signed-off-by: JF Ding <jian-feng.ding@intel.com>
Ed Bartosh [Fri, 24 Jan 2014 15:30:55 +0000 (17:30 +0200)]
job_policycheck: Check if packaging directory exists
Check if packaging/ directory exists before running gbs export.
Otherwize it will crash this way:
running command: "git clone
ssh://tizenrobot@review.tizen.org:29418/sdk/ide/webapp-eplugin
--reference /var/lib/jenkins/git/sdk/ide/webapp-eplugin.git
/var/lib/jenkins/jobs/policy-check/workspace/_wBiPn/sdk/ide/webapp-eplugin
", with output::
+-------------- | Cloning into
/var/lib/jenkins/jobs/policy-check/workspace/_wBiPn/sdk/ide/webapp-eplugin...
+--------------
gbp:debug: git fetch --quiet --tags origin refs/changes/29/13329/2
gbp:debug: git checkout --quiet FETCH_HEAD
packaging dir is
/var/lib/jenkins/jobs/policy-check/workspace/_wBiPn/sdk/ide/webapp-eplugin/packaging
gbp:debug: git checkout --quiet FETCH_HEAD
Traceback (most recent call last):
File "jenkins-scripts/job_policycheck.py", line 196, in <module>
sys.exit(main())
File "jenkins-scripts/job_policycheck.py", line 172, in main
if not export(prjdir, packagingdir, mygit, events, mygerrit):
File "jenkins-scripts/job_policycheck.py", line 62, in export
tempd = tempfile.mkdtemp(dir=os.path.join(prjdir, packagingdir))
File "/usr/lib64/python2.7/tempfile.py", line 318, in mkdtemp
_os.mkdir(file, 0700)
OSError: [Errno 2] No such file or directory:
'/var/lib/jenkins/jobs/policy-check/workspace/_wBiPn/sdk/ide/webapp-eplugin/packaging/tmpG92RZU'
Fixes: #1506
Change-Id: Ib73b64724ad60358328243f346a04331429327ef
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Ed Bartosh [Fri, 24 Jan 2014 12:34:00 +0000 (14:34 +0200)]
common/mapping.py: Improve xml parsing error handling
Added local exception MappingError and properly process it in
policycheck job.
Fixes: #1541
Change-Id: I3e4ab8a7ec150933876ecb4f02461406833b8e6d
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Lingchaox Xin [Fri, 24 Jan 2014 07:43:52 +0000 (15:43 +0800)]
Add index.html in templates in spec
This will fix `jinja2.exceptions.TemplateNotFound: index.html` error.
Change-Id: Ic73be70bedb67372c7cd414f123375894b4c90b5
Lingchaox Xin [Thu, 23 Jan 2014 09:56:41 +0000 (17:56 +0800)]
Fix IndexError when repo info has no element
Change-Id: Id2764928ab6ca99c88f5ad330e1bcf1c023159c8