【发布时间】:2020-07-18 16:35:35
【问题描述】:
我需要实现这个:
pipeline {
agent none
stages {
stage('Build') {
agent {
docker {
image 'python:2-alpine'
}
}
steps {
sh 'python -m py_compile sources/add2vals.py sources/calc.py'
}
}
stage('Test') {
agent {
docker {
image 'qnib/pytest'
}
}
steps {
sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py'
}
post {
always {
junit 'test-reports/results.xml'
}
}
}
}
}
在 nodejs express 项目上并使用 mocha 和 chai 运行单元测试, 这是我的代码:
pipeline {
agent { docker { image 'node:6.3' } }
stages {
stage('build') {
steps {
sh 'npm --version'
}
}
}
}
谁能告诉我应该怎么做?这个例子是用python的,所以我不知道我需要做什么。
【问题讨论】:
标签: node.js express jenkins mocha.js chai