2 Star 7 Fork 4

devops-ws/learn-pipeline-java

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Jenkinsfile-junit-k8s 875 Bytes
一键复制 编辑 原始数据 按行查看 历史
Zhao Xiaojie 提交于 2019-11-13 14:50 +08:00 . fix the clone
pipeline {
agent {
label 'maven'
}
options {
disableConcurrentBuilds()
}
stages{
stage('Clone'){
steps{
//checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://gitee.com/devops-workspace/learn-pipeline-java']]])
echo "clone demo"
}
}
stage('Build & Test'){
steps{
script{
container('java'){
sh 'mvn test -DSERVER_PORT=1234'
//sh 'mvn test -DSERVER_PORT=2345'
}
}
}
}
stage('Only for demo'){
when {
allOf {
branch 'master'
}
}
steps{
echo 'only for demo'
}
}
}
post{
always{
junit 'target/surefire-reports/**/*.xml'
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Groovy
1
https://gitee.com/devops-workspace/learn-pipeline-java.git
[email protected]:devops-workspace/learn-pipeline-java.git
devops-workspace
learn-pipeline-java
learn-pipeline-java
master

搜索帮助