← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:charm-artifactory-write-credentials into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:charm-artifactory-write-credentials into launchpad:master.

Commit message:
charm: Add artifactory_write_credentials option to ppa-publisher

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/455581

This is needed to handle PPAs that are published to Artifactory rather than locally.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:charm-artifactory-write-credentials into launchpad:master.
diff --git a/charm/launchpad-ppa-publisher/config.yaml b/charm/launchpad-ppa-publisher/config.yaml
index 06336ff..84483d6 100644
--- a/charm/launchpad-ppa-publisher/config.yaml
+++ b/charm/launchpad-ppa-publisher/config.yaml
@@ -8,6 +8,12 @@ options:
     default:
     description:
       Base URL for publishing suitably-configured archives to Artifactory.
+  artifactory_write_credentials:
+    type: string
+    default:
+    description: >
+      Credentials for writing to Artifactory repositories (formatted as
+      "user:token").
   domain_ppa_private:
     type: string
     default: private-ppa.launchpad.test
diff --git a/charm/launchpad-ppa-publisher/templates/launchpad-ppa-publisher-secrets-lazr.conf.j2 b/charm/launchpad-ppa-publisher/templates/launchpad-ppa-publisher-secrets-lazr.conf.j2
index 27e367b..017aceb 100644
--- a/charm/launchpad-ppa-publisher/templates/launchpad-ppa-publisher-secrets-lazr.conf.j2
+++ b/charm/launchpad-ppa-publisher/templates/launchpad-ppa-publisher-secrets-lazr.conf.j2
@@ -8,6 +8,9 @@
 # Values are strings, except for numbers that look like ints.  The tokens
 # true, false, and none are treated as True, False, and None.
 
+[artifactory]
+{{- opt("write_credentials", artifactory_write_credentials) }}
+
 [signing]
 client_private_key: {{ signing_client_private_key }}