### Setup and Installation for githubscript Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/githubscript/README.md Commands to create a virtual environment, clone the repository, and install the package in development mode. Requires Python 3.11.0 or higher. ```bash virtualenv3 venv3 . venv3/bin/activate git clone https://github.com/mozilla-releng/scriptworker-scripts cd scriptworker-scripts/githubscript python setup.py develop ``` -------------------------------- ### Configuration File Setup (Shell) Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/bitrisescript/README.md This command copies an example configuration file to 'config.json', which then needs to be edited with specific values. Further details on configuration options can be found in the signing script's README. ```shell cp examples/config.example.json config.json # edit it with your favorite text editor ``` -------------------------------- ### Setup and Installation (Shell) Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/bitrisescript/README.md This snippet outlines the steps to set up a Python virtual environment, clone the scriptworker-scripts repository, navigate to the bitrisescript directory, and install the script in development mode. It requires Python 3.9 or higher. ```shell # 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 develop ``` -------------------------------- ### Setup Python 3 Virtual Environment Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/beetmoverscript/README.md Shell commands to create a virtual environment and install the scriptworker repository in development mode. ```bash mkvirtualenv --python=/usr/local/bin/python3 beetmoverscript git clone https://github.com/mozilla-releng/scriptworker.git cd scriptworker python setup.py develop ``` -------------------------------- ### Local Development Setup for Beetmoverworker Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/beetmoverscript/README.md Step-by-step guide to setting up the beetmoverworker locally. This involves creating directories, cloning the repository, and creating necessary configuration files like worker_config.json, script_config.json, and task.json. ```shell mkdir -p /app/beetmoverworker cd /app/beetmoverworker mkdir artifact_dir log_dir work_dir # create worker_config.json. see https://github.com/mozilla-releng/scriptworker/blob/master/README.rst touch worker_config.json # see below for example git clone https://github.com/lundjordan/beetmoverscript.git # create beetmoverscript config cp beetmoverscript/config_example.json beetmoverscript/script_config.json # see below for example # For running outside of scriptworker, i.e. just the beetmover script itself, create a fake task.json. # If running with scriptworker either task-creator or scheduled in `mach taskgraph`, scriptworker will download this for you # automatically once it picks up the respective task from tc queue touch work_dir/task.json # see below for example ``` -------------------------------- ### Task Definition File Setup (Shell) Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/bitrisescript/README.md This command copies an example task definition file to a specified work directory. This file, 'task.json', needs to be edited with relevant Bitrise project, workflow, and pipeline scopes. This step is necessary when not running through scriptworker. ```shell cp examples/task.example.json /path/to/work_dir # edit it with your favorite text editor ``` -------------------------------- ### Configuration and Task Initialization Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/githubscript/README.md Commands to initialize the configuration and task definition files from provided examples. These files must be manually populated with project-specific details if not running via scriptworker. ```bash cp examples/config.example.json config.json cp examples/task.example.json /path/to/work_dir ``` -------------------------------- ### Install Virtualenv and Dependencies Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/docs/scriptworkers-local.md This snippet details the steps to create a Python virtual environment and install scriptworker-scripts dependencies. It covers installing `scriptworker_client`, `mozbuild`, and the target script itself using `setup.py develop`. ```bash # Create and activate virtualenv pyenv virtualenv NAME pyenv activate NAME # Install scriptworker_client if present cd scriptworker_client && python setup.py develop && cd .. # Install mozbuild if present cd vendored/mozbuild && python setup.py develop && cd ../.. # Install the target script cd SCRIPTNAME && python setup.py develop && cd .. ``` -------------------------------- ### Configure Python Environment and Install iscript Source: https://github.com/mozilla-releng/scriptworker-scripts/wiki/Testing-iscript Steps to switch to the cltbld user, activate the virtual environment, and install a specific branch of iscript from a Git repository. ```bash sudo -u cltbld -i cd /builds/scriptworker . virtualenv/bin/activate pip uninstall iscript pip install git+https://github.com//scriptworker-scripts.git@#subdirectory=iscript ``` -------------------------------- ### Install Beetmoverworker Script Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/beetmoverscript/README.md Installs the beetmoverscript module and its dependencies. This is a prerequisite for using the scriptworker scripts. ```bash cd /app/beetmoverworker/beetmoverscript python setup.py develop ``` -------------------------------- ### Beetmoverworker Configuration (scriptworker.yaml) Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/beetmoverscript/README.md Example configuration file for the beetmoverworker using YAML format. It specifies provisioner details, worker group and type, credentials, timeouts, script paths, directory locations, and chain-of-trust settings. ```yaml provisioner_id: test-dummy-provisioner worker_group: test-dummy-workers worker_type: dummy-worker-jlund worker_id: dummy-worker-jlund1 credentials: clientId: ... accessToken: ... certificate: ... artifact_expiration_hours: 24 artifact_upload_timeout: 1200 task_max_timeout: 2400 verbose: true task_script: ["/path/to/beetmoverscript_venv/bin/beetmoverscript", "/app/beetmoverworker/beetmoverscript/script_config.json"] log_dir: "/app/beetmoverworker/log_dir" work_dir: "/app/beetmoverworker/work_dir" artifact_dir: "/app/beetmoverworker/artifact" task_log_dir: "/app/beetmoverworker/artifact/public/logs" # chainoftrust config sign_chain_of_trust: true verify_chain_of_trust: true verify_cot_signature: true cot_job_type: beetmover # gpg homedir config ``` -------------------------------- ### Render Resource Timeline with D3.js Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/vendored/mozbuild/mozbuild/resources/html-build-viewer/build_resources.html Renders a timeline visualization of build resource tiers using D3.js. It calculates the width and position of rectangles representing each tier based on their start and end times, aligning them with a resource graph's x-axis scale. Tooltip functionality is included for displaying tier details on hover. ```javascript var width = window.innerWidth - 2 * (marginBodyX + paddingBodyX + marginCardsX + paddingCardsX) - margin.left; var x = d3.scale.linear() .range([0, width]) .domain(d3.extent(resources.resources, function (d) { return d.start; })); svg = d3.select("#" + id).append("svg") .attr("width", width) .attr("height", 100) .append("g"); var y = d3.scale.linear().range([10, 0]).domain([0, 1]); resources.tiers.forEach(function (t, i) { var tier = resources.getTier(t); var x_start = x(tier.start - resources.offset); var x_end = x(tier.end - resources.offset); svg.append("rect") .attr("x", x_start) .attr("y", 20) .attr("height", 30) .attr("width", x_end - x_start) .attr("class", "timeline tier") .attr("tier", t); }); function getEntry(element) { var tier = element.getAttribute("tier"); var entry = resources.getTier(tier); entry.tier = tier; return entry; } d3.selectAll(".timeline") .on("mouseenter", function () { var entry = getEntry(this); d3.select("#tt_tier").html(entry.tier); d3.select("#tt_duration").html(entry.duration || "n/a"); d3.select("#tt_cpu_percent").html(entry.cpu_percent_mean || "n/a"); d3.select("#tooltip").style("display", ""); }) .on("mouseleave", function () { var tooltip = d3.select("#tooltip"); tooltip.style("display", "none"); }) .on("mousemove", function () { var e = d3.event; x_offset = 10; if (e.clientX > window.innerWidth / 2) { x_offset = -150; } d3.select("#tooltip") .style("left", (e.clientX + x_offset) + "px") .style("top", (e.clientY + 10) + "px"); }); ``` -------------------------------- ### Scriptworker Client API Example - Python Source: https://context7.com/mozilla-releng/scriptworker-scripts/llms.txt Demonstrates the basic structure and usage of a scriptworker script using the scriptworker_client library. It shows how to load configuration, validate task schemas, and handle asynchronous task execution. ```python #!/usr/bin/env python """Example scriptworker script using scriptworker_client.""" import logging import os from scriptworker_client.client import sync_main, verify_task_schema, get_task log = logging.getLogger(__name__) async def async_main(config, task): """Main async function that receives config and task. Args: config (dict): Immutable configuration loaded from YAML task (dict): Task definition from Taskcluster """ log.info(f"Processing task for product: {task['payload'].get('product')}") log.info(f"Working directory: {config['work_dir']}") # Access task payload version = task["payload"]["version"] build_number = task["payload"]["build_number"] # Perform script-specific operations await do_work(config, task) log.info("Task completed successfully!") def get_default_config(base_dir=None): """Create default configuration dictionary.""" base_dir = base_dir or os.path.dirname(os.getcwd()) return { "work_dir": os.path.join(base_dir, "work_dir"), "artifact_dir": os.path.join(base_dir, "artifact_dir"), "schema_file": os.path.join(os.path.dirname(__file__), "data", "task_schema.json"), "verbose": True, } def main(config_path=None): """Entry point - loads config from CLI arg or config_path.""" sync_main( async_main, config_path=config_path, default_config=get_default_config(), should_verify_task=True # Validates task against schema_file ) if __name__ == "__main__": main() ``` -------------------------------- ### Signingscript Configuration and Task Examples - Python Source: https://context7.com/mozilla-releng/scriptworker-scripts/llms.txt Illustrates the configuration file (YAML) and task payload (JSON) required for the Signingscript. This script handles code signing for various Mozilla products using services like Autograph and supports multiple signing formats. ```python #!/usr/bin/env python """Signingscript usage example.""" # Configuration file (script_config.yaml) """ work_dir: /app/work artifact_dir: /app/artifacts autograph_configs: /app/secrets/autograph.json apple_notarization_configs: /app/secrets/apple_notarization.json gpg_pubkey: /app/keys/gpg_pubkey.asc widevine_cert: /app/keys/widevine.crt taskcluster_scope_prefixes: - 'project:releng:signing:' """ # Task payload example (task.json) """ { "scopes": ["project:releng:signing:cert:release-signing"], "payload": { "upstreamArtifacts": [ { "taskId": "abc123", "taskType": "build", "paths": ["public/build/firefox-100.0.tar.bz2"], "formats": ["autograph_gpg"] }, { "taskId": "def456", "taskType": "build", "paths": ["public/build/firefox-100.0.exe"], "formats": ["autograph_authenticode_sha2"] } ] } } """ # Run signingscript # signingscript script_config.yaml # Supported signing formats: # - autograph_gpg: GPG detached signatures # - autograph_authenticode_sha2: Windows Authenticode signing # - autograph_widevine: Widevine CDM signing # - apple_notarization: macOS notarization # - apple_notarization_stacked: Batch macOS notarization # - autograph_mar: MAR file signing for updates ``` -------------------------------- ### Configure SSH Connection Caching Source: https://github.com/mozilla-releng/scriptworker-scripts/wiki/mac-maintenance Configures SSH to cache authentication for 10 minutes per host to improve workflow efficiency when accessing multiple Mac signers. ```ssh-config Host dep-mac-v4-signing* adhoc-mac-v4-signing* fx-mac-v4-signing* tb-mac-v4-signing* vpn-mac-v4-signing* ControlMaster auto ControlPath ~/.ssh/ssh-%C ControlPersist 10m ``` -------------------------------- ### Remove Widevine Repository Source: https://github.com/mozilla-releng/scriptworker-scripts/wiki/mac-maintenance Clears the existing Widevine installation directory to allow Puppet to perform a clean reinstallation of the latest version. ```bash # ff-prod or tb-prod rm -rf /usr/local/builds/scriptworker/widevine # dep environments rm -rf /usr/local/builds/{dep1,dep2,tb-dep,etc}/widevine ``` -------------------------------- ### Running Signingscript Command Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/signingscript/README.md This command executes the signingscript with a specified configuration file. It initiates the signing process, including downloading files, obtaining tokens, uploading for signing, and storing signed artifacts. ```bash signingscript CONFIG_FILE ``` -------------------------------- ### Manage LaunchDaemons with launchctl Source: https://github.com/mozilla-releng/scriptworker-scripts/wiki/mac-maintenance Unloads Puppet and Scriptworker LaunchDaemons to prevent automated processes from interfering with manual maintenance tasks. ```bash launchctl unload /Library/LaunchDaemons/com.mozilla.periodic.plist for d in /Library/LaunchDaemons/org.mozilla.scriptworker.*.plist; do launchctl unload "$d"; done ``` -------------------------------- ### Initialize Build Resource Data and UI Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/vendored/mozbuild/mozbuild/resources/html-build-viewer/build_resources.html Initializes the build resource data and updates the user interface. It handles loading data from a JSON file or from a list of files provided via drag-and-drop. If a list of files is present, it populates a dropdown for file selection; otherwise, it directly renders the resource graph. ```javascript function initData(data) { var list = d3.select("#list"); // Clear the list if it wasn't already empty. list.selectAll("*").remove(); list.style("display", "none"); if (!data) { return; } // If the data contains a list of files, use that list. // Otherwise, we expect it's directly resources info data. if (Object.keys(data).length == 1 && "files" in data) { if (data.files.length > 1) { for (file of data.files) { list.append("option").attr("value", file).text(file); } list.style("display", "inline"); } renderKey(data.files[0]); } else { currentResources = new BuildResources(data); updateResourcesGraph(); } } document.addEventListener("DOMContentLoaded", function() { var list = d3.select("#list"); list.on("change", function() { renderKey(this.value); }) d3.json("build_resources.json", function onList(error, response) { initData(response); }); }, false); document.addEventListener("drop", function(event) { event.preventDefault(); var uris = event.dataTransfer.getData("text/uri-list"); if (uris) { var data = { files: uris.split(/\r\n|\r|\n/).filter(uri => !uri.startsWith("#")), }; initData(data); } }, false); document.addEventListener("dragover", function(event) { // prevent default to allow drop event.preventDefault(); }, false); ``` -------------------------------- ### Generate RST Documentation from Markdown Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/addonscript/README.rst Uses Pandoc to convert the master README.md file into README.rst format. This ensures compatibility with PyPI while allowing developers to write in Markdown. ```bash pandoc --from=markdown --to=rst README.md > README.rst ``` -------------------------------- ### Update Scriptworker Python Revisions Source: https://github.com/mozilla-releng/scriptworker-scripts/wiki/mac-maintenance Updates the worker environment to the latest master revision and promotes the changes to the production branch for automatic deployment. ```bash data/update-scriptworker-revisions.py git fetch && git push origin origin/master:macos-signer-latest ``` -------------------------------- ### Running the Bitrise Script (Shell) Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/bitrisescript/README.md This command executes the bitrisescript, taking the path to the configuration file as an argument. The script will download specified files and trigger Bitrise workflows and pipelines based on the configuration. ```shell bitrisescript CONFIG_FILE ``` -------------------------------- ### Parse and Process Build Resource Data Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/vendored/mozbuild/mozbuild/resources/html-build-viewer/build_resources.html The 'BuildResources' constructor parses JSON data containing CPU, I/O, and memory usage samples. It validates the data version, calculates CPU percentages, and filters out unused fields to prepare the data for visualization. ```javascript function BuildResources(data) { if (data.version < 1 || data.version > 3) { throw new Error("Unsupported version of the JSON format: " + data.version); } this.resources = []; var offset = data.start; data.samples.forEach(function (sample) { var entry = { start: sample.start - offset, end: sample.end - offset, duration: sample.duration, cpu_percent: sample.cpu_percent_mean, cpu_times: {}, io: {}, virt: {}, swap: {} }; this.resources.push(entry); }.bind(this)); } ``` -------------------------------- ### Create Test Workdir with scriptworker Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/docs/scriptworkers-local.md This snippet shows how to use the `create_test_workdir` helper tool provided by `scriptworker` to set up a testing environment. It downloads a task definition and its upstream artifacts. ```bash # Get help for the tool create_test_workdir --help # Create workdir for a specific TASK_ID create_test_workdir [--path PATH] [--overwrite] TASK_ID ``` -------------------------------- ### Prepare and Enable Scriptworker for Production Source: https://github.com/mozilla-releng/scriptworker-scripts/wiki/Manual-Rollout-with-Puppet This command sequence prepares the scriptworker environment for production by setting appropriate file permissions for certificates and keys, and then executes the scriptworker enablement script. It assumes the necessary Widevine certificates and signing keychains have already been placed in the certs directory. ```bash chown cltbld /builds/scriptworker/certs/* chmod 400 /builds/scriptworker/certs/* sh -x /builds/scriptworker/enable_scriptworker.sh ``` -------------------------------- ### Executing githubscript Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/githubscript/README.md The command to execute the script manually by providing the path to the configuration file. This triggers the artifact download and GitHub release update process. ```bash githubscript CONFIG_FILE ``` -------------------------------- ### Configuration JSON for Signingscript Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/signingscript/README.md This JSON file configures the signingscript, specifying paths for authentication credentials, working directories, artifact storage, token validity, and logging verbosity. It is essential for setting up the signing environment. ```json { "autograph_configs": "autograph.json", "work_dir": "work", "artifact_dir": "artifact_dir", "token_duration_seconds": 1200, "verbose": true, "gpg_pubkey": "foo" } ``` -------------------------------- ### Apply Puppet Manifests (Old Instructions) Source: https://github.com/mozilla-releng/scriptworker-scripts/wiki/Manual-Rollout-with-Puppet This section provides older instructions for applying puppet manifests directly. It involves navigating to the ronin_puppet directory, pulling the latest changes, and then applying the manifests using the puppet command. It's important to note that running puppet while in the root's home directory can cause issues. ```bash cd ~/ronin_puppet git pull cd / puppet apply --modulepath=/var/root/ronin_puppet/modules/:/var/root/ronin_puppet/r10k_modules/ --hiera_config=/var/root/ronin_puppet/hiera.yaml --logdest=console --noop /var/root/ronin_puppet/manifests ``` -------------------------------- ### Configure Rollout Percentage for Production Channel Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/pushapkscript/README.md This configuration snippet demonstrates how to set the rollout percentage for a production channel in scriptworker tasks. It requires specifying the 'channel' as 'production' and the desired 'rollout_percentage' as an integer. ```json { "channel": "production", "rollout_percentage": 10 } ``` -------------------------------- ### Configure Beetmover Script Settings Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/beetmoverscript/README.md A JSON configuration file defining working directories, artifact processing settings, and action-specific templates for different release channels. ```json { "work_dir": "work_dir", "artifact_dir": "artifact_dir", "verbose": true, "aiohttp_max_connections": 5, "checksums_digests": ["sha512", "sha256"], "actions": { "push-to-nightly": { "firefox_nightly": "/path/to/beetmoverscript/beetmoverscript/templates/firefox_nightly.yml" }, "push-to-candidates": { "firefox_candidates": "/path/to/beetmoverscript/beetmoverscript/templates/firefox_candidates.yml" } } } ``` -------------------------------- ### Directory Structure for Beetmoverworker Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/beetmoverscript/README.md Illustrates the expected directory structure for the beetmoverworker when set up locally for development. This includes artifact, log, and work directories, as well as symlinks to the beetmoverscript repository. ```shell > tree -L 3 /app/beetmoverworker /app/beetmoverworker ├── artifact │ └── public │ └── logs ├── beetmoverscript -> /Users/jlund/devel/mozilla/dirtyRepos/beetmoverscript # path to beetmoverscript repo ├── log_dir │ ├── task_error.log │ ├── task_output.log │ └── worker.log ├── work_dir └── worker_config.json 6 directories, 4 files ``` -------------------------------- ### Download Docker Image Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/docs/scriptworkers-local.md This section explains how to download a Docker image built in Taskcluster for testing. It provides commands for both mozilla-central and standalone taskgraph environments. ```bash # For mozilla-central: ./mach taskgraph load-image # For standalone taskgraph: taskgraph load-image ``` -------------------------------- ### Render Resource D3.js Charts Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/vendored/mozbuild/mozbuild/resources/html-build-viewer/build_resources.html This function renders a stacked area chart for resource metrics. It dynamically calculates dimensions, sets up D3 scales and axes, and creates a legend based on the provided data layers. ```javascript function renderResources(id, resources, height, fields_attr, data_attr, max_value, tick_format, layers) { document.getElementById(id).innerHTML = ""; const margin = {top: 20, right: 20, bottom: 20, left: 50}; const width = window.innerWidth - 2 * (marginBodyX + paddingBodyX + marginCardsX + paddingCardsX) - margin.left; var heightChart = height - margin.top - margin.bottom; var x = d3.scale.linear().range([0, width]).domain(d3.extent(resources.resources, function (d) { return d.start; })); var y = d3.scale.linear().range([heightChart, 0]).domain([0, max_value]); var xAxis = d3.svg.axis().scale(x).orient("bottom"); var yAxis = d3.svg.axis().scale(y).orient("left").tickFormat(tick_format); var area = d3.svg.area().x(function (d) { return x(d.start); }).y0(function(d) { return y(d.y0); }).y1(function(d) { return y(d.y0 + d.y); }); var stack = d3.layout.stack().values(function (d) { return d.values; }); var layers = layers.filter(function (l) { return resources[fields_attr].indexOf(l[0]) != -1; }); // ... SVG and path rendering logic follows } ``` -------------------------------- ### Run iscript Verification Tasks Source: https://github.com/mozilla-releng/scriptworker-scripts/wiki/Testing-iscript Commands to prepare a test work directory using a TaskID and execute the iscript command for validation. ```bash TASK_ID= create_test_workdir --overwrite -- $TASK_ID vi work/task.json iscript script_config.yaml ``` -------------------------------- ### Cleanup Environment After Testing Source: https://github.com/mozilla-releng/scriptworker-scripts/wiki/Testing-iscript Commands to remove temporary test artifacts and restore the system to its original state. ```bash rm -rf work artifacts rm -rf virtualenv sudo /usr/local/bin/run-puppet.sh exit ``` -------------------------------- ### Fetch and Update Resource Data Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/vendored/mozbuild/mozbuild/resources/html-build-viewer/build_resources.html Retrieves JSON resource data from a server using D3.js and initializes the visualization update process. It includes error handling to notify the user if the data source is unreachable. ```javascript function renderKey(key) { d3.json(key, function onResource(error, response) { if (error) { alert("Data not available. Is the server still running?"); return; } currentResources = new BuildResources(response); updateResourcesGraph(); }); } ``` -------------------------------- ### Scriptworker Integration (Shell) Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/bitrisescript/README.md This demonstrates how to configure scriptworker to use the bitrisescript. The 'task_script' parameter in the scriptworker configuration should point to the bitrisescript and its associated configuration file. It's crucial that the 'work_dir' is consistent between both configurations. ```shell ["path/to/bitrisescript", "path/to/script_config.json"] ``` -------------------------------- ### Style Build System Dashboard UI Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/vendored/mozbuild/mozbuild/resources/html-build-viewer/build_resources.html Defines the visual layout, typography, and utility classes for the resource usage dashboard. It uses CSS grid and flexbox to manage chart containers and responsive spacing. ```css svg { overflow: visible; } body { background-color: var(--grey-20); font-family: sans-serif; padding: 30px 80px; display: flex; flex-direction: column; } .dashboard-card { padding: 32px 80px; background-color: var(--white-100); border-radius: 8px; margin: 60px 0; } .grid-list ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: max-content max-content max-content; gap: 15px 4px; } ``` -------------------------------- ### Test Beetmoverworker Scripts with Tox Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/beetmoverscript/README.md Executes tests for the beetmoverscript project using tox. Tox manages virtual environments and runs tests defined in tox.ini. ```bash tox ``` -------------------------------- ### Create script_config.yaml Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/docs/scriptworkers-local.md This snippet demonstrates how to create a `script_config.yaml` file for testing scriptworker scripts. It uses json-e for multiple configurations and requires absolute paths for `work_dir` and `artifact_dir`. ```yaml # Example script_config.yaml work_dir: "$PWD/work" artifact_dir: "$PWD/artifacts" # Other configurations can be added here using json-e syntax ``` -------------------------------- ### Execute Puppet Configuration Source: https://github.com/mozilla-releng/scriptworker-scripts/wiki/Testing-iscript Command to trigger the puppet configuration script on the Mac signer. This ensures the environment matches the specified branch configuration. ```bash sudo /usr/local/bin/run-puppet.sh ``` -------------------------------- ### Run Beetmoverworker Script Without Scriptworker Source: https://github.com/mozilla-releng/scriptworker-scripts/blob/master/beetmoverscript/README.md Activates the virtual environment and runs the beetmoverscript using a specified configuration file. It defaults to using task.json if not otherwise specified. ```bash workon beetmoverscript cd /app/beetmoverworker beetmoverscript beetmoverscript/script_config.json ```