Out-only resource for pushing content to Bintray.
username
: Required. The Bintray username to upload withapi_key
: Required. The Bintray API key associated with the above user.subject
: Required. The organisation to upload this package to.repo
: Required. The repository to upload this package to.package
: Required. The name of the package to create / upload to.
file
: Required. Path to the file to upload, provided by the output of a task. If multiple files are matched by the glob, an error is raised. The file which matches will be uploaded as content to the version as found in theversion_regexp
parameter.version_regexp
: Required. The pattern to match filenames against on disk. The first grouped match is used to extract the version.version_prefix
: Optional. Useful for adding a 'v' to the start of the uploaded version.publish
: Optional. Whether to mark the uploaded content as published.list_in_downloads
: Optional. Whether to list the uploaded file in the downloads list.licenses
: Required. A list of licenses which must match those available on Bintray.vcs_url
: Required. The URI for the package's public version control.gpg_passphrase
: Optional. The passphrase for your signing key, if you have one.debian
: Optional Debian repo configuration. See the example below for keys.
- name: bintray
type: docker-image
source:
repository: camelpunch/bintray-resource
tag: v0.3 # optional, but shields you from breaking API changes
- name: release
type: bintray
source:
username: USERNAME
api_key: API-KEY
subject: myorg
repo: myrepo
package: some-package
- put: release
params:
file: some-output/*/mypackage-*.deb
version_regexp: some-output/(.*)/.*
version_prefix: v
publish: true
list_in_downloads: true
licenses: ["Mozilla-1.1"]
vcs_url: https://github.com/myorg/my-product
gpg_passphrase: foobarbaz
debian: # you obviously wouldn't include this for non-debian packages
distribution:
- wheezy
- jessie
- stretch
component:
- main
- contrib
architecture:
- i386
- amd64
The above plan will cause three requests to take place:
- POST to https://bintray.com/api/v1/packages/myorg/myrepo with JSON body. This creates the package.
- PUT to https://bintray.com/api/v1/content/myorg/myrepo/mypackage-globbed-stuff.deb;publish=1;deb_distribution=wheezy,jessie,stretch;deb_component=main,contrib;deb_architecture=i386,amd64 with the file content. The GPG passphrase is sent in the 'X-GPG-PASSPHRASE' header.
- PUT to https://bintray.com/api/v1/file_metadata/myorg/myrepo/mypackage-globbed-stuff.deb with
{ "list_in_downloads": true }
If Bintray responds with 409 Conflict
for any of the requests (i.e. resource already exists), future requests continue as if nothing happened. Any other 4xx
/ 5xx
response raises an exception, visible in Concourse logs.