Bug 1321513 - Make pushapkworker live under /build/scriptworker r=aki draft
authorJohan Lorenzo <jlorenzo@mozilla.com>
Wed, 04 Jan 2017 18:12:45 +0100
changeset 4599 1ba8136b53a6bdcdc40f2ddfdd11521fdb6cfbba
parent 4594 5f0d82f7b4450a8e31c83afe0b513e767c46f271
push id2539
push userbmo:jlorenzo@mozilla.com
push dateThu, 05 Jan 2017 13:47:32 +0000
reviewersaki
bugs1321513
Bug 1321513 - Make pushapkworker live under /build/scriptworker r=aki MozReview-Commit-ID: BhaRcZeBpjv
manifests/moco-config.pp
modules/pushapkworker/manifests/init.pp
modules/signing_scriptworker/manifests/settings.pp
--- a/manifests/moco-config.pp
+++ b/manifests/moco-config.pp
@@ -399,16 +399,17 @@ class config inherits config::base {
         }
     }
 
     # TC signing workers
     $signingworker_exchange = "exchange/taskcluster-queue/v1/task-pending"
     $signingworker_worker_type = "signing-worker-v1"
 
     # scriptworker
+    $scriptworker_root = "/builds/scriptworker"
     $scriptworker_gpg_private_keys = hiera_hash('scriptworker_gpg_private_keys')
     $scriptworker_gpg_public_keys = hiera_hash('scriptworker_gpg_public_keys')
 
     # TC balrog scriptworkers
     $balrog_scriptworker_task_max_timeout = 1200
     $balrog_scriptworker_artifact_expiration_hours = 336
     $balrog_scriptworker_artifact_upload_timeout = 600
     $balrog_scriptworker_verbose_logging = false
@@ -445,17 +446,18 @@ class config inherits config::base {
             beetmover_aws_access_key_id => secret("nightly-beetmover-aws_access_key_id"),
             beetmover_aws_secret_access_key => secret("nightly-beetmover-aws_secret_access_key"),
             beetmover_aws_s3_firefox_bucket => "net-mozaws-prod-delivery-firefox",
             beetmover_aws_s3_fennec_bucket => "net-mozaws-prod-delivery-archive",
         }
     }
 
     ## TC pushapk scriptworkers
-    $pushapk_scriptworker_root = '/builds/pushapkworker'
+    $pushapk_scriptworker_old_root = '/builds/pushapkworker' # TODO Remove this line once bug 1321513 reaches production
+    $pushapk_scriptworker_root = $scriptworker_root
     $pushapk_scriptworker_worker_config = "${pushapk_scriptworker_root}/config.json"
     $pushapk_scriptworker_script_config = "${pushapk_scriptworker_root}/script_config.json"
 
     $pushapk_scriptworker_jarsigner_keystore = "${pushapk_scriptworker_root}/mozilla-android-keystore"
     $pushapk_scriptworker_jarsigner_nightly_certificate_alias = 'nightly'
     $pushapk_scriptworker_jarsigner_release_certificate_alias = 'release'
     $pushapk_scriptworker_taskcluster_artifact_expiration_hours = 336
     $pushapk_scriptworker_taskcluster_artifact_upload_timeout = 1200
--- a/modules/pushapkworker/manifests/init.pp
+++ b/modules/pushapkworker/manifests/init.pp
@@ -86,10 +86,15 @@ class pushapkworker {
         $google_play_config['aurora']['certificate_target_location']:
             content     => $google_play_config['aurora']['certificate'];
 
         $google_play_config['beta']['certificate_target_location']:
             content     => $google_play_config['beta']['certificate'];
 
         $google_play_config['release']['certificate_target_location']:
             content     => $google_play_config['release']['certificate'];
+
+        # TODO Remove the following statement line once bug 1321513 reaches production
+        $config::pushapk_scriptworker_old_root:
+            ensure      => absent,
+            force       => true;  # Needed to delete a folder
     }
 }
--- a/modules/signing_scriptworker/manifests/settings.pp
+++ b/modules/signing_scriptworker/manifests/settings.pp
@@ -1,10 +1,12 @@
 class signing_scriptworker::settings {
-    $root = "/builds/scriptworker"
+    include ::config
+
+    $root = $config::scriptworker_root
     $worker_group = "signing-linux-v1"
     $worker_type = "signing-linux-v1"
     $taskcluster_client_id = secret("signing_scriptworker_taskcluster_client_id")
     $taskcluster_access_token = secret("signing_scriptworker_taskcluster_access_token")
     $task_script_executable = "${root}/bin/python"
     $task_script = "${root}/bin/signingscript"
     $task_script_config = "${root}/script_config.json"
     $task_max_timeout = 1800