Jenkinsfile不能被vscode自动识别的办法

  1. install vscode plugin
    ​You can find the extension from within the VS Code extension browser or at the following url: https://marketplace.visualstudio.com/items?itemName=janjoerke.jenkins-pipeline-linter-connector

  2. rename the filename to ‘Jenkinsfile’ without file extentions
    otherwise, the file name cannot be recognized. if you ‘Validate Jenkinsfile’ at Step3, it will output error as Jenkins Pipeline Linter Url is not defined. . after recognized, the icon at filename ahead would be switch to the red one as below.
    Jenkinsfile不能被vscode自动识别的办法

  3. open the file with vscode, press ‘F1’,choose ’Validate JenkinsFile‘
    Jenkinsfile不能被vscode自动识别的办法