diff options
author | Georgy Redkozubov <georgy.redkozubov@linaro.org> | 2013-01-29 20:08:02 +0400 |
---|---|---|
committer | Georgy Redkozubov <georgy.redkozubov@linaro.org> | 2013-01-29 20:08:02 +0400 |
commit | 5989c933485546e86f01ff4c15cb8c2fb455882d (patch) | |
tree | 5804991eaca788fe84f8765bb4410e33ebf2a55b /scripts | |
parent | 0312047d4712e1b5adae855f95b3c21f8403ed22 (diff) |
Added check for BUILD-INFO.txt before publishing artifacts
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/publish_to_snapshots.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/publish_to_snapshots.py b/scripts/publish_to_snapshots.py index 5276751..3e0ad53 100755 --- a/scripts/publish_to_snapshots.py +++ b/scripts/publish_to_snapshots.py @@ -15,6 +15,7 @@ staging_target_path = '/srv/staging.snapshots.linaro.org/www/' product_dir_path = 'target/product' PASS = 0 FAIL = 1 +buildinfo = 'BUILD-INFO.txt' acceptable_job_types = [ 'android', 'prebuilt', @@ -367,6 +368,13 @@ class SnapshotsPublisher(object): print "Failed to move files destination path", target_dir_path return FAIL + def check_buildinfo(self, build_dir_path): + buildinfo_path = os.path.join(build_dir_path, buildinfo) + if not os.path.exists(buildinfo_path): + return FAIL + + return PASS + def main(): global uploads_path @@ -387,6 +395,10 @@ def main(): if build_dir_path is None or target_dir_path is None: print "Problem with build/target path, move failed" return FAIL + ret = publisher.check_buildinfo(build_dir_path) + if ret != PASS: + print "BUILD-INFO.txt is not present in artifacts being published" + return FAIL ret = publisher.move_artifacts(args, build_dir_path, target_dir_path) if ret != PASS: print "Move Failed" |