Code Monkey home page Code Monkey logo

bintray-resource's Introduction

Bintray Resource

Out-only resource for pushing content to Bintray.

Source Configuration

  • username: Required. The Bintray username to upload with
  • api_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.

Behaviour

out: Upload content to a package. Create the package if it doesn't exist.

Parameters

  • 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 the version_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.

Example Configuration

Resource type

- name: bintray
  type: docker-image
  source:
    repository: camelpunch/bintray-resource
    tag: v0.3 # optional, but shields you from breaking API changes

Resource

- name: release
  type: bintray
  source:
    username: USERNAME
    api_key: API-KEY
    subject: myorg
    repo: myrepo
    package: some-package

Plan

- 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:

  1. POST to https://bintray.com/api/v1/packages/myorg/myrepo with JSON body. This creates the package.
  2. 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.
  3. 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.

bintray-resource's People

Contributors

camelpunch avatar

Watchers

 avatar  avatar

bintray-resource's Issues

Support Debian packages

Example config:

      params:
        file: output/plugins/plugins/*/gen_smtp-*.ez
        deb:
          distribution:
            - wheezy
            - jessie
          component:
            - main
          architecture:
            - i386
            - amd64

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.