Skip to content

mozilla-releng/transparencyscript

 
 

Repository files navigation

Binary-Transparency ReadMe

Testing

  1. Clone the repo: git clone https://github.com/BrandonTang/binary-transparency.git
  2. Setup a python3 virtualenv named transparencyscript-venv, activate, and install required packages: virtualenv -p python3 transparency-venv & source transparency-venv/bin/activate & pip install -r requirements.txt
  3. Install transparencyscript in developer mode into the virtualenv: pip install -e .
  4. Create a script_config.json file referring to script_config_example.json, that looks like:

    {
        "work_dir": ".",
        "public_artifact_dir": ".",
        "lego-path": "/Users/btang/go/bin/lego",
        "sct_filename": "sct_list.bin",
        "log_list": [
            "https://ct.googleapis.com/pilot",
            "https://ct.googleapis.com/rocketeer"
        ],
        "payload": {
            "stage-product": "firefox",
            "version": "53.0b5",
            "contact": "btang@mozilla.com",
            "summary": "https://ipv.sx/tmp/SHA256SUMMARY",
            "chain": "TRANSPARENCY.pem"
        }
    }
  5. Create a passwords.json file referring to passwords_example.json, that looks like:

    {
        "AWS_KEYS": {
            "AWS_ACCESS_KEY_ID": "*****",
            "AWS_SECRET_ACCESS_KEY": "*****"
        }
    }
  6. Run the script and pass in the script_config file that is required: transparency-venv/bin/python transparencyscript/script.py script_config.json
  7. If using values from local task.json, add a task_json path to the script_config.json, that looks like: "task_json": "/tmp/work/task.json" Then, run the previous command.
  8. If using taskcluster to create task.json, put values in payload of task, then run scriptworker: scriptworker scriptworker.yaml
  9. For testing: pip install pytest and py.test transparencyscript/test/test_utils.py
  10. To create a source distribution: python setup.py sdist

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%