]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
debian_build.py: Rename archive01 to apt01.
authorBenjamin Drung <benjamin.drung@profitbricks.com>
Fri, 6 Jun 2014 09:25:32 +0000 (11:25 +0200)
committerBenjamin Drung <benjamin.drung@profitbricks.com>
Fri, 6 Jun 2014 09:25:32 +0000 (11:25 +0200)
debian_build.py

index c01145baec3011e77adade11e915ea364b9598c7..d59a8a6be0b96a9d4089d1302233bbf7cbba467f 100755 (executable)
@@ -104,10 +104,10 @@ def getopts():
     return parser.parse_args()
 
 
-def upload_to_archive01(archive01_target, archive01_dist, changes_file, logger):
+def upload_to_apt_repository(apt_target, apt_dist, changes_file, logger):
     try:
-        # Change distribution for archive01 in changes file
-        cmd = ['sed', '-i', r's/^\(Distribution: \).*$/\1' + archive01_dist + '/',
+        # Change distribution for new apt repository in changes file
+        cmd = ['sed', '-i', r's/^\(Distribution: \).*$/\1' + apt_dist + '/',
                changes_file]
         command = ' '.join(cmd)
         logger.debug('Executing "{command}" ...'.format(command=command))
@@ -117,7 +117,7 @@ def upload_to_archive01(archive01_target, archive01_dist, changes_file, logger):
             logger.warn('%s failed.' % command)
             return
 
-        cmd = ['dput', archive01_target, changes_file]
+        cmd = ['dput', apt_target, changes_file]
         command = ' '.join(cmd)
         logger.debug('Executing "{command}" ...'.format(command=command))
         if subprocess.call(cmd) == 0:
@@ -125,7 +125,7 @@ def upload_to_archive01(archive01_target, archive01_dist, changes_file, logger):
         else:
             logger.warn('%s failed.' % command)
     except Exception as error:
-        logger.warning("Experimental upload to http://archive01.pb.local failed. "
+        logger.warning("Experimental upload to http://apt01.pb.local failed. "
                        "See above for details.", exc_info=error)
 
 
@@ -214,8 +214,8 @@ if __name__ == '__main__':
         new_version = curr_version + options.version_suffix
         pb_suite = 'master-{dist}'.format(dist=curr_dist)
         reprepro_base = '/srv/pb-{dist}'.format(dist=curr_dist)
-        archive01_dist = curr_dist
-        archive01_target = "archive01-debian"
+        apt_dist = curr_dist
+        apt_target = "apt01-debian"
 
         # replace valid debian version chars that are invalid for git tagging
         new_tag = curr_version.replace('~', '_').replace(':', ',')
@@ -271,8 +271,8 @@ if __name__ == '__main__':
         )
         pb_suite = 'develop-{dist}'.format(dist=curr_dist)
         reprepro_base = '/srv/pb-{dist}'.format(dist=curr_dist)
-        archive01_dist = curr_dist + '-dev'
-        archive01_target = "archive01-debian"
+        apt_dist = curr_dist + '-dev'
+        apt_target = "apt01-debian"
         # reset actions
         # .. always include successful build packages into CIDB
         if curr_dist == 'squeeze':
@@ -299,8 +299,8 @@ if __name__ == '__main__':
             suffix=options.version_suffix,
         )
         reprepro_base = '/srv/dev-{dist}'.format(dist=curr_dist)
-        archive01_dist = curr_dist + "-" + local_branch.replace("/", "-")
-        archive01_target = "archive01-debian-dev"
+        apt_dist = curr_dist + "-" + local_branch.replace("/", "-")
+        apt_target = "apt01-debian-dev"
 
     else:
         logger.error('Don\'t know how to handle branch "{branch}".'.format(
@@ -690,7 +690,7 @@ export {builder_env} FORCE_SHELL=TRUE
 
             figlet('Upload OK')
 
-            upload_to_archive01(archive01_target, archive01_dist, changes_file, logger)
+            upload_to_apt_repository(apt_target, apt_dist, changes_file, logger)
 
         except Exception as error:
             logger.error('Upload failed. See above for details.', exc_info=error)