1
異なるOSで実行する必要があるコード(実際にはビルド、テスト、パッケージはtox
など)があります。現在、私のJenkinsfile
は、このように次のようになります。Jenkinsfileと複数のノード
pipeline {
// Where to run stuff.
agent {
node {
label 'CentOS7'
customWorkspace '/home/build/jenkins/workspace/pipelines/ook'
}
}
// What to run goes here.
stages {
stage('Tox') {
steps {
sh 'tox -v --recreate'
}
}
}
// Clean up after ourselves.
post {
failure {
mail subject: "\u2639 ${env.JOB_NAME} (${env.BUILD_NUMBER}) has failed",
body: """Build ${env.BUILD_URL} is failing!
Somebody should do something about that\u2026""",
to: "[email protected]",
replyTo: "[email protected]",
from: '[email protected]'
}
}
}
}
真ん中ビット、私は2つの異なるnodes
上で実行したい:OS用OS 1用と2
私はそれをどのように行うのですか?
この場合、 'customWorkspace'をどのように定義すればよいでしょうか? – Sardathrion
また、私はもっと恐ろしい文書を読むべきです(https://jenkins.io/doc/book/pipeline/jenkinsfile/#using-multiple-agents)。☹ – Sardathrion
[Toxはテストの自動化と標準化を目指していますPythonで。 Pythonソフトウェアのパッケージング、テスト、リリースプロセスを容易にする大きなビジョンの一部です。](https://tox.readthedocs.io/en/latest/)。 – Sardathrion