Skip to content

azureaws/Jenkins-Spring

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jenkins-Spring


Deploying a dockerized Spring-boot application with Heroku CLI, Maven CLI, Docker CLI and Jenkins


Login to heroku container registry
$ heroku container:login
Create a new registry application:
  • NB: You need to link this new application to the github repository housing your Spring-boot application, do this manually via the heroku dashboard: heroku-app-dashboard > Deploy > Deployment method
$ heroku create
Create an image of the registry application (locally):
$ heroku container:push web --app <generated-app-name>
$ heroku container:release web --app <generated-app-name>
Push the created image to dockerhub
$ docker login
$ docker tag <imageID> <DockerhubUsername>/<DockerhubRepoName>:<ImageTag>
$ docker push <DockerhubUsername>/<DockerhubRepoName>
The image will then be pulled from dockerhub, built and run by Jenkins:
Jenkinsfile:
pipeline {
    agent any
    
    stages {
        .....
        
        stage('D E P L O Y') {
            steps {
                sh 'make docker-pull-run'
            }
        }
    }
    
    ...
}
makefile:
....

docker-pull-run:
	docker run --rm -p 5850:9090 countach/springboot-docker-jenkins:jenky
	
  ...


Imgur

About

Deploying a containerized Spring-boot application with Jenkins

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 52.6%
  • Dockerfile 37.3%
  • Makefile 10.1%