launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #32550
[Merge] ~ruinedyourlife/launchpad:native-publishing-artifactory-creds into launchpad:master
Quentin Debhi has proposed merging ~ruinedyourlife/launchpad:native-publishing-artifactory-creds into launchpad:master.
Commit message:
Add artifactory credentials to native publisher
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~ruinedyourlife/launchpad/+git/launchpad/+merge/486208
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~ruinedyourlife/launchpad:native-publishing-artifactory-creds into launchpad:master.
diff --git a/charm/launchpad-native-publisher/config.yaml b/charm/launchpad-native-publisher/config.yaml
index 9bfb6e5..6af814d 100644
--- a/charm/launchpad-native-publisher/config.yaml
+++ b/charm/launchpad-native-publisher/config.yaml
@@ -14,6 +14,12 @@ options:
description: >
Java JDK version to install, the maven version will be the version in the
Ubuntu archive for the series of the charm.
+ artifactory_write_credentials:
+ type: string
+ default:
+ description: >
+ Credentials for writing to Artifactory repositories (formatted as
+ "user:token").
craftbuild_config:
type: string
default: ""
diff --git a/charm/launchpad-native-publisher/templates/launchpad-native-publisher-secrets-lazr.conf.j2 b/charm/launchpad-native-publisher/templates/launchpad-native-publisher-secrets-lazr.conf.j2
index b0b403a..27b5f12 100644
--- a/charm/launchpad-native-publisher/templates/launchpad-native-publisher-secrets-lazr.conf.j2
+++ b/charm/launchpad-native-publisher/templates/launchpad-native-publisher-secrets-lazr.conf.j2
@@ -8,6 +8,8 @@
# Values are strings, except for numbers that look like ints. The tokens
# true, false, and none are treated as True, False, and None.
+{% from "macros.j2" import opt -%}
+
{% if craftbuild_config -%}
{% for pillar, config in craftbuild_config.items() -%}
[craftbuild.{{ pillar }}]
@@ -17,3 +19,5 @@
{%- endfor %}
{% endif %}
+[artifactory]
+{{- opt("write_credentials", artifactory_write_credentials) }}