Skip to content

devops-recipes/java_jf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample Java-Tomcat helloworld app!

Demonstrates:

  • Java app running on Apache Tomcat server in Docker container
  • Shippable for CI
  • Maven for unit tests and compilation
  • Pull/deploy Java artifacts to Artifactory instance
  • Push Docker images to Docker Hub
  • Shippable for CD with pipeline configuration to deploy to a Test and Prod cluster

Instructions to run this yourself:

  1. Fork this repo

  2. Create an account on Shippable

  3. Enable your forked repo as a project on Shippable

  4. Create Account Integrations to store your authentication credentials for third party services

  1. Assign the integrations for use by your project for the following:
  • Your GitHub or Bitbucket integration (e.g. ttrahan-gh)
  • Your Docker Hub integration (e.g. ttrahan-dh)
  • Your Amazon ECS integration (e.g. ttrahan-aws)
  • Your Google GKE integration (e.g. ttrahan-gke)
  1. Update the following in shippable.resources.yml
  • Change all integration names to match the integrations you created in 5) above
  • Change all resource locations to match your locations, e.g. change the image resource of type 'image' to point to your Docker Hub repo instead of 'ttrahan/javahelloworld'
  1. Seed your pipeline with your configuration
  • Navigate to your subscription (select from hamburger dropdown menu in upper left)
  • Select the 'SPOG' tab
  • Select the 'Resources' tab and click 'Add Resource'
  • Select your source control integration from the list and complete remaining fields
  • NOTE: upon saving, you should see your pipeline configuration now appear on the SPOG tab
  1. Create an Account Integration to link your CI runs to the image resource in your pipeline
  • Go to Account Integrations (gear icon in upper right)
  • Select Integrations and click Add Integration
  • Select Event Trigger from the dropdown
  • Name your integration (e.g. ttrahan-trigger-javahello-pipeline)
  • Assign the integration to your subscription like in 5) above (e.g. trigger- javahello-pipeline)
  1. Update the .m2/settings.xml file with the URL location of your Artifactory instance

  2. Update the following in shippable.yml

  • The secure variable in shippable.yml with your Artifactory login password using the form ' PASSWORD=yourPassword '
  • The Docker Hub locations in the 'docker tag' and 'docker push' commands
  • The integrationName values under the Integrations section
  1. Now commit a change to the repository
  • Your pipeline should activate and you should be able to see it execute

About

Sample maven build and push to frog

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages