Skip to content

samsilborydoxo/jekins-example

 
 

Repository files navigation

Using Jenkins file

This repo contains an example of using Jenkins to build a simple tomcat app in Docker.

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%