1 Star 1 Fork 2

FenG_Vnc/share-library

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Jenkinsfile 1.47 KB
一键复制 编辑 原始数据 按行查看 历史
FenG_Vnc 提交于 2022-01-18 20:59 . v3
#!groovy
// library identifier: 'share-library@master', retriever: modernSCM([
// $class: 'GitSCMSource',
// remote: 'https://gitee.com/tooop/share-library.git',
// traits: [[$class: 'jenkins.plugins.git.traits.BranchDiscoveryTrait']]
// ])
@Library('share-library@dev')_
// package load
// def tools = new io.devops.tools()
def dynamic_params = new io.devops.params()
def git = new io.devops.git()
def build = new io.devops.build()
def Test = new io.devops.unit()
def Deploy = new io.devops.deploy()
//properties
dynamic_params.init()
//Globl
String srcUrl = env.srcUrl
String appName = env.appName
String branchName = env.branchName
String buildType = env.buildType
//registry
String registry = "docker.io"
String namespace = "feeeng"
pipeline {
agent {
node {
label 'maven'
}
}
stages {
stage('checkout') {
steps {
script {
git.getCode("${srcUrl}", "${branchName}")
}
}
}
stage('unit test') {
steps {
script {
Test.main()
}
}
}
stage('build && push') {
steps {
script {
build.main("${buildType}", "${appName}")
}
}
}
stage('deploy app'){
steps {
script {
Deploy.main()
}
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Groovy
1
https://gitee.com/tooop/share-library.git
git@gitee.com:tooop/share-library.git
tooop
share-library
share-library
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385