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"
    }

    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 stop stratum_bfrt && sudo pkill stratum" || true
                        scp ./ptf/tests/linerate/chassis_config.pb.txt ${SWITCH_SSH}:/home/jenkins/
                        ssh ${SWITCH_SSH} "DOCKER_IMAGE_TAGGED=$STRATUM_DOCKER_IMG SDE_VERSION=$SDE_VERSION CHASSIS_CONFIG=${CHASSIS_CONFIG} \
                            ./start-stratum-container.sh -external_stratum_urls=0.0.0.0:${STRATUM_PORT}"
                    '''
                    sh "until nc -z ${params.SWITCH_IP} ${STRATUM_PORT}; do sleep 1; done"
                }
            }
        }
        stage('Run fabric-tna tests') {
            options { retry(3) }
            steps {
                script {
                    withDockerRegistry([url: "https://registry.opennetworking.org", credentialsId: "onf-registry-credentials"]) {
                        sh returnStdout: false, label: "Build fabric-tna and run linerate tests", script: """
                            PROFILE=${params.PROFILE} SWITCH_ADDR=${SWITCH_ADDR} bash .jenkins/linerate.sh
                        """
                    }
                }
            }
        }
    }
    post {
        always {
            sshagent(credentials: ['menlo-pdp-32qs-jenkins']) {
                sh returnStdout: false, label: "Stop Stratum", script: """
                    ssh ${SWITCH_SSH} "docker stop stratum_bfrt && sudo pkill stratum" || true
                """
            }
            archiveArtifacts(artifacts: 'logs/**/**', allowEmptyArchive: true, excludes: 'logs/**/int-traffic-trace-*.pcap')
        }
    }
}
