Script to handle triggering Bitrise workflows and pipelines from Taskcluster. It's is aimed to be run with scriptworker (but runs perfectly fine as a standalone script).
First, you need python>=3.9.
# create the virtualenv in ./venv3
virtualenv3 venv3
# activate it
. venv3/bin/activate
git clone https://github.com/mozilla-releng/scriptworker-scripts
cd scriptworker-scripts/bitrisescript
python setup.py developcp examples/config.example.json config.json
# edit it with your favorite text editorThere are many values to edit. Example values should give you a hint about what to provide. If not, please see signingscript's README for more details about allowing URLs, or contact the author for other unclear areas.
If you aren't running through scriptworker, you need to manually create the
directories that work_dir points to. It's better to use new directories for
these rather than cluttering and potentially overwriting an existing directory.
Once you set up scriptworker, work_dir will be regularly wiped and recreated.
cp examples/task.example.json /path/to/work_dir
# edit it with your favorite text editorOrdinarily, scriptworker would get the task definition from TaskCluster, and
write it to a task.json in the work_dir. Since you're initially not going
to run through scriptworker, you need to put this file on disk yourself.
The important entries to edit are in the scopes:
project:releng:bitrise:app:*, tells which Bitrise project should be targeted.project:releng:bitrise:workflow:*, tells which Bitrise workflows should be run.project:releng:bitrise:pipeline:*, tells which Bitrise pipelines should be run.
You're ready to run bitrisescript!
bitrisescript CONFIG_FILEWhere CONFIG_FILE is the config json you created above.
This should download the file(s) specified in the payload and trigger the specified Bitrise workflows and pipelines.
Follow the scriptworker
readme
to set up scriptworker, and use ["path/to/bitrisescript", "path/to/script_config.json"] as your task_script.
work_dir points to the same directories between the
scriptworker config and the bitrisescript config!