pipeline {
    agent {
        label "${params.BUILD_NODE}"
    }
    options {
        timeout(time: 60, unit: 'MINUTES')
    }
    environment {
        SWITCH_USER = "jenkins"
        STRATUM_PORT = "${params.STRATUM_PORT}"
        SWITCH_ADDR = "${params.SWITCH_IP}:${STRATUM_PORT}"
        SWITCH_SSH = "${SWITCH_USER}@${params.SWITCH_IP}"
        CHASSIS_CONFIG = "/home/jenkins/chassis_config.pb.txt"
        TREX_DIR = "/srv/trex-core-2.85-scapy-2.4.5/scripts"
        PLATFORM = "x86-64-accton-wedge100bf-32qs-r0"
    }

    stages {
        stage('Start Stratum') {
            steps {
                step([$class: 'WsCleanup'])
                git branch: "${params.GIT_BRANCH}", credentialsId: 'github-onf-bot-ssh-key', url: "${params.GIT_URL}"
                sshagent(credentials: ['menlo-pdp-32qs-jenkins']) {
                    sh returnStdout: false, label: "Start Stratum on ${params.SWITCH_IP}", script: '''
                        . ./.env
                        ssh ${SWITCH_SSH} "docker ps | grep stratum | cut -d' ' -f1 | xargs docker stop; pkill stratum_bf" || true
                        scp ./ptf/tests/linerate/chassis_config.pb.txt ${SWITCH_SSH}:/home/jenkins/
                        ssh ${SWITCH_SSH} "docker pull ${STRATUM_DOCKER_IMG}"
                        ssh ${SWITCH_SSH} "docker run -itd --rm --privileged --name stratum_bfrt \
                            -v /dev:/dev -v /sys:/sys  \
                            -v /lib/modules/4.14.49-OpenNetworkLinux:/lib/modules/4.14.49-OpenNetworkLinux \
                            --env PLATFORM=${PLATFORM} \
                            --network host \
                            -v ${CHASSIS_CONFIG}:/etc/stratum/${PLATFORM}/chassis_config.pb.txt \
                            -v /var/log:/var/log/stratum \
                            ${STRATUM_DOCKER_IMG} \
                            --enable_onlp=false \
                            -bf_switchd_background=false \
                            -external_stratum_urls=0.0.0.0:${STRATUM_PORT} \
                            -incompatible_enable_bfrt_legacy_bytestring_responses \
                            -experimental_enable_p4runtime_translation"
                    '''
                    sh "until nc -z ${params.SWITCH_IP} ${STRATUM_PORT}; do sleep 1; done"
                }
            }
        }
        stage("Build dependencies and fabric-tna") {
            steps {
                withDockerRegistry([url: "https://registry.opennetworking.org", credentialsId: "onf-internal-registry"]) {
                    sh label: "Build dependencies and fabric-tna", script: """
                        make deps
                        make build-tester-img
                        make ${params.PROFILE}
                    """
                }
            }
        }
        stage("Run tests in hw mode") {
            steps {
                script {
                    withDockerRegistry([url: "https://registry.opennetworking.org", credentialsId: "onf-internal-registry"]) {
                        sh returnStdout: false, label: "Run tests in hw mode", script: """
                            PROFILE=${params.PROFILE} SWITCH_ADDR=${SWITCH_ADDR} bash .jenkins/linerate.sh
                        """
                    }
                }
            }
        }
        stage("Run tests in sw mode") {
            steps {
                script {
                    withDockerRegistry([url: "https://registry.opennetworking.org", credentialsId: "onf-internal-registry"]) {
                        sh returnStdout: false, label: "Run tests in sw mode", script: """
                            PROFILE=${params.PROFILE} SWITCH_ADDR=${SWITCH_ADDR} TREX_PARAMS="--trex-sw-mode" bash .jenkins/linerate.sh
                        """
                    }
                }
            }
        }
    }
    post {
        always {
            sshagent(credentials: ['menlo-pdp-32qs-jenkins']) {
                sh returnStdout: false, label: "Stop Stratum", script: """
                    ssh ${SWITCH_SSH} "docker ps | grep stratum | cut -d' ' -f1 | xargs docker stop; pkill stratum_bf" || true
                """
            }
            archiveArtifacts(artifacts: 'logs/**/**', allowEmptyArchive: true, excludes: 'logs/**/int-traffic-trace-*.pcap')
        }
    }
}
