Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d7e9360e2c | |||
| 6b1d998791 | |||
| 922c8df4c6 | |||
| 946909a1b0 | |||
| 5aab8caed6 | |||
| 63a5e576a8 | |||
| aa6f394e65 | |||
| 15a05dc886 | |||
| 81b557f424 | |||
| 6e6e1fdcb6 | |||
| 75f780bd0c | |||
| 6a5572a5f7 | |||
| d7839d4033 | |||
| af78bcdf1e | |||
| 5a4e789475 | |||
| 9969d8b2cf | |||
| 3e129808aa | |||
| f03d95e413 | |||
| c8f9061ef6 | |||
| 6804a58c01 | |||
| 5ef50d2628 | |||
| 1c02e35f97 | |||
| f298808592 | |||
| a14a9d4f9a | |||
| d267e0d112 | |||
| 833dd401b3 |
@@ -1,2 +1 @@
|
||||
.idea/*
|
||||
target
|
||||
@@ -0,0 +1,8 @@
|
||||
FROM openjdk:8-jre-alpine
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
COPY ./target/java-maven-app-1.0-SNAPSHOT.jar /usr/app/
|
||||
WORKDIR /usr/app
|
||||
|
||||
ENTRYPOINT ["java", "-jar", "java-maven-app-1.0-SNAPSHOT.jar"]
|
||||
Vendored
+50
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
library identifier: 'jenkins-shared-library@master', retriever: modernSCM(
|
||||
[$class: 'GitSCMSource',
|
||||
remote: 'https://gitlab.com/nanuchi/jenkins-shared-library.git',
|
||||
credentialsId: 'gitlab-credentials'
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def gv
|
||||
|
||||
pipeline {
|
||||
agent any
|
||||
tools {
|
||||
maven 'Maven'
|
||||
}
|
||||
stages {
|
||||
stage("init") {
|
||||
steps {
|
||||
script {
|
||||
gv = load "script.groovy"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage("build jar") {
|
||||
steps {
|
||||
script {
|
||||
buildJar()
|
||||
}
|
||||
}
|
||||
}
|
||||
stage("build and push image") {
|
||||
steps {
|
||||
script {
|
||||
buildImage 'nanajanashia/demo-app:jma-3.0'
|
||||
dockerLogin()
|
||||
dockerPush 'nanajanashia/demo-app:jma-3.0'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage("deploy") {
|
||||
steps {
|
||||
script {
|
||||
gv.deployApp()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,32 +8,6 @@
|
||||
<artifactId>java-maven-app</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.2</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>nexus-snapshots</id>
|
||||
<url>http://167.99.248.163:8081/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
def deployApp() {
|
||||
echo 'deploying the application...'
|
||||
}
|
||||
|
||||
return this
|
||||
@@ -1,11 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>MyApp</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Welcome to Java Maven Application</h1>
|
||||
<!-- add image here <img src="" width="" /> -->
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user