当前位置:网站首页>持续交付(二)PipeLine基本使用
持续交付(二)PipeLine基本使用
2022-08-04 12:27:00 【M1kasal】
前言
本章主要讲述:pipeline的基本使用
- 在持续交付中:我们通常用Pipeline命令来实现
那本章我主要讲述两种pipeline方法
1、任务中直接编写pipeline命令
2、从github中读取pipeline代码,再运行任务
一、Jenkins Pipeline 简要介绍
Jenkins Pipeline : 是借用Unix中Pipeline思路,一种高内聚低耦合的工具,Jenkins 2.0 以上才会有,实际运行中,我们都是用解释性代码Jenkinsfile来描述
- 关于Jenkinsfile的语法我们下一篇blog再写,这篇blog我主要讲下pipeline运行的两种方法
Jenkinsfile使用方法有两种:
- 1、Jenkins任务配置页面直接输入
- 2、代码发布到git后,从git上面拉下来
Jenkinsfile语法:
- 1、Declarative pipeline
- 2、Scripts pipeline
二、Jenkins任务配置添加Pipeline script


pipeline {
agent any
stages {
stage('begin') {
steps {
echo 'Hello mikasa'
}
}
}
post {
always{
echo 'good bye mikasa'
}
}
}



三、拉取pipeline代码,执行任务
- 简单来说:就是将pipeline的代码放入到git源码库进行管理,配置的时候选择Pipeline script from SCM,然后添加git源码地址即可
- 我的github源码地址:https://github.com/Burden1/Mikasa_pipeline_demo





边栏推荐
- How to develop small program plug-ins to achieve profitability?
- ShanDong Multi-University Training #4 A、B、C、G
- String is a reference type
- Focus!2022 interview must brush 461 interview questions summary + interview + resume template
- Nacos手摸手教学【二】Nacos注册中心
- 微信服务号调用API实现微信报警
- Cool and efficient data visualization big screen, it's really not that difficult to do!丨Geek Planet
- MySQL - Explain explanation
- Cache character stream
- break与continue超详解!!!
猜你喜欢
随机推荐
“蔚来杯“2022牛客暑期多校训练营4 N
《独行月球》猛药,治不了开心麻花内耗
Focus!2022 interview must brush 461 interview questions summary + interview + resume template
String is a reference type
划重点!2022面试必刷461道大厂架构面试真题汇总+面经+简历模板
Redis (1) installation and configuration
yolo系列的Neck模块
云原生Devops 的实现方法
DC-DC电源中前馈电容的选择
基于BiLSTM的回归预测方法
新消费、出海、大健康......电子烟寻找“避风港”
常用代码模板1——基础语法
大神们都在用的神器,你和大神只差一个它!!
【微信小程序】信息管理与信息系统专业社会实习制作项目--垃圾指纹
Shell loop statement (for, while, until)
十一、网络规划设计
考研概率论与数理统计(知识点梳理)
String是引用类型
ShanDong Multi-University Training #4 A、B、C、G
接入华为游戏防沉迷,点击防沉迷弹窗后游戏闪退








