WebDAV Plugin Configuration - jhermann/artifactory-debian GitHub Wiki
Basic 'webdav' 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
login
credentials:- To avoid any password prompts,
login
can take the formaccount:password
(make sure you properly secure your~/.dput.cf
in case you store passwords in it). - If
login
contains${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,
incoming
can 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
.changes
file, most notablydate
,source
,binary
,architecture
,version
,distribution
, andurgency
. fqdn
— The value of thefqdn
configuration 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 thelogin
setting (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.changes
file 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/...
Extended 'webdav' Configuration
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=repo
pairs; 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