Skip to main content

Utility for creating and uploading zip packages

Project description

Release License Travis

Overview

The release-manager is a Python utility for easily uploading zipped binaries to a destination target. It allows you to:

  • Create new package versions

  • Upload artifacts to said version

  • Currently only support zip

  • Upload to multiple targets

  • Currently only supports BinTray

  • Combine N binaries into the artifact that is then uploaded

  • Upload N artifacts to for the package

Installing

  • Option 1: Download this repository and run: python setup.py install

  • Option 2: Install from pip: pip install release-manager

Usage

usage: release-manager.py [-h] [--config CONFIG] [--make-version]
                          [--make-artifact] [--upload-artifact]
                          [--check-version] [--version]

BinTray utility for creating and uploading zip packages.

optional arguments:
  -h, --help         show this help message and exit
  --config CONFIG    the path to the configuration yaml file
  --make-version     makes a new version for the package
  --make-artifact    makes the artifacts that will be uploaded
  --upload-artifact  uploads the artifacts to the targets
  --check-version    checks that the version specified matches the build
  --version          show program's version number and exit

Please note when specifying the options to run that they will be applied to every package in your config file.

Options:

  • You cannot upload the artifacts without also making the artifacts:

  • --upload-artifact requires --make-artifact

  • Checking the version is useful for automated build tools such as travis to assert that you have the correct build versions specified

Config

The release-manager requires a config be passed to it in the form of a yaml file. You can find a sample config in the resources directory.

Environment resolver

To get values from the environment at runtime set the value like the following:

some_env_key: <%= ENV['SOME_ENV_VALUE'] %>

Shell resolver

To evaluate a shell command at runtime set the value like the following:

some_cmd_value: <%= CMD['cat VERSION'] %>

NOTE: If the command does not exit with code 0 the config will not load.

Example config

# Required: local settings
local:
  root_dir : <%= ENV['TRAVIS_BUILD_DIR'] %>

# Required: deployment targets
targets:
  - type     : "bintray" # Options: bintray
    user     : <%= ENV['BINTRAY_USER'] %>
    password : <%= ENV['BINTRAY_PASSWORD'] %>

# Required: packages to be deployed
packages:
  - repo     : "generic"
    name     : "release-manager"
    user_org : "jbeemster"
    publish  : true

    # Will attempt to overwrite a published entity if one is found
    override : false

    # The version of this package
    version  : <%= CMD['cat VERSION'] %>

    # Required IF '--check-version' is passed: will assert that
    # both versions are the same
    build_version : <%= ENV['TRAVIS_TAG'] %>

    # Optional: Build commands
    # You can nest your artifact creation commands here!
    build_commands:
      - ls -ls

    # Required: Artifact
    artifacts:
        # The artifact name is composed like so:
        # {{prefix}}{{version}}{{suffix}}.zip
      - prefix : "release_manager_"
        suffix : ""
        type   : "zip"

        # The binaries to put in the zip
        binary_paths:
          - setup.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

release-manager-0.1.0-rc1.tar.gz (12.8 kB view details)

Uploaded Source

File details

Details for the file release-manager-0.1.0-rc1.tar.gz.

File metadata

File hashes

Hashes for release-manager-0.1.0-rc1.tar.gz
Algorithm Hash digest
SHA256 e7181a7309c1674a90c638739a9fdb6f6b62671aaacc51b92a5a12e9bc90d482
MD5 9d0fccc70746b6dddbfbe0e6c8ff5458
BLAKE2b-256 d54b59b2ce543312737ae4c964dd985c75d77da8f6c389b9f1bc5c7c7632f425

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page