Shared library for creating simpler Jenkinsfiles
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 @
- Checkout a repo
- build a container
- deploy to kubernetes namespace. Expects the repo to have git tags.
example
buildPromptTimeoutDeploy appName: 'k8s-jenkins',
gitProvider: 'github.com',
appRepo: 'microdc',
deployNameSpace: 'jenkins'
Same as buildDeploy except this prompts the user for input when deploying and times out after 60s
- Checkout a repo
- login to aws ecr
- Build the container
- push the container image to ecr
- update kubernetes config with the latest version of the k8s.yaml from the source repo
- 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'