Skip to content

microdc/jenkins-pipeline-shared-libs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jenkins-pipeline-shared-libs

Shared library for creating simpler Jenkinsfiles

Usage

Add the following line to the top of your Jenkinsfile

@Library('github.com/microdc/jenkins-pipeline-shared-libs@master') _

Alternate branchs/tags/commit shas can be specified after the @

Functions


buildDeploy

  1. Checkout a repo
  2. build a container
  3. deploy to kubernetes namespace. Expects the repo to have git tags.

example

buildPromptTimeoutDeploy appName: 'k8s-jenkins',
                         gitProvider: 'github.com',
                         appRepo: 'microdc',
                         deployNameSpace: 'jenkins'

buildPromptTimeoutDeploy

Same as buildDeploy except this prompts the user for input when deploying and times out after 60s


ecrBuildPushDeploy

  1. Checkout a repo
  2. login to aws ecr
  3. Build the container
  4. push the container image to ecr
  5. update kubernetes config with the latest version of the k8s.yaml from the source repo
  6. update the pod image to the current build if we're building master

example

ecrBuildPushDeploy appName: 'someapp',
                   gitProvider: 'bitbucket.org',
                   appRepo: 'myveryownrepo',
                   deployNameSpace: 'apps',
                   ecrRepo: '111111111111.dkr.ecr.eu-west-1.amazonaws.com'

About

Shared library for creating simpler Jenkinsfiles

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages