Skip to content

Jenkins Slave image with JDK8, Maven and M2 Settings to connect to nexus

Notifications You must be signed in to change notification settings

sergief/java-jenkins-slave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Docker Java Jenkins slave

This project contains a Jenkins Slave Docker image that has all the build tools needed for creating Java applications built using Maven and Git as source code repository. It also contains a settings.xml file prepared for deploying and retrieving artifacts to/from Nexus.

Tested using the Jenkins Kubernetes Plugin.

How to use it

You can download the docker image from Docker Hub using the following command:

docker pull sergief/java-jenkins-slave:latest

The following environment variables need to be set in order to properly use Nexus:

  • M2_MIRROR_CENTRAL: The URL for the mirrored maven central repository, like http://nexus.test:8081/repository/maven-public
  • M2_CREDENTIALS_USR: The username used for authenticating to Nexus.
  • M2_CREDENTIALS_PSW: The password used for authenticating to Nexus.

Build your custom image

You can build your custom image and override the following ENV variables from the dockerfile:

  • NEXUS_USERNAME
  • NEXUS_PASSWORD
  • NEXUS_MAVEN_PUBLIC_URL

About

Jenkins Slave image with JDK8, Maven and M2 Settings to connect to nexus

Resources

Stars

Watchers

Forks

Packages

No packages published