- job:
    name: tcwg-lnt-run-spec-codesize
    project-type: freestyle
    defaults: global
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            everyone-flat:
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 30
            num-to-keep: 30
    disabled: false
    node: tcwg-jade-03
    display-name: 'TCWG LNT test spec codesize'
    concurrent: false
    parameters:
      - string:
          name: llvm_rev
          default: ''
          description: 'llvm revision'
    triggers:
      - timed: '@daily'
    wrappers:
      - timestamps
      - ssh-agent-credentials:
          # tcwg-buildslave user id
          users:
              - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
    builders:
        - shell: |
            #!/usr/bin/env bash
            set -ex

            [ -d "scripts" ] \
              || git clone https://git.linaro.org/people/antoine.moynault/scripts.git

            (
              cd scripts
              git fetch origin master
              git checkout FETCH_HEAD
            )

            [ -d "jenkins-scripts" ] \
              || git clone https://gitlab.com/LinaroLtd/tcwg/jenkins-scripts.git

            (
              cd jenkins-scripts
              git fetch origin master
              git checkout FETCH_HEAD
            )

            ./jenkins-scripts/docker-run.sh --distro jammy -- ./scripts/lnt-run-spec-codesize.sh
