ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Jenkinsfile

by june07 Win ST2/ST3

Lint Jenkins' Jenkinsfile via SSH

Details

Installs

  • Total 62
  • Win 62
  • OS X 0
  • Linux 0
May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6
Windows 0 1 0 1 3 3 4 5 0 2 1 1 5 3 3 1 0 1 7 5 8 1 1 0 1 1 3 2 3 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
OS X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

sublime-Jenkinsfile

Jenkinsfile is a plugin for Sublime Text.

https://packagecontrol.io/packages/Jenkinsfile

  • Securely (ssh) lint your Jenkinsfile (What is a Jenkinsfile?) inside of Sublime Text
  • Lint against Jenkins cloud instance if ssh access is unavailble on your primary environment
  • Magic

Jenkins includes Pipeline Development Tools as shown on Jenkins.io

Jenkins can validate, or “lint”, a Declarative Pipeline from the command line before actually running it. This can be done using a Jenkins CLI command or by making an HTTP POST request with appropriate parameters. We recommended using the SSH interface to run the linter. See the Jenkins CLI documentation for details on how to properly configure Jenkins for secure command-line access.

Technology

Jenkinsfile uses a number of open source projects to work properly: * Python - a programming language changes the world * SSH - a cryptographic network protocol for operating network services securely over an unsecured network

And of course Jenkinsfile itself is open source with a public Git repository on GitHub.

How to install

With Package Control: 1. First step is done with Package Control or manually - With Package Control Run “Package Control: Install Package” command, find and install Jenkinsfile plugin.

- ***Manually*** *(without Package Control)*:
Clone or download from [git][jenkinsfilegh] into your packages folder (in ST, find Browse Packages… menu item to open this folder).
note: You must clone or download into a directory named "Jenkinsfile" and not sublime-Jenkinsfile.
  1. Restart Sublime Text (if required)

Setup

Currently you must use Pageant (Windows) to create a session that can authenticate via ssh to your Jenkins host. The name of the session must match the configured value of pageant_session (default is “jenkins”) as shown:

Usage

Now whenever you have are editing a Jenkinsfile (must be named as such) and save the file, the plugin will invoke the remote instance of the Jenkins declarative-linter. The file can also be linted without saving by using the keyboard shortcut (cntl-alt-j by default)

Todos

  • Pipeline the whole enchilada (CT/CI/CD)
    • JENKINS!
    • Docker
  • Add support for Linux, OSX
  • Add hosted Jenkins validation

License

MIT

.