VScode本地进行Jenkinsfile语法验证
VSCode 进行 本地 验证 语法
2023-06-13 09:16:24 时间
background(背景) Pipeline As Code is a core feature of Jenkins2.0. Not only learn the pipeline syntax, we also had to do a local basic syntax check on each Jenkinsfile commit to git repo. Pipeline As Code 是Jenkins的核心特性。我们不仅要学习Pipeline语法,还要对每次提交的Jenkinsfile进行本地基本语法检查。
VScode Plugin 插件
VScode是一款应用广泛且功能强大的开发人员编辑器。我们通常使用VScode来开发Jenkinsfile。对Jenkinsfile进行本地检查,需要安装Jenkins Pipeline Linter Connector
插件。该插件的工作原理是调用远程的Jenkins API /pipeline-model-converter/validate
.
Install Plugin (安装插件)
image.png
Plugin Settings (插件设置)
image.png
This extension contributes the following settings:
- jenkins.pipeline.linter.connector.url: Url of the Jenkins Pipeline Linter.
- jenkins.pipeline.linter.connector.crumbUrl: Url of the Jenkins Crumb Issuer.
- jenkins.pipeline.linter.connector.pass: Jenkins password (can be left blank if you don't want to put your password in your settings).
- jenkins.pipeline.linter.connector.token: Jenkins token (can be left blank if you don't want to put your token in your settings).
- jenkins.pipeline.linter.connector.user: Jenkins username.
- jenkins.pipeline.linter.connector.strictssl: Set to false to allow invalid ssl connections.
Example:
Write Jenkinsfile
run Command Palette
click Validate Jenkinsfile
Get run result:
相关文章
- vscode查看源代码_vscode新建python项目
- pycharm设置项目路径_vscode和pycharm区别
- vscode 快捷键绑定
- vscode-前端插件
- VSCode 使用教程-8.设置代码自动保存
- 【说站】java中如何配置vscode
- vscode 配置C语言编译环境(完美版)_C语言环境安装
- axios 小程序_vscode使用uniapp
- 一定要学会的vsCode格式化整理代码的快捷键,再也不用手动调格式了
- 使用VScode配置Java环境—JDK-17
- vscode常用插件推荐_梅林软件中心 常用插件
- 记录 Vscode 插件
- vscode终端及mobax终端git 代码提代码报Missing or invalid credentials.问题
- 上线3天,下载4万,ChatGPT中文版VSCode插件来了
- 【6】VScode 无法在终端输入问题,提示:无法在只读编辑器中编辑
- vsCode调试quick-cocos2dx
- 使用git命令与vscode从零开始对远程代码仓库进行拉取、提交、合并、推送分支等操作及在项目中的实践
- Win Vscode C++
- VSCode原来也有中文版ChatGPT,神了!
- 教你如何使用VSCode的Remote-SSH远程连接Linux进行远程开发
- 使用vscode远程linux开发的实现