Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
.jenkins.yml research and thoughts

.jenkins.yml

Build configuration(s) closer to code; inspired by .travis.yml

  • Default yaml file to define a build that runs make test
  • Preserves No State Between Builds (runs all commands over SSH in isolated virtual machines)
  • The standard Unix exit code of "0" means the build passed; everything else is treated as failure.
  • Specify branches to build (whitelist, blacklist)
  • Secure environment variables (keys, configuration, ...)

(This could dovetail nicely into a combined project (esp. the build matrix and configuration concepts): .ci.yml)

Jenkins management

(Note: this is in the "flavor" of Jenkins+Github APIs, although ostensibly any VCS+hooks should be compatible)

  • Job creation (identified by the existence .jenkins.yml)
  • Hook (github api) integration
    • Push/PR status (see: ghprb)
    • Authorized users/contributors (repo admins/teams)
      • Linking the Jenkins user into the repo processes
    • github-webhook + Git plugin Service configuration
    • Github enterprise custom page link
  • Environment vars (see: Travis CI environment)
  • Notifications (configure existing methods through github API; see: Travis CI notifications)
    • IRC
    • email
    • webhook (ideal for pass = build package/next "build" step)
  • Expose "embeddable" status information from a specific build (see: Embeddable build status) (Note: howto differentiate PR fail vs. master branch fail?)

Jenkins job copy/create/update recipe

(See: Jenkins CLI)

Template .jenkins/jobs/<job name>/config.xml to use with CLI create-job, update-job (, get-job ?)

  • XML template items (per job/repo)
    • description
    • displayName
    • ...GithubProjectProperty:projectUrl
    • scm...GitSCM:url
    • browser...GithubWeb:url
  • Configure Github hooks in Jenkins
    • $JENKINS_URL/ghprbhook
    • $JENKINS_URL/github-webhook

Research

@vassilevsky

This comment has been minimized.

Show comment Hide comment
@vassilevsky

vassilevsky Oct 28, 2014

This is a great idea!

This is a great idea!

@vassilevsky

This comment has been minimized.

Show comment Hide comment
@christianchristensen

This comment has been minimized.

Show comment Hide comment
@christianchristensen

christianchristensen Nov 16, 2014

@vassilevsky Thanks for the xref that looks nice!

@vassilevsky Thanks for the xref that looks nice!

@bersace

This comment has been minimized.

Show comment Hide comment
@bersace

bersace Feb 2, 2017

Hi, did you have a look at https://github.com/novafloss/jenkins-epo ?

bersace commented Feb 2, 2017

Hi, did you have a look at https://github.com/novafloss/jenkins-epo ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment