/scriptworker

Minimal taskcluster worker for releng-oriented tasks

Primary LanguagePythonMozilla Public License 2.0MPL-2.0

Scriptworker Readme

https://travis-ci.org/mozilla-releng/scriptworker.svg?branch=master https://coveralls.io/repos/github/mozilla-releng/scriptworker/badge.svg?branch=master Documentation Status

Scriptworker implements the TaskCluster worker model, then launches a pre-defined script.

This worker was designed for Releng processes that need specific, limited, and pre-defined capabilities.

Free software: MPL2 License

Usage

Credentials can live in ./scriptworker.yaml, ./secrets.json, ~/.scriptworker, or in environment variables: TASKCLUSTER_ACCESS_TOKEN, TASKCLUSTER_CLIENT_ID, and TASKCLUSTER_CERTIFICATE.

  • Launch: scriptworker [config_path]

Testing

Without integration tests, install tox, then

NO_CREDENTIALS_TESTS=1 tox -e py36

Without any tests connecting ot the net, then

NO_TESTS_OVER_WIRE=1 tox -e py36

With integration tests, first create a client 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 create a ./secrets.json or ~/.scriptworker that looks like:

{
    "integration_credentials": {
        "clientId": "...",
        "accessToken": "...",
        "certificate": "..."
    }
}

(certificate is only specified if using temp creds)

then

tox