Skip to content

ssilbory/jekins-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using Jenkins file

This repo contains examples of using Jenkins to build a simple tomcat app in Kubernetes Pod. This is harder than you might initially think as you can't simply run docker in another container.

To use

*To use a jenkins credential for docker repo access you will need to

  • Remove the volume and volume mount section from the pod template.
  • Define a Jenkins Cred for REGISTRY_PASSWORD, and define a variable REGISTRY_USER
  • For Kaniko create a file /kaniko/.docker/config.json with user and password for your docker repo using your docker repo creds. Example '''echo "{"auths":{"$REGISTRY":{"username":"${REGISTRY_USER}","password":"${REGISTRY_PASSWORD}"}}}" > /kaniko/.docker/config.json'''
  • For Img create /root/.docker/config.json as above or run "img login -u $REGISTRY_USER -p REGISTRY_PASSWORD $REGISTRY"

Sample Jenkinsfiles

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 86.3%
  • Java 13.7%