Skip to content

robrodi/JenkinsPipelineGo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JenkinsPipelineGo

Playing with Jenkins Pipelines & Golang

Jenkins Prereqs

  • docker pull jenkins
  • docker run -d -p [your port here]:8080 -v [your host path here]:/var/jenkins_home:z -t jenkins
  • Install Jenkins' go plugin. Manage Jenkins -> Global Tool Configuration -> Add Go -> Name = Go 1.9
  • Warnings plugin
  • Cobertura plugin

Setting up the job

  • Create a new pipeline job
  • Use github to this repo.
  • Pipeline -> Pipeline script from SCM
  • SCM Git, pointed at this repo!
  • Script file should be Jenkinsfile

Pipeline Steps

Creating a Jobs DSL

  • Jobs DSL plugin
  • Authorize Project Plugin [ to prevent script auth pain]
    • Mange Jenkins -> Configure Global Security -> Access Control For Builds -> Run as User who triggered build
  • Groovy Plugin
  • Create a new freeform job.
  • SCM Git, Pointed at this repo
  • Add Build Step -> Process Job DSLs.
  • Look on Filesystem
  • DSL Scripts JobsFile
  • Save
  • Click Authorization on the left nav of the project page
  • Check Configure Build Authorization and Select Run as User who Triggered Build
  • Run it
  • see that a job called PipelineFromDSL was created, run that and hopefully it works and made a beautiful pipeline build!

About

Playing with Jenkins Pipelines & Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published