亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

為什么 .settings 文件丟失

為什么 .settings 文件丟失

滄海一幻覺 2023-09-06 14:52:01
我無法在 Maven 中構建存儲。設置文件丟失。jenkinsfile中有這樣的代碼。如果它不在存儲庫本身中,它如何引用?幫助我理解    stages {        stage("Copying credentials files") {            steps {                withCredentials([file(credentialsId: 'settings.xml', variable: 'SETTINGS'), file(credentialsId: 'settings-security.xml', variable: 'SETTINGS_SECURITY')]) {                    bat '''COPY %SETTINGS% %WORKSPACE%'''                    bat '''COPY %SETTINGS_SECURITY% %WORKSPACE%'''                }            }        }        stage("Test") {            steps {                script {                    try {                        bat "mvn clean install -s settings.xml -Dsettings.security=settings-security.xml -DTagConfigFile=${configFile} -DTAGS=${tags}"                    } catch (err) {                        currentBuild.result = 'FAILURE'                        throw err                    } finally {                        stage("Allure report") {                            allure([                                    commandline      : '2.8.0',                                    includeProperties: false,                                    jdk              : '',                                    properties       : [],                                    reportBuildPolicy: 'ALWAYS',                                    report           : 'target/allure-report',                                    results          : [[path: 'target/allure-results']]                            ])                        }                    }                }            }        }    }}
查看完整描述

1 回答

?
長風秋雁

TA貢獻1757條經驗 獲得超7個贊

jenkinsfile 與此無關。原來,settings.xml被另一個程序員錯誤地從項目中刪除了。添加就解決了問題



查看完整回答
反對 回復 2023-09-06
  • 1 回答
  • 0 關注
  • 100 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號