Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Jenkins World 2017. Developing Pipeline Libraries Locally

Jenkins World 2017. Developing Pipeline Libraries Locally

Demo: https://github.com/oleg-nenashev/demo-jenkins-config-as-code

If you have ever tried developing Pipeline Libraries, you may have noticed how long it takes to deploy a new version to server to discover just another syntax error. I will show how to edit and test Pipeline libraries locally before committing to the repository (with Configuration-as-Code and Docker).

Oleg Nenashev

August 30, 2017
Tweet

More Decks by Oleg Nenashev

Other Decks in Programming

Transcript

  1. Demo. How to develop your
    Pipeline locally?
    Oleg Nenashev (@oleg_nenashev)
    CloudBees, Inc.
    Jenkins World
    Aug 30, 2017

    View Slide

  2. © 2017 CloudBees, Inc. All Rights Reserved. 2
    #JenkinsWorld
    About me
    @oleg_nenashev
    oleg-nenashev LibreCores
    project
    St. Petersburg
    Polytechnic University
    Jenkins meetups

    View Slide

  3. © 2017 CloudBees, Inc. All Rights Reserved. 3
    #JenkinsWorld
    Oleg’s
    “Hall of
    Shame”(c)
    • Plugins
    • Jenkins Core
    • Remoting
    • Windows
    Service
    Wrapper

    View Slide

  4. © 2017 CloudBees, Inc. All Rights Reserved. 4
    #JenkinsWorld
    TODO: Oil Pipelines Image
    Pipelines?

    View Slide

  5. © 2017 CloudBees, Inc. All Rights Reserved. 5
    #JenkinsWorld
    Pipeline. Dev Tools
    IDE
    Integration
    Unit Test
    Framework
    Static
    Analysis
    Library
    manager
    Debug
    tools
    Documen-
    tation
    Easy script
    deployment
    Freestyle
    => Pipeline
    Converter
    Good
    Not enough
    Missing
    Learn more at the conference!

    View Slide

  6. © 2017 CloudBees, Inc. All Rights Reserved. 6
    #JenkinsWorld
    So, how to develop
    Pipelines then?

    View Slide

  7. © 2017 CloudBees, Inc. All Rights Reserved. 7
    #JenkinsWorld
    Commit => Test =>
    Commit => Test =>
    Commit => Test =>
    ….?

    View Slide

  8. © 2017 CloudBees, Inc. All Rights Reserved. 8
    #JenkinsWorld
    How do I work?
    Intellij IDEA
    Filesystem
    SCM Plugin
    (with patch)
    Available via
    Experimental
    Update Center
    • Syntax file
    • Built-in documentation
    Jenkins Test
    Instance
    Source Code
    (local .git repos)
    • Production
    System Snapshot
    • Custom Pipeline
    Library Settings
    • Repositories for libraries
    • Jenkinsfile repos

    View Slide

  9. © 2017 CloudBees, Inc. All Rights Reserved. 9
    #JenkinsWorld
    https://hub.docker.com/r/onenashev/
    demo-jenkins-config-as-code/

    View Slide

  10. © 2017 CloudBees, Inc. All Rights Reserved. 10
    #JenkinsWorld
    Useful links
    • Demo:
    • https://hub.docker.com/r/onenashev/demo-jenkins-config-as-code/
    • Pipeline Shared Libraries
    • https://jenkins.io/doc/book/pipeline/shared-libraries/
    • Pipeline Autocompletion in Intellij IDEA
    • https://st-g.de/2016/08/jenkins-pipeline-autocompletion-in-intellij
    • Pipeline Unit
    • https://github.com/lesfurets/JenkinsPipelineUnit

    View Slide

  11. © 2017 CloudBees, Inc. All Rights Reserved. 11
    #JenkinsWorld
    Thank you!
    Contacts:
    E-mail: [email protected]
    GitHub: oleg-nenashev
    Twitter: @oleg_nenashev

    View Slide