Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielBusta committed Nov 21, 2023
1 parent 6ae89c6 commit efd478a
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# mozilla-linux-pkg-manager

`mozilla-releng/mozilla-linux-pkg-manager` is a Python tool for managing Mozilla product packages hosted in Linux software repositories on the cloud.
`mozilla-releng/mozilla-linux-pkg-manager` is a Python tool for managing Mozilla product packages hosted in Linux software repositories on Google cloud.
It can be used to clean-up obsolete Firefox Nightly versions.

## Requirements
Expand All @@ -20,10 +20,31 @@ It can be used to clean-up obsolete Firefox Nightly versions.
2. **Clone the Repository**: Clone the `mozilla-linux-pkg-manager` repository using the command `git clone https://github.com/mozilla-releng/mozilla-linux-pkg-manager.git`.
3. **Install Dependencies**: Navigate to the repository's root directory and run `poetry install` to install the required dependencies.

### Setup Authentication
The easiest way to authenticate is using the Google Cloud SDK:

```bash
gcloud auth application-default login
```
Note that this command generates credentials for client libraries. To authenticate the CLI itself, use:

```bash
gcloud auth login
```

### Setup the Development Environment
To set up the environment for running `mozilla-linux-pkg-manager` set the following variables:

```bash
# defaults to /path/to/home/.config/gcloud/application_default_credentials.json
export GOOGLE_APPLICATION_CREDENTIALS=path/to/home/.config/gcloud/[FILENAME].json
export GOOGLE_CLOUD_PROJECT=[PROJECT_NAME]
```

### Running `mozilla-linux-pkg-manager`
To run `mozilla-linux-pkg-manager`, use Poetry with the following command:
```bash
poetry run mozilla-linux-pkg-manager clean-up [-h] --product PRODUCT --channel CHANNEL --format FORMAT [--retention-days RETENTION_DAYS] [--dry-run]
poetry run mozilla-linux-pkg-manager clean-up [-h] --product PRODUCT --channel CHANNEL --format FORMAT --repository REPOSITORY --region REGION [--retention-days RETENTION_DAYS] [--dry-run]
```
#### Parameters
- `--product`: Specifies the Mozilla product to manage (e.g. `nightly`, `release`, `beta`). Currently, only `firefox` is supported.
Expand All @@ -38,7 +59,7 @@ poetry run mozilla-linux-pkg-manager clean-up [-h] --product PRODUCT --channel C
To clean up the nightly .deb packages that are older than 7 days:

```bash
poetry run mozilla-linux-pkg-manager clean-up --product firefox --channel nightly --format deb --retention-days 7
poetry run mozilla-linux-pkg-manager clean-up --product firefox --channel nightly --format deb --retention-days 7 --repository mozilla --region us
```

## Building and Installing a Python Wheel
Expand All @@ -60,7 +81,7 @@ After installation, the package can be used from anywhere on your system, provid
To clean up nightly .deb packages that are older than 3 days:

```bash
mozilla-linux-pkg-manager clean-up --product firefox --channel nightly --format deb --retention-days 3
mozilla-linux-pkg-manager clean-up --product firefox --channel nightly --format deb --retention-days 3 --repository mozilla --region us
```

## Docker
Expand Down

1 comment on commit efd478a

@firefoxci-taskcluster
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh oh! Looks like an error! Details

Taskcluster-GitHub attempted to create a task for this event with the following scopes:

["assume:repo:github.com/mozilla-releng/mozilla-linux-pkg-manager:branch:main","queue:route:checks","queue:scheduler-id:taskcluster-github"]

The expansion of these scopes is not sufficient to create the task, leading to the following:

Client ID static/taskcluster/github does not have sufficient scopes and is missing the following scopes:

{
  "AllOf": [
    "queue:route:index.mozilla.v2.mozilla-linux-pkg-manager.latest.taskgraph.decision",
    "queue:route:index.mozilla.v2.mozilla-linux-pkg-manager.revision.efd478a466d2e3f9972457afdcd911f3b79d95a7.taskgraph.decision",
    "queue:scheduler-id:mozilla-level-1",
    {
      "AnyOf": [
        "queue:create-task:highest:mozilla-1/decision-gcp",
        "queue:create-task:very-high:mozilla-1/decision-gcp",
        "queue:create-task:high:mozilla-1/decision-gcp",
        "queue:create-task:medium:mozilla-1/decision-gcp",
        "queue:create-task:low:mozilla-1/decision-gcp",
        "queue:create-task:very-low:mozilla-1/decision-gcp"
      ]
    }
  ]
}

This request requires the client to satisfy the following scope expression:

{
  "AllOf": [
    "assume:repo:github.com/mozilla-releng/mozilla-linux-pkg-manager:branch:main",
    "queue:route:checks",
    "queue:route:index.mozilla.v2.mozilla-linux-pkg-manager.latest.taskgraph.decision",
    "queue:route:index.mozilla.v2.mozilla-linux-pkg-manager.revision.efd478a466d2e3f9972457afdcd911f3b79d95a7.taskgraph.decision",
    "queue:create-task:project:none",
    "queue:scheduler-id:mozilla-level-1",
    {
      "AnyOf": [
        "queue:create-task:highest:mozilla-1/decision-gcp",
        "queue:create-task:very-high:mozilla-1/decision-gcp",
        "queue:create-task:high:mozilla-1/decision-gcp",
        "queue:create-task:medium:mozilla-1/decision-gcp",
        "queue:create-task:low:mozilla-1/decision-gcp",
        "queue:create-task:very-low:mozilla-1/decision-gcp"
      ]
    }
  ]
}

  • method: createTask
  • errorCode: InsufficientScopes
  • statusCode: 403
  • time: 2023-11-21T02:32:59.189Z

Please sign in to comment.