A command line tool to help with shipping system addons in Balrog
Перейти к файлу
Julien Cristau 5cf943230f
Merge pull request #6 from jcristau/license
Add LICENSE
2023-02-22 11:07:19 +01:00
morgoth Suffix fix 2022-02-07 10:33:26 -06:00
requirements Major overhaul and add ability to upload to balrog 2018-09-18 01:18:43 -04:00
.gitignore Prep for balrog integration 2017-09-07 04:29:17 -04:00
LICENSE Add LICENSE 2023-02-21 16:40:34 +01:00
README.md Update README 2019-04-04 00:06:00 -04:00
setup.py Add LICENSE 2023-02-21 16:40:34 +01:00

README.md

morgoth-cli

A command line tool to help with shipping system addons in Balrog

Installation

Clone the repo locally:

$ git clone https://github.com/rehandalal/morgoth-cli.git

Use pip to install from the repo:

$ cd morgoth-cli
$ pip install --editable .

Note: You can leave out the --editable flag however you will then need to reinstall any time you update the repo.

Configuration

To configure this tool simply run the following command:

$ morgoth init

If you plan on running multiple commands you may find it useful to store a bearer token by running:

$ morgoth auth

Additionally if you need to change any other configurations you can simply run:

$ morgoth config [KEY] [VALUE]

For example if you use AWS profile you can configure the profile to use with the following:

$ morgoth config aws.profile my-profile-name

Configuration options

balrog_url: The URL of the Balrog server to use.

aws.profile: The name of the AWS profile to use.

aws.prefix: The prefix to be added to the filename in the S3 bucket.

aws.bucket_name: The name of the S3 bucket to use.

aws.base_url: The base public URL for the S3 bucket.

Usage

Make releases:
$ morgoth make release [PATH_TO_XPI]

This command is used to create a new release from an XPI file. It will check if the XPI has been uploaded to S3 and if not upload it for you with the correctly formatted file name.

It will then give you the option to directly upload the release to Balrog, or save it to a file, or simply output it to stdout.

Make superblobs:
$ morgoth make superblob [RELEASES] 

A superblob is a type of release that represents a group of releases.

The releases passed to this command may either be the name of a release or the path to a JSON file with the data for a release.

It will then give you the option to directly upload the release to Balrog, or save it to a file, or simply output it to stdout.

Modify rules:
$ morgoth modify rules [RULES]

This command lets you modify one or more rules.

The --add option allows you to add a release to each of the rules if it does not already exist.

The --remove option allows you to remove a release from each of the rules, if it exists.

The rule changes are added to Balrog as "Scheduled Changes" as this is how sign-offs are handled on live channels. The changes are scheduled for 5 seconds in the future so they should take effect immediately after any required sign-offs are received.