Skip to content

rainleon/jenkins-pipeline-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jenkins-pipeline-library

jenkins pipeline shared-libraries

使用说明

用来维护pileline的公共lib库,复用基础的部署代码.

  1. 加载全局pipeline库

     library identifier: 'jenkins-pipeline-library@master',
     retriever: modernSCM([$class: 'GitSCMSource', remote: "ssh://git@xxxxxxx/infra/jenkins-pipeline-library.git",
                           credentialsId: "ssh_key_name"])
    
  2. 使用相关Util方法

     //获取指定目录下的项目列表
     Utilities.getProjectList("${workspace}")
     //构建输入表单
     Utilities.getInputParam(project, Config.DEF_PROJEVT_VERSION, "$JOB_BASE_NAME", getEnv("$JOB_NAME",Config.DEF_ENV))
     //下载项目
     DeployUtil.downloadArtifact(paramMap, "${workspace}/${paramMap.PROJECT}")
     //生成发布任务
     Utilities.generateBranch(paramMap, ipNode)
    

相关文档

参考资料

About

jenkins pipeline library CD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages