===================
Scriptworker Readme
===================
.. image:: https://travis-ci.org/mozilla-releng/scriptworker.svg?branch=master
:target: https://travis-ci.org/mozilla-releng/scriptworker
.. image:: https://coveralls.io/repos/github/mozilla-releng/scriptworker/badge.svg?branch=master
:target: https://coveralls.io/github/mozilla-releng/scriptworker?branch=master
.. image:: https://readthedocs.org/projects/scriptworker/badge/?version=latest
:target: http://scriptworker.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
Scriptworker implements the `TaskCluster worker model`_, then launches a pre-defined script.
.. _TaskCluster worker model: https://firefox-ci-tc.services.mozilla.com/docs/reference/platform/queue/worker-interaction
This worker was designed for `Releng processes`_ that need specific, limited, and pre-defined capabilities.
.. _Releng processes: https://bugzilla.mozilla.org/show_bug.cgi?id=1245837
Free software: MPL2 License
-----
Usage
-----
* Create a config file. By default scriptworker will look in ``./scriptworker.yaml``, but this config path can be specified as the first and only commandline argument. There is an `example config file`_, and all config items are specified in `scriptworker.constants.DEFAULT_CONFIG`_.
.. _example config file: https://github.com/mozilla-releng/scriptworker/blob/master/scriptworker.yaml.tmpl
.. _scriptworker.constants.DEFAULT_CONFIG: https://github.com/mozilla-releng/scriptworker/blob/master/src/scriptworker/constants.py
Credentials can live in ``./scriptworker.yaml``, ``./secrets.json``, ``~/.scriptworker``.
* Launch: ``scriptworker [config_path]``
-------
Testing
-------
Without integration tests install tox, then
``NO_CREDENTIALS_TESTS=1 tox -e py36``
Without any tests connecting to the net, then ``NO_TESTS_OVER_WIRE=1 tox -e py36``
With integration tests, first create a client in the Taskcluster UI with the scopes::
queue:cancel-task:test-dummy-scheduler/*
queue:claim-work:test-dummy-provisioner/dummy-worker-*
queue:create-task:lowest:test-dummy-provisioner/dummy-worker-*
queue:define-task:test-dummy-provisioner/dummy-worker-*
queue:get-artifact:SampleArtifacts/_/X.txt
queue:scheduler-id:test-dummy-scheduler
queue:schedule-task:test-dummy-scheduler/*
queue:task-group-id:test-dummy-scheduler/*
queue:worker-id:test-dummy-workers/dummy-worker-*
Then generate a no priviledge personal access token in Github for the scriptworker_github_token (to avoid rate limiting) and create a ``./secrets.json`` or ``~/.scriptworker`` that looks like::
{
"integration_credentials": {
"clientId": "...",
"accessToken": "...",
}
"scriptworker_github_token": "..."
}
then to run all tests: ``tox``
Raw data
{
"_id": null,
"home_page": "https://github.com/mozilla-releng/scriptworker",
"name": "scriptworker",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "Mozilla Release Engineering",
"author_email": "release+python@mozilla.com",
"download_url": "https://files.pythonhosted.org/packages/c0/ab/b64b4e5ae5dc103f2d28e45c82b43283b3178d34cc227012af6c141f7e7a/scriptworker-60.7.0.tar.gz",
"platform": null,
"description": "===================\nScriptworker Readme\n===================\n\n.. image:: https://travis-ci.org/mozilla-releng/scriptworker.svg?branch=master\n :target: https://travis-ci.org/mozilla-releng/scriptworker\n\n.. image:: https://coveralls.io/repos/github/mozilla-releng/scriptworker/badge.svg?branch=master\n :target: https://coveralls.io/github/mozilla-releng/scriptworker?branch=master\n\n.. image:: https://readthedocs.org/projects/scriptworker/badge/?version=latest\n :target: http://scriptworker.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\nScriptworker implements the `TaskCluster worker model`_, then launches a pre-defined script.\n\n.. _TaskCluster worker model: https://firefox-ci-tc.services.mozilla.com/docs/reference/platform/queue/worker-interaction\n\nThis worker was designed for `Releng processes`_ that need specific, limited, and pre-defined capabilities.\n\n.. _Releng processes: https://bugzilla.mozilla.org/show_bug.cgi?id=1245837\n\nFree software: MPL2 License\n\n-----\nUsage\n-----\n* Create a config file. By default scriptworker will look in ``./scriptworker.yaml``, but this config path can be specified as the first and only commandline argument. There is an `example config file`_, and all config items are specified in `scriptworker.constants.DEFAULT_CONFIG`_.\n\n.. _example config file: https://github.com/mozilla-releng/scriptworker/blob/master/scriptworker.yaml.tmpl\n.. _scriptworker.constants.DEFAULT_CONFIG: https://github.com/mozilla-releng/scriptworker/blob/master/src/scriptworker/constants.py\n\nCredentials can live in ``./scriptworker.yaml``, ``./secrets.json``, ``~/.scriptworker``.\n\n* Launch: ``scriptworker [config_path]``\n\n-------\nTesting\n-------\n\nWithout integration tests install tox, then\n\n``NO_CREDENTIALS_TESTS=1 tox -e py36``\n\nWithout any tests connecting to the net, then ``NO_TESTS_OVER_WIRE=1 tox -e py36``\n\nWith integration tests, first create a client in the Taskcluster UI with the scopes::\n\n queue:cancel-task:test-dummy-scheduler/*\n queue:claim-work:test-dummy-provisioner/dummy-worker-*\n queue:create-task:lowest:test-dummy-provisioner/dummy-worker-*\n queue:define-task:test-dummy-provisioner/dummy-worker-*\n queue:get-artifact:SampleArtifacts/_/X.txt\n queue:scheduler-id:test-dummy-scheduler\n queue:schedule-task:test-dummy-scheduler/*\n queue:task-group-id:test-dummy-scheduler/*\n queue:worker-id:test-dummy-workers/dummy-worker-*\n\nThen generate a no priviledge personal access token in Github for the scriptworker_github_token (to avoid rate limiting) and create a ``./secrets.json`` or ``~/.scriptworker`` that looks like::\n\n {\n \"integration_credentials\": {\n \"clientId\": \"...\",\n \"accessToken\": \"...\",\n }\n \"scriptworker_github_token\": \"...\"\n }\n\n\nthen to run all tests: ``tox``\n",
"bugtrack_url": null,
"license": "MPL 2.0",
"summary": "TaskCluster Script Worker",
"version": "60.7.0",
"project_urls": {
"Homepage": "https://github.com/mozilla-releng/scriptworker"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "803f69431a794fd925ca3e60c8c647df6d4efda119cd7f20e50d3f30a1be4f2b",
"md5": "1fa56f9393310fe2a4f6a90bfe0d3e16",
"sha256": "9ebbae8c81ad27fa62d5c8f0b8d9b8e8792fee2d2f6b3fb9d711953327c70e4e"
},
"downloads": -1,
"filename": "scriptworker-60.7.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "1fa56f9393310fe2a4f6a90bfe0d3e16",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.7",
"size": 79599,
"upload_time": "2025-01-30T14:15:44",
"upload_time_iso_8601": "2025-01-30T14:15:44.063694Z",
"url": "https://files.pythonhosted.org/packages/80/3f/69431a794fd925ca3e60c8c647df6d4efda119cd7f20e50d3f30a1be4f2b/scriptworker-60.7.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c0abb64b4e5ae5dc103f2d28e45c82b43283b3178d34cc227012af6c141f7e7a",
"md5": "20b7df9ca61c885c09c942c046bcec6b",
"sha256": "a3286420970afbee519dd61c04dab83973483163c987666f239276aa6e823e0c"
},
"downloads": -1,
"filename": "scriptworker-60.7.0.tar.gz",
"has_sig": false,
"md5_digest": "20b7df9ca61c885c09c942c046bcec6b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 101723,
"upload_time": "2025-01-30T14:15:47",
"upload_time_iso_8601": "2025-01-30T14:15:47.119932Z",
"url": "https://files.pythonhosted.org/packages/c0/ab/b64b4e5ae5dc103f2d28e45c82b43283b3178d34cc227012af6c141f7e7a/scriptworker-60.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-30 14:15:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mozilla-releng",
"github_project": "scriptworker",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "aiohttp",
"specs": [
[
">=",
"3"
]
]
},
{
"name": "aiomemoizettl",
"specs": []
},
{
"name": "arrow",
"specs": [
[
">=",
"1.0"
]
]
},
{
"name": "cryptography",
"specs": [
[
">=",
"2.6.1"
]
]
},
{
"name": "dictdiffer",
"specs": []
},
{
"name": "github3.py",
"specs": []
},
{
"name": "immutabledict",
"specs": [
[
">=",
"1.3.0"
]
]
},
{
"name": "jsonschema",
"specs": []
},
{
"name": "json-e",
"specs": [
[
">=",
"2.5.0"
]
]
},
{
"name": "PyYAML",
"specs": []
},
{
"name": "taskcluster",
"specs": [
[
">=",
"40"
]
]
},
{
"name": "taskcluster-taskgraph",
"specs": []
}
],
"tox": true,
"lcname": "scriptworker"
}