- job:
    name: jdk11-generate-email-report
    project-type: freestyle
    defaults: global
    description: |
        This job aggregates the results from various jobs:<br>
        <br>
            * jcstress<br>
            * jtreg<br>
            * terasort<br>
            * specjbb<br>
        <br>
        in text form suitable for the aarch64-port-dev mailing list.
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            openjdk-members:
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 30
            num-to-keep: 10
            artifact-num-to-keep: 5
    parameters:
        - string:
            name: ZERO_BASELINE
            default: '14115'
        - string:
            name: SERVER_MAX_JOPS_BASELINE
            default: '4090'
        - string:
            name: SERVER_CRITICAL_JOPS_BASELINE
            default: '1015'
    disabled: true
    node: j12-qrep-01
    display-name: 'DELETE ME'
    wrappers:
        - timestamps
# Replaced by parameters
#        - inject:
#            properties-file: '${HOME}/performance-baseline.properties'
    builders:
        - copyartifact:
            project: jtreg-build
            filter: 'jtreg-build-4.2.0-SNAPSHOT.tar.xz'
            target: incoming
            flatten: true
        - shell: |
            #!/bin/bash

            tar xf incoming/jtreg-build-4.2.0-SNAPSHOT.tar.xz
            PATH=${WORKSPACE}/jtreg/bin:${PATH}
            PERSIST=$HOME/srv/openjdk11u
            export SPECJBB_PRODUCT_HOME=$PERSIST/SPECjbb2015
            export JDK_VERSION=11u
            which jtdiff

            TOP_DIR=${PERSIST}/openjdk-jtreg-nightly-tests ${PERSIST}/openjdk-test-scripts/openjdk-test-summary release > ${WORKSPACE}/report.txt
            echo "" >> ${WORKSPACE}/report.txt

            TOP_DIR=${PERSIST} ${PERSIST}/specjbb-test-scripts/specjbb-report >> ${WORKSPACE}/report.txt
            echo "" >> ${WORKSPACE}/report.txt

            BENCHMARK_RESULTS_DIR=$PERSIST/hadoop-terasort-benchmark-results ${PERSIST}/hadoop-test-scripts/benchmark-terasort-report >> ${WORKSPACE}/report.txt
            echo "" >> ${WORKSPACE}/report.txt

            TOP_DIR=${PERSIST} ${PERSIST}/jcstress-test-scripts/jcstress-report --url http://openjdk.linaro.org/jdk${JDK_VERSION}/ >> ${WORKSPACE}/report.txt
    publishers:
        - archive:
            artifacts: 'report.txt'
        - email:
            recipients: 'fathi.boudra@linaro.org'
