master
Peter Nagy 9 years ago
commit f7210f59f7

1
.gitignore vendored

@ -0,0 +1 @@
target/

@ -0,0 +1 @@
# wercker-springboot

@ -0,0 +1,24 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>bin</id>
<baseDirectory>/</baseDirectory>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<outputDirectory>/</outputDirectory>
<directory>target</directory>
<includes>
<include>*.war</include>
</includes>
</fileSet>
<fileSet>
<outputDirectory>/</outputDirectory>
<directory>src/resources</directory>
<includes>
<include>manifest.json</include>
</includes>
</fileSet>
</fileSets>
</assembly>

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.springboot</groupId>
<artifactId>springbootdemo</artifactId>
<version>0.0.1</version>
<packaging>war</packaging>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.3.RELEASE</version>
<relativePath />
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

@ -0,0 +1,34 @@
package com.example.springboot;
import java.util.Arrays;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
@ComponentScan
@EnableAutoConfiguration
public class DemoApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(DemoApplication.class);
}
public static void main(String[] args) {
ApplicationContext ctx = SpringApplication.run(DemoApplication.class, args);
System.out.println("Beans provided by Spring Boot:");
String[] beanNames = ctx.getBeanDefinitionNames();
Arrays.sort(beanNames);
for (String beanName : beanNames) {
System.out.println(beanName);
}
}
}

@ -0,0 +1,40 @@
package com.example.springboot.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.DispatcherServlet;
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
@ComponentScan
@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {
private static final String[] CLASSPATH_RESOURCE_LOCATIONS = {
"classpath:/META-INF/resources/", "classpath:/resources/",
"classpath:/static/", "classpath:/public/" };
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**").addResourceLocations(CLASSPATH_RESOURCE_LOCATIONS);
}
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/").setViewName("welcome");
registry.addViewController("/env").setViewName("environment");
}
@Bean
public InternalResourceViewResolver viewResolver() {
InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
viewResolver.setPrefix("/WEB-INF/views/");
viewResolver.setSuffix(".jsp");
return viewResolver;
}
}

@ -0,0 +1 @@
#server.contextPath=/springboot

@ -0,0 +1,223 @@
/* This css will be used by cloud website */
body {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 13px;
line-height: 18px;
color: #333333;
margin: 0 auto;
}
header,nav,footer,section {
display: block;
}
p,div,span {
padding: 0;
margin: 0;
}
a {
text-decoration: none;
color: #1466B2;
}
img {
max-width: 100%;
vertical-align: middle;
}
ol,ul {
list-style: none;
margin: 0;
padding: 0;
}
.container {
position: relative;
padding: 0 10px 0 10px;
margin: 0 auto;
/* 960px width with 10px padding on each side = 940px */
width: 940px;
}
.container .columns {
float: left;
display: inline;
/*margin-left: 10px;*/
/*margin-right: 10px;*/
}
.container:after {
content: "\0020";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
/* Header CSS */
header {
/* background: url("../images/header-tile.gif"); */
/* height: 34px; */
/* height is 35px but 1px is the border-bottom = 34px */
height: 34px;
width: 100%;
background-color: #f5f5f5;
border-bottom: 1px solid #ffffff;
box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.1);
/*padding-left: 10px;*/
/*padding-right: 10px;*/
}
header hgroup {
position: relative;
}
header .cloudLogo {
width: 220px;
margin-top: 7px;
}
header .cloudLogo a {
display: inline-block;
}
.navbar-fixed-top {
top: 0px;
left: 0;
margin-bottom: 0;
position: fixed;
right: 0;
z-index: 1030;
}
/* This section is for footer */
footer div.opcGlobalFooter {
position: relative;
bottom: 0;
height: 50px;
/* Height of the footer */
border-top: 1px solid #d9dfe3;
z-index: 1030;
left: 0;
right: 0;
background: #f5f5f5;
}
footer .opcGlobalFooter .footerLeft {
width: 760px;
padding-top: 6px;
}
footer .opcGlobalFooter .footerLeft a:hover {
text-decoration: underline;
}
footer .opcGlobalFooter .footerLeft a:active {
text-decoration: underline;
}
footer .opcGlobalFooter .footerLeft a:visited {
color: #72007c;
}
footer .opcGlobalFooter p {
font-size: 11px;
color: #454545;
}
footer .opcGlobalFooter ul {
padding: 0;
margin: 0;
}
footer .opcGlobalFooter ul li {
font-size: 12px;
display: inline;
border-left: 1px solid #d6dfe6;
padding: 0 10px 0 10px;
}
footer .opcGlobalFooter ul li:first-child {
padding-left: 0;
border-left: none;
}
footer .opcGlobalFooter a {
color: #145c9e;
line-height: 22px;
}
.blueBanner {
/*background: url("../images/banner-tile-100.png");*/
background-image: -moz-linear-gradient(top, #67cbf0, #0572ce);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#67cbf0), to(#0572ce));
background-image: -webkit-linear-gradient(top, #67cbf0, #0572ce);
background-image: -o-linear-gradient(top, #67cbf0, #0572ce);
background-image: linear-gradient(to bottom, #67cbf0, #0572ce);
filter: progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#67cbf0', EndColorStr='#0572ce', GradientType=0);
display: block;
position: fixed;
height: 115px;
top: 34px;
/* height of the header */
left: 0;
right: 0;
z-index: 100;
}
.blueBanner>div.container {
height: 115px;
}
.blueBannerHeading {
float: left;
margin-top: 24px;
}
.blueBannerTitleWithSubtitle {
/*text-shadow: rgba(0,0,0,0.347656) 0px 2px 2px;*/
font-size: 26px;
font-weight: normal;
color: #FFFFFF;
display: inline;
margin: 0px 0px 0px 90px;
padding-bottom: 8px;
line-height: 24px;
}
.blueBannerSubTitle {
/*text-shadow: rgba(0,0,0,0.347656) 0px 2px 2px;*/
font-size: 16px;
font-weight: bold;
color: #FFFFFF;
margin: 0px 0px 0px 90px;
padding-top: 8px;
line-height: 16px;
}
.blueBannerLogo {
width: 80px;
height: 70px;
position: absolute;
}
.blueBannerButton {
float: right;
right: 150px;
position: relative;
top: 29px;
}
.img-center-align {
top: 0;
bottom: 0;
margin: auto;
float: left;
}
.serviceContainer {
margin-top: 30px;
/*margin-bottom: 30px;*/
}

@ -0,0 +1,242 @@
/* The styles most likely to be used are:
- h1, h2, h3, h4: Title, second, third, and fourth-level headings within the body of a topic
- relatedTopics: Related Topics
- procTitle: Within How Do I:... topics, for headings within the body of a topic that are followed by
bulleted procedures ("To do this").
- pre: For code blocks
- langinline: For code fragments within a (non-code) regular section.
- notepara: Notes
*/
h1,
h2,
h3,
h4,
h5,
p {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #000000;
}
.smaller {font-size:80%; margin-top:0px; margin-bottom:5px;}
/* Use h1 for the topic title */
h1 {
font-weight: bold;
font-style: normal;
font-family: Verdana, sans-serif;
font-size: 175%;
background-color: #FFFFFF;
color: #000000;
}
/* Use h2 for all second-level headings. */
h2 {
font-weight: bold;
font-size: 150%;
margin-top: .5em;
margin-bottom: .5em;
}
/* Use h3 for all third-level headings. */
h3 {
font-size: 120%;
margin-top: 1em;
margin-bottom: .6em;
}
/* Use h4 for all fourth-level headings.
Note: this style looks identical to the relatedtopics and proctitle styles. */
h4 {
font-size: 100%;
font-weight: bold;
margin-top: 1em;
margin-bottom: .6em;
}
/* Use h5 for all fifth-level heading.
Currently, there are no h5s in use in the document.*/
h5 {
font-size: 105%;
margin-top: 1em;
margin-bottom: .6em;
}
/* Used for figure captions.*/
p.arttitle {
font-weight: Bold;
}
/* Standard HTML tag. */
body {
padding: 0px 0px 0px 15px;
background: #ffffff;
color: #000000;
font-size: 80%;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
/* Standard HTML tag. */
span.bold {
font-weight: Bold;
}
/* Standard HTML tag. */
blockquote {
margin: 0em 0em 0em 2em;
padding: 0px;
}
/* Use the filepath style to designate file paths. It is currently a monospace file. */
span.filepath {
font: 100% Courier New Courier mono;
font-family: "Courier New", monospace;
}
/* The langinline style, like userinput and filepath, also renders text monospace. Use this
to denote any individual instance of code in the context of non-coded text. For example,
you would use this to denote the name of a class when you're describing it in the paragraph that
precedes a code sample. To denote a code sample, however, use the <pre> tag. */
span.langinline {
font: 100% Courier New Courier mono;
font-family: "Courier New", monospace;
}
/* The notepara style indents your text to the tab stop for note
text. You should always begin Note text with the word "Note:" in
boldface. */
p.notepara {
margin-left: 2em;
margin-right: 2em;
margin-bottom: 1.5em;
}
/* The background of header cells is grey, and the text is bottom-aligned. */
th {
padding-left: 8px;
padding-right: 8px;
background: #cccccc;
text-align: left;
vertical-align: top;
}
/* Standard HTML tags. */
ul,
ol {
font-family: Verdana, Arial, Helvetica, sans-serif;
list-style-position: outside;
list-style-image: none;
margin-top: 0em;
margin-bottom: 0em;
}
/* Standard HTML tag. */
ol {
list-style-type: 1;
margin-left: 1em;
}
/* Standard HTML tag. */
ul {
list-style-type: disc;
margin-left: 1em;
}
/* Standard HTML tag. */
li {
margin-top: .2em;
margin-bottom: .7em;
}
BODY {padding:0; font-family: Tahoma,Arial, Helvetica, sans-serif; font-size: 90%; scrollbar-face-color:#EEEEEE;
scrollbar-base-color:#EEEEEE;
scrollbar-shadow-color:#999999;
scrollbar-highlight-color:#CCCCCC;
scrollbar-3dlight-color:#EEEEEE;
scrollbar-darkshadow-color:#EEEEEE;
scrollbar-arrow-color:#666666;}
A:link, A:active, A:visited {
COLOR: #0000aa;
FONT-FAMILY:Tahoma,Arial,Helvetica,Verdana,sans-serif;
text-decoration:none;
}
A:hover {COLOR: #000000;
FONT-FAMILY:Tahoma,Arial,Helvetica,Verdana,sans-serif;
text-decoration: underline;
background-color: #E7EFFC;}
textarea, select, option {background-color: #E7EFFC;
border: 1px solid #19355E; padding: 4px;}
.textinput{background-color: #E7EFFC; border: 1px solid #19355E; padding: 2px}
.button, .button:ACTIVE {
font-family: Tahoma, Arial, Helvetica, sans-serif;
text-decoration: none;
text-align: center;
color:#000000;
background-color: #8EA8C6;
background-image: url(core/images/button_bg.gif);
background-repeat: repeat-x;
border: 1px solid #4A637B;
background-position: top;
padding: 0px;
margin: 0px;
font-size:75%;
}
.navbutton, navbutton:ACTIVE{
font-family: Tahoma, Arial, Helvetica, sans-serif;
font-size:75%;
text-decoration: none;
text-align: center;
color:#000000;
background-color: #8EA8C6;
background-image: url(../core/images/button_bg.gif);
background-repeat: repeat-x;
border: 1px solid #4A637B;
background-position: top;
padding: 0px;
margin: 0px;
}
.navbutton:HOVER {
font-family: Tahoma, Arial, Helvetica, sans-serif;
text-decoration: none;
text-align: center;
color:#FFffff;
background-color: #19355E;
background-image: url(../core/images/button_bg_hover.gif);
background-repeat: repeat-x;
border: 1px solid #19355E;
background-position: bottom;
margin: 0px;
padding: 0px;
}
.button:HOVER {
font-family: Tahoma, Arial, Helvetica, sans-serif;
text-decoration: none;
text-align: center;
color:#FFFFFF;
background-color: #19355E;
background-image: url(../core/images/button_bg_hover.gif);
background-repeat: repeat-x;
border: 1px solid #19355E;
background-position: bottom;
margin: 0px;
padding: 0px;
}
p {margin-left:10px;}
code{font-family:"Courier New", Courier, mono;font-size:100%;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -0,0 +1 @@
springUrl=Sample resource

@ -0,0 +1,149 @@
<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@page import="java.util.TreeMap"%>
<%@page import="java.util.Collections"%>
<%@page import="java.util.Set"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.List"%>
<%@page import="java.lang.management.ManagementFactory"%>
<%@page import="java.lang.management.RuntimeMXBean"%>
<%@page import="java.lang.ClassLoader"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/cloud3.css">
<title>Oracle Public Cloud Demo - Runtime Environment Details</title>
</head>
<body>
<header class="navbar-fixed-top">
<hgroup class="container">
<div class="cloudLogo columns">
<a href='http://cloud.oracle.com' target="_blank"><img
alt="Oracle Cloud logo" src="images/oracle-cloud-logo.png"
border="0" /></a>
</div>
</hgroup>
</header>
<div class="blueBanner">
<div class="container">
<div class="blueBannerLogo img-center-align">
<img src='images/cloudgs_occs.png' alt="" />
</div>
<div class="blueBannerHeading">
<h1 class="blueBannerTitleWithSubtitle">
<a style="color: #ffffff">Oracle Container Cloud Service</a>&nbsp;+
<a style="color: #ffffff">Wercker</a>
</h1>
</div>
</div>
<div class="blueBannerButton"></div>
</div>
</div>
<div class="container serviceContainer" style="margin-top:150px;">
<div class="overviewLayout">
<div class="whyOracleVideoSection">
<div class='overviewDemoSection'>
<div class="whyOracleListing">
<div class="whyOracleListingLayout">
<h3>
<span style="color: #333; text-decoration: none">Environment Variables</span>
</h3>
<table>
<tr>
<th style="text-align: left">Name</th>
<th style="text-align: left">Value</th>
</tr>
<%
TreeMap<String, String> sortedMap = new TreeMap<String, String>();
sortedMap.putAll(System.getenv());
for (Map.Entry<String, String> f : sortedMap.entrySet()) {
out.println("<tr><td><b>");
out.println(f.getKey());
out.println("</b></td><td>");
out.println(f.getValue());
out.println("</td></tr>");
}
RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
List<String> arguments = runtimeMxBean.getInputArguments();
String sJavaagentArg = "-javaagent option was not defined.";
for (String argument : arguments) {
if (argument.startsWith("-javaagent:")) {
sJavaagentArg = argument;
break;
}
}
out.println("<tr><td><b>Java Agent</b> (RuntimeMXBean)</td><td>" + sJavaagentArg + "</td></tr>");
try {
java.lang.reflect.Method m = ClassLoader.class.getDeclaredMethod("findLoadedClass",
new Class[] { String.class });
m.setAccessible(true);
ClassLoader cl = ClassLoader.getSystemClassLoader();
Object oAgent = m.invoke(cl, "oracle.apmaas.agent.instrumentation.Agent");
out.println("<tr><td><b>oracle.apmaas.agent.instrumentation.Agent</b></td><td>Agent is " + (oAgent != null ? "" : "not") + " loaded.</td></tr>");
} catch (Exception e) {
e.printStackTrace();
}
%>
</table>
</div>
</div>
<div class="videoShadow"></div>
</div>
</div>
</div>
</div>
<footer>
<div class="opcGlobalFooter">
<div class="container">
<div class="footerLeft columns">
<ul>
<li><a href='http://www.oracle.com/corporate/index.html'
target="_blank">About Oracle</a></li>
<li><a
href='http://www.oracle.com/corporate/contact/index.htm'
target="_blank">Contact Us</a></li>
<li><a href='http://www.oracle.com/us/legal/index.html'
target="_blank">Legal Notices</a></li>
<li><a href='http://www.oracle.com/us/legal/terms/index.html'
target="_blank">Terms of Use</a></li>
<li><a
href='http://www.oracle.com/us/legal/privacy/index.html'
target="_blank">Your Privacy Rights</a></li>
</ul>
<p>Copyright &copy; 2013, 2014 Oracle and/or its affiliates.
All rights reserved.</p>
</div>
</div>
</div>
</footer>
</body>
</html>

@ -0,0 +1,105 @@
<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="java.io.*"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/cloud3.css">
<title>Oracle Public Cloud Demo</title>
</head>
<body>
<header class="navbar-fixed-top">
<hgroup class="container">
<div class="cloudLogo columns">
<a href='http://cloud.oracle.com' target="_blank"><img
alt="Oracle Cloud logo" src="images/oracle-cloud-logo.png"
border="0" /></a>
</div>
</hgroup>
</header>
<div class="blueBanner">
<div class="container">
<div class="blueBannerLogo img-center-align">
<img src='images/cloudgs_occs.png' alt="" />
</div>
<div class="blueBannerHeading">
<h1 class="blueBannerTitleWithSubtitle">
<a style="color: #ffffff">Oracle Container Cloud Service</a>&nbsp;+
<a style="color: #ffffff">Wercker</a>
</h1>
</div>
<div class="blueBannerButton"></div>
</div>
</div>
<div class="container serviceContainer" style="margin-top: 150px;">
<div class="overviewLayout">
<div>
<br>SpringBoot application demo. Current server time: <%= new java.util.Date() %> <br>
<br>
<p>
<span style="color: #333; text-decoration: none">Build faster and release often with Wercker's Docker-Native
continuous integration platform for developing, building and delivering your applications.</span>
</p>
<p>
<span style="color: #333; text-decoration: none">Configure, deploy, administer, monitor,
and orchestrate services (or stacks of services) as Docker containers
across multiple hosts and scale them as needed with Oracle Container Cloud Service.</span>
</p>
<div>
<img max-width="100%" height="auto"
src="images/occs.wercker.png"><br> <a
</a><br>
</div>
</div>
</div>
</div>
<footer>
<div class="opcGlobalFooter">
<div class="container">
<div class="footerLeft columns">
<ul>
<li><a href='http://www.oracle.com/corporate/index.html'
target="_blank">About Oracle</a></li>
<li><a
href='http://www.oracle.com/corporate/contact/index.htm'
target="_blank">Contact Us</a></li>
<li><a href='http://www.oracle.com/us/legal/index.html'
target="_blank">Legal Notices</a></li>
<li><a href='http://www.oracle.com/us/legal/terms/index.html'
target="_blank">Terms of Use</a></li>
<li><a
href='http://www.oracle.com/us/legal/privacy/index.html'
target="_blank">Your Privacy Rights</a></li>
</ul>
<p>Copyright &copy; 2013, 2014 Oracle and/or its affiliates.
All rights reserved.</p>
</div>
</div>
</div>
</footer>
</body>
</html>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<welcome-file-list>
<welcome-file></welcome-file>
</welcome-file-list>
</web-app>

@ -0,0 +1,8 @@
{
"runtime": {
"majorVersion": "8"
},
"command": "java -Dserver.port=$PORT -jar springbootdemo-0.0.1.war",
"startupTime": "300",
"notes": "SpringBoot demo application"
}

@ -0,0 +1,18 @@
package com.example.springboot;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = DemoApplication.class)
@WebAppConfiguration
public class DemoApplicationTests {
@Test
public void contextLoads() {
}
}

@ -0,0 +1,17 @@
box: combient/java-mvn
build:
steps:
# Build Spring Boot Sample application
- script:
name: Maven install
code: mvn install
push:
steps:
# Push to public docker repo
- internal/docker-push:
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD
tag: latest
repository: $DOCKER_REPOSITORY
registry: https://index.docker.io/v1/
cmd: java -jar /pipeline/source/target/springbootdemo-0.0.1.war
Loading…
Cancel
Save