-
Notifications
You must be signed in to change notification settings - Fork 4
WebDAV Plugin Configuration
Refer to man dput.cf for the common configuration options shared by all upload methods.
Here, only noteworthy differences are mentioned.
- Versatile handling of
logincredentials:- To avoid any password prompts,
logincan take the formaccount:password(make sure you properly secure your~/.dput.cfin case you store passwords in it). - If
logincontains${envvar}references, they are expanded. - If the value starts with
file:, the credentials are loaded from the given path. - If the value starts with
netrc:, the given file is treated as a NETRC resource (refer toman 5 netrc); just providingnetrc:uses the default~/.netrc.
- To avoid any password prompts,
-
incomingcan be a full URL, and you can insert package metadata into the path, to support uploads into hierarchical repository structures (like«repo»/«package»/«version»/«package»_«version»_«arch».deb).
For the variable replacements in incoming, the following keys are supported:
- Metadata from the
.changesfile, most notablydate,source,binary,architecture,version,distribution, andurgency. -
fqdn— The value of thefqdnconfiguration option. -
repo— The same asdistribution, unless mapped like described in the next section. -
upstream— The upstreamversion(everything before the first dash or tilde), or for native packages the same asversion. -
loginuser— The account name from theloginsetting (everything before the 1st colon).
On modern systems with Python 2.6 or 2.7 installed, you can use the {variable} syntax for replacements;
otherwise you have to fall back on %(variable)s instead.
You can also set some repository parameters in the URL's anchor, formatted like a query string (key=val&...):
-
mindepth— The number of path components that must already exist (default: 0). You can use this to prevent accidental creation of new repositories, or packages. -
overwrite— Allows you to disable the check for an already existing.changesfile at the target URL (set to 0 or 1; default: 0).
As mentioned in the README, if you have the indexing job in Jenkins,
a successful upload can trigger an automatic index run via its REST API,
and the post_upload_command configuration option comes into play here.
Here's a sample Artifactory host section:
[artifactory-debian]
method = webdav
fqdn = repo.example.com:80
login = uploader:password
incoming = http://{fqdn}/artifactory/debian-local/{repo}/{source}/{upstream}/#mindepth=3&overwrite=0
allow_unsigned_uploads = 1
# post_upload_command = curl ... http://jenkins/...Some custom webdav options need the dput patch applied,
refer to Installing the 'webdav' Plugin for that.
The extended options are these:
-
repo_mappings— Maps distribution names to repository names, as a whitespace separated list ofdistribution=repopairs; if no mapping is found, the name is used unchanged. Distribution names are matched ignoring case, and may be glob patterns (see the example below). Mapping rules are checked in the order they appear, and the first match is used.
Here's an extended configuration example:
[artifactory-debian]
method = webdav
…
repo_mappings = precise=1204_Precise unstable=snapshots *-experimental=snapshots *=incoming