<commit_before>---
metadata:
  name: Funsize
  description: Funsize task graph for nightly builds and L10N repacks
  owner: <EMAIL>
  source: https://github.com/rail/funsize-taskcluster

scopes:
  - queue:*
  - docker-worker:*
  - scheduler:*
  - signing:*
  - docker-worker:feature:balrogVPNProxy

tasks:
  - taskId: '{{ stable_slugId("update_generator_task") }}'
    task:
      created: '{{ now }}'
      deadline: '{{ fromNow("24 hours") }}'
      metadata:
        owner: <EMAIL>
        source: https://github.com/rail/funsize-taskcluster
        name: "[funsize] Update generating task"
        description: |
          This task generates MAR files and publishes unsigned bits.

      workerType: "funsize-mar-generator"
      provisionerId: "aws-provisioner-v1"

      tags:
        createdForUser: <EMAIL>

      payload:
        image: 'rail/funsize-update-generator:v0.1'
        maxRunTime: 900
        command:
            - /runme.sh

        env:
          FROM_MAR: '{{ from_MAR }}'
          TO_MAR: '{{ to_MAR }}'
          PLATFORM: '{{ platform }}'
          LOCALE: '{{ locale }}'

        artifacts:
          'public/env':
            path: /home/worker/artifacts/
            type: directory
            expires: '{{ fromNow("7 days") }}'

  - taskId: '{{ stable_slugId("signing_task") }}'
    requires:
      - '{{ stable_slugId("update_generator_task") }}'
    task:
      created: '{{ now }}'
      deadline: '{{ fromNow("24 hours") }}'
      metadata:
        owner: <EMAIL>
        source: https://github.com/rail/funsize-taskcluster
        name: "[funsize] MAR signing task"
        description: |
          This task signs MAR files and publishes signed bits.

      workerType: "signing-worker-v1"
      provisionerId: "signing-provisioner-v1"
      scopes:
          - signing:cert:dep-signing
          - signing:format:gpg
          - signing:format:mar
      tags:
        createdForUser: <EMAIL>

      payload:
        signingManifest: 'https://queue.taskcluster.net/v1/task/{{ stable_slugId("update_generator_task") }}/artifacts/public/env/manifest.json'

  - taskId: '{{ stable_slugId("balrog_task") }}'
    requires:
      - '{{ stable_slugId("signing_task") }}'
    task:
      created: '{{ now }}'
      deadline: '{{ fromNow("24 hours") }}'
      routes:
        - tc-treeherder-stage.{{ branch }}.{{ revision }}
      extra:
        machine:
          platform: {{ platform }}
        build:
          platform: {{ platform }}
        treeherderEnv:
          - staging
        treeherder:
          symbol: {{ locale }}
          groupSymbol: Upd
          collection:
            opt: true
      metadata:
        owner: <EMAIL>
        source: https://github.com/rail/funsize-taskcluster
        name: "[funsize] Publish to Balrog"
        description: |
          This task publishes signed updates to Balrog.

      workerType: "balrog"
      provisionerId: "aws-provisioner-v1"
      scopes:
        - docker-worker:feature:balrogVPNProxy
      tags:
        createdForUser: <EMAIL>

      payload:
        image: 'rail/funsize-balrog-submitter:v0.7'
        maxRunTime: 600
        command:
            - /runme.sh

        env:
          PARENT_TASK_ARTIFACTS_URL_PREFIX: 'https://queue.taskcluster.net/v1/task/{{ stable_slugId("signing_task") }}/artifacts/public/env'
          BALROG_API_ROOT: 'https://aus4-admin-dev.allizom.org/api'
          S3_BUCKET: {{ s3_bucket }}
        encryptedEnv:
          - {{ encrypt_env_var(stable_slugId("balrog_task"), now_ms,
                               now_ms + 24 * 3600 * 1000, 'BALROG_USERNAME',
                               balrog_username) }}
          - {{ encrypt_env_var(stable_slugId("balrog_task"), now_ms,
                               now_ms + 24 * 3600 * 1000, 'BALROG_PASSWORD',
                               <PASSWORD>) }}
          - {{ encrypt_env_var(stable_slugId("balrog_task"), now_ms,
                               now_ms + 24 * 3600 * 1000, 'AWS_ACCESS_KEY_ID',
                               aws_access_key_id) }}
          - {{ encrypt_env_var(stable_slugId("balrog_task"), now_ms,
                               now_ms + 24 * 3600 * 1000, 'AWS_SECRET_ACCESS_KEY',
                               aws_secret_access_key) }}
        features:
          balrogVPNProxy: true
<commit_msg>Use separate worker type for balrog submission<commit_after>---
metadata:
  name: Funsize
  description: Funsize task graph for nightly builds and L10N repacks
  owner: <EMAIL>
  source: https://github.com/rail/funsize-taskcluster

scopes:
  - queue:*
  - docker-worker:*
  - scheduler:*
  - signing:*
  - docker-worker:feature:balrogVPNProxy

tasks:
  - taskId: '{{ stable_slugId("update_generator_task") }}'
    task:
      created: '{{ now }}'
      deadline: '{{ fromNow("24 hours") }}'
      metadata:
        owner: <EMAIL>
        source: https://github.com/rail/funsize-taskcluster
        name: "[funsize] Update generating task"
        description: |
          This task generates MAR files and publishes unsigned bits.

      workerType: "funsize-mar-generator"
      provisionerId: "aws-provisioner-v1"

      tags:
        createdForUser: <EMAIL>

      payload:
        image: 'rail/funsize-update-generator:v0.1'
        maxRunTime: 900
        command:
            - /runme.sh

        env:
          FROM_MAR: '{{ from_MAR }}'
          TO_MAR: '{{ to_MAR }}'
          PLATFORM: '{{ platform }}'
          LOCALE: '{{ locale }}'

        artifacts:
          'public/env':
            path: /home/worker/artifacts/
            type: directory
            expires: '{{ fromNow("7 days") }}'

  - taskId: '{{ stable_slugId("signing_task") }}'
    requires:
      - '{{ stable_slugId("update_generator_task") }}'
    task:
      created: '{{ now }}'
      deadline: '{{ fromNow("24 hours") }}'
      metadata:
        owner: <EMAIL>
        source: https://github.com/rail/funsize-taskcluster
        name: "[funsize] MAR signing task"
        description: |
          This task signs MAR files and publishes signed bits.

      workerType: "signing-worker-v1"
      provisionerId: "signing-provisioner-v1"
      scopes:
          - signing:cert:dep-signing
          - signing:format:gpg
          - signing:format:mar
      tags:
        createdForUser: <EMAIL>

      payload:
        signingManifest: 'https://queue.taskcluster.net/v1/task/{{ stable_slugId("update_generator_task") }}/artifacts/public/env/manifest.json'

  - taskId: '{{ stable_slugId("balrog_task") }}'
    requires:
      - '{{ stable_slugId("signing_task") }}'
    task:
      created: '{{ now }}'
      deadline: '{{ fromNow("24 hours") }}'
      routes:
        - tc-treeherder-stage.{{ branch }}.{{ revision }}
      extra:
        machine:
          platform: {{ platform }}
        build:
          platform: {{ platform }}
        treeherderEnv:
          - staging
        treeherder:
          symbol: {{ locale }}
          groupSymbol: Upd
          collection:
            opt: true
      metadata:
        owner: <EMAIL>
        source: https://github.com/rail/funsize-taskcluster
        name: "[funsize] Publish to Balrog"
        description: |
          This task publishes signed updates to Balrog.

      workerType: "funsize-balrog"
      provisionerId: "aws-provisioner-v1"
      scopes:
        - docker-worker:feature:balrogVPNProxy
      tags:
        createdForUser: <EMAIL>

      payload:
        image: 'rail/funsize-balrog-submitter:v0.7'
        maxRunTime: 600
        command:
            - /runme.sh

        env:
          PARENT_TASK_ARTIFACTS_URL_PREFIX: 'https://queue.taskcluster.net/v1/task/{{ stable_slugId("signing_task") }}/artifacts/public/env'
          BALROG_API_ROOT: 'https://aus4-admin-dev.allizom.org/api'
          S3_BUCKET: {{ s3_bucket }}
        encryptedEnv:
          - {{ encrypt_env_var(stable_slugId("balrog_task"), now_ms,
                               now_ms + 24 * 3600 * 1000, 'BALROG_USERNAME',
                               balrog_username) }}
          - {{ encrypt_env_var(stable_slugId("balrog_task"), now_ms,
                               now_ms + 24 * 3600 * 1000, 'BALROG_PASSWORD',
                               <PASSWORD>) }}
          - {{ encrypt_env_var(stable_slugId("balrog_task"), now_ms,
                               now_ms + 24 * 3600 * 1000, 'AWS_ACCESS_KEY_ID',
                               aws_access_key_id) }}
          - {{ encrypt_env_var(stable_slugId("balrog_task"), now_ms,
                               now_ms + 24 * 3600 * 1000, 'AWS_SECRET_ACCESS_KEY',
                               aws_secret_access_key) }}
        features:
          balrogVPNProxy: true

{'fraction_non_alphanumeric': 0.12432182846588942, 'fraction_numerical': 0.015698949555581206, 'mean_word_length': 1.8841544607190412, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4860073', 'n_tokens_mistral': 2819, 'n_tokens_neox': 2686, 'n_words': 488}