- job:
    name: armlt-platforms-release
    project-type: freestyle
    defaults: global
    logrotate:
        daysToKeep: 30
        numToKeep: 30
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            everyone-flat:
                - job-read
                - job-extended-read
                - job-build
                - job-cancel
            linaro-landing-team-arm:
                - job-read
                - job-extended-read
                - job-build
                - job-cancel
    disabled: false
    node: docker-xenial-amd64
    display-name: 'ARM LT - Platforms Release Builds for Versatile Express TC2, FVP AEMv8 and Foundation models and Juno ARM Development Platforms '
    scm:
        - git:
            url: https://git.linaro.org/landing-teams/working/arm/build-scripts.git
            refspec: +refs/heads/ci:refs/remotes/origin/ci
            name: origin
            branches:
                - refs/heads/ci
            basedir: build-scripts
            skip-tag: true
            shallow-clone: true
            clean: true
            wipe-workspace: false
    wrappers:
        - timestamps
    parameters:
      - bool:
          name: CURRENT_MONTH
          default: false
          description: "Select if the release is for current month"
      - bool:
          name: PINNED_ACK
          default: false
          description: "Select to build and generate bundles for manifest 'pinned-ack.xml'"
      - bool:
          name: PINNED_LATEST
          default: false
          description: "Select to build and generate bundles for manifest 'pinned-latest.xml'"
      - bool:
          name: PINNED_UEFI
          default: false
          description: "Select to build and generate bundles for manifest 'pinned-uefi.xml'"
      - bool:
          name: PINNED_JUNO
          default: false
          description: "Select to build and generate bundles for manifest 'pinned-juno.xml'"
      - bool:
          name: PINNED_SGI575
          default: false
          description: "Select to build and generate bundles for manifest 'pinned-sgi575.xml'"
      - bool:
          name: PINNED_SGM775
          default: false
          description: "Select to build and generate bundles for manifest 'pinned-sgm775.xml'"
      - bool:
          name: PINNED_SGM775_ANDROID
          default: false
          description: "Select to build and generate bundles for manifest 'pinned-sgm775-android.xml'"
    builders:
        - shell: |
            #!/bin/bash

            sudo apt-get update
            export LC_ALL=C
            sudo apt-get install -y --no-install-recommends python-requests libssl-dev libopts25-dev flex automake pkg-config gettext autopoint

            bash build-scripts/platforms-ci.sh release
        - linaro-publish-token
        - shell: |
            #!/bin/bash
            # Publish to snapshots
            test -d ${HOME}/bin || mkdir ${HOME}/bin
            wget https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py
            time python3 ${HOME}/bin/linaro-cp.py \
              --api_version 3 \
              --link-latest \
              out member-builds/armlt-platforms-release/${BUILD_NUMBER}/
    publishers:
        - email:
            recipients: 'arvind.chauhan@arm.com'
