jenkins pipeline

node('builder-chengdu-arm64-245') {
    
    stage('AT-AMD') {

        deleteDir()

        git credentialsId: '91755e02-e0c9-4507-ab3d-3cbde96f98cf', url: 'git@gitlabcd.uniontech.com:autotest/cd-desktop-app.git'

        sh'''
            user=amd-1  
            ip=10.8.13.34
            work_space=${WORKSPACE}
            romete_project_path=/home/${user}/Documents/cd-desktop-app

            # 删除历史代码
            ssh ${user}@${ip} "rm -rf ${romete_project_path} && mkdir ${romete_project_path}"
            # 发送最新代码到测试机
            scp -r ${work_space}/* ${user}@${ip}:${romete_project_path}/
            # 执行多媒体
            ssh ${user}@${ip} "cd ${romete_project_path}/run/run_1040/media_run/ && python3 camera_run.py"
            # 返回报告
            sleep 5
            scp ${user}@${ip}:${romete_project_path}/report/${user}*.xml ${work_space}/report/allure_result_amd/
        '''

        allure includeProperties: false, jdk: '', results: [[path: 'report/allure_results_amd']]
    }
    
}
上一篇:jenkins pipeline 常用句式


下一篇:Jenkins Pipeline 动态参数传递 Git 分支