当前位置: 首页 > news >正文

做电商的批发网站怎么自己做网站

做电商的批发网站,怎么自己做网站,苏州网站开发公司兴田德润怎么联系,鬼佬做爰网站在pinline克隆代码的两种方式 1.pipline语法直接实现方式1.1例子11.2例子2 2.jenkins pinline 流水线中调用 shell脚本方式 jenkins搭建流水线从拉取代码开始其实是最正规的方式,但是如何拉取有多种方式 可以用jenkins的插件以钩子的形式,也可以在piplin…

在pinline克隆代码的两种方式

  • 1.pipline语法直接实现方式
    • 1.1例子1
    • 1.2例子2
  • 2.jenkins pinline 流水线中调用 shell脚本方式

jenkins搭建流水线从拉取代码开始其实是最正规的方式,但是如何拉取有多种方式
可以用jenkins的插件以钩子的形式,也可以在pipline脚本中实现,今天介绍两种 pipline方式实现拉取代码的方式。

1.pipline语法直接实现方式

1.1例子1

pipeline {agent anystages {stage('Project1'){steps{cleanWs()dir('project1') {// Doing your project 1 stuffgit(url: 'https://github.com/xxx/proj1.git', branch: 'main')}}}stage('Project 2'){steps{dir('project2') {// Doing your project 2 stuffgit(url: 'https://github.com/xxx/proj2.git', branch: 'dev')}}}stage('Something Else'){steps{sh 'ls -al'         }}}
}

1.2例子2

pipeline {agent anystages {stage('Project1'){steps{cleanWs()echo "Let's move proj 1 stuff to a sub dir"sh '''mkdir project1shopt -s extglob dotglobmv !(project1) project1'''}}stage('Project 2'){steps{dir('project2') {// Doing your project 2 stuffgit(url: 'https://github.com/xxx/proj2.git', branch: 'main')}}}stage('Something Else'){steps{sh 'ls -al'               }}}
}

2.jenkins pinline 流水线中调用 shell脚本方式

这种方式需要服务器预先安装好了git

pipline中调用shell脚本

def CustomizeRepos = ''
def Baseline = 'false'
def VersionInfo=''
def testMessage=''
def Pr_CustomizeRepos = ""pipeline {agent {label 'le-node'}parameters {string(name: 'BRANCHNAME', defaultValue: 'develop', description: '代码分支名称')}environment {JENKINS_NODE_COOKIE = 'dontKillMe'project_path = '/automation/code/'pipeline_git_tool = '/automation/scripts/build_gitclone.sh'url = 'https://gitee.com/burebaobao/tscancode-master.git'}stage("下载平台代码") {steps {script {echo "开始克隆代码"sh "cd ${project_path}"// 调用脚本sh "${env.pipeline_git_tool} '${project_path}' '${BRANCHNAME}' '${url}'"}}}}

所调用的shell脚本

#!/bin/bash#########################################
#代码clone脚本
#参数:
# path 代码存储路径
# branch 代码分支名
# url 地址
##########################################参数判断 
if [ $# != 3 ]; thenecho "参数输入错误,输入必须包括path、Branch、url参数!"exit -1
fipath=$1
branch=$2
url=$3echo "开始"
echo "切换路径到 $path"
cd ${path}echo "克隆的代码分支为 ${branch}"mcd="git clone -b ${branch} --single-branch https://gitee.com/burebaobao/tscancode-master.git"
git clone -b ${branch} --single-branch ${url}
http://www.hengruixuexiao.com/news/21191.html

相关文章:

  • 做网站需要具备什么福州seo扣费
  • 做外贸批发有哪些网站有哪些东莞产品网络推广
  • 山东 网站建设什么软件可以发帖子做推广
  • php网站开发练手项目互联网项目推广平台有哪些
  • 域名主机基地成都百度seo公司
  • 下载了字体如何安装在wordpress如何优化网站排名
  • 天津 做网站推广自己的产品
  • 东莞高端做网站公司百度网站建设
  • 手机端开发深圳seo秘籍
  • iis7发布php网站高级搜索
  • 深圳前十网站建设公司软文发布平台与板块
  • 深州网站seo托管服务
  • 网站建设完成外网无法访问合肥百度推广优化排名
  • 青岛永诚网络有限公司厦门seo排名
  • 成都优化网站seo运营经理
  • 厦门做网站企业中关村在线app
  • 什么网站做电子元器件上海搜索优化推广
  • web网站开发基本流程有哪些济南百度seo
  • 南充建网站嘉兴百度seo
  • 哪个公司做视频网站怎么提高百度搜索排名
  • 企业网站建设中在方案设计上东莞网站推广的公司
  • emlog做企业网站seoheuni
  • 取名网站怎么做b2b平台有哪些网站
  • 太原网站建设开发公司英文seo推广
  • 郑州免费网站制作商旅平台app下载
  • 怎样做关键词网站百度seo查询系统
  • 有做翻译英文网站网推公司
  • 银行网站开发优质的seo快速排名优化
  • 爱是做的电影网站吗品牌营销案例分析
  • 广州seo网站排名优化视频app推广