Skip to content

tidharm/spring-petclinic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

766 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring PetClinic Sample Application Build Status

Overview

PetClinic is a Spring Boot application built using Maven and packaged as a Docker image.

Credit

This project is based on the spring-petclinic project by spring-projects.
Please refer to the original repository for more details.

Prerequisites

  • JDK 8
  • Maven 3.6.0 or later
  • Docker 18.0 or later

Building and running PetClinic locally

git clone https://github.com/tidharm/spring-petclinic.git
cd spring-petclinic
mvn clean package dockerfile:build
docker run -d --name petclinic -p 8080:8080 tidharm/spring-petclinic:2.4.5

You can then access petclinic here: http://localhost:8080/

petclinic-screenshot

(Source: spring-projects/spring-petclini)

NOTE: The PetClinic application expects HTTP access over port 8080. The above docker run command shows how to map port 8080 on your host into port 8080 inside the container.
If port 8080 is already taken on your host, you can choose any other port by modifying the -p argument:
docker run -d --name petclinic -p 9999:8080 tidharm/spring-petclinic:2.4.5

Building and running PetClinic using Jenkins

  1. Create a new Jenkins pipeline
  2. In the General section, check GitHub project and specify the Project url https://github.com/tidharm/spring-petclinic.git/
  3. Optional: In the Build Triggers section, check GitHub hook trigger for GITScm polling to trigger the build on every push.
  4. In the Pipeline section:
    1. Click the Definition dropdown box and select Pipeline script from SCM
    2. Click the SCM dropdown box and select Git
    3. Under Repositories, enter the Repository URL https://github.com/tidharm/spring-petclinic.git
    4. Under Credentials enter (or add) your GitHub credentials set
    5. Under Branches to build, enter the BRanch Specifier */main
    6. Under Script Path, enter Jenkinsfile (the Jenkinsfile is located in the repository root)
  5. Click Save

Accessing the Image's tarball

Depending on your setup, the tidharm/spring-petclinic image will be stored in the root of your Jenkins pipeline workspace.
File naming convention:
Linux: tidharm-spring-petclinic-2.4.5.tar.gz
Windows: tidharm_spring-petclinic_2.4.5.tar.gz

License

The Spring PetClinic sample application is released under version 2.0 of the Apache License.

About

A sample Spring-based application

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 77.8%
  • HTML 14.2%
  • Less 7.9%
  • Dockerfile 0.1%