Compare commits
2 Commits
master
...
feature/de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c53fe05e1 | ||
|
|
fab255d0da |
38
Jenkinsfile
vendored
38
Jenkinsfile
vendored
@@ -1,38 +0,0 @@
|
|||||||
def gv
|
|
||||||
|
|
||||||
pipeline {
|
|
||||||
agent any
|
|
||||||
stages {
|
|
||||||
stage("init") {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
gv = load "script.groovy"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("build jar") {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
echo "building jar"
|
|
||||||
//gv.buildJar()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("build image") {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
echo "building image"
|
|
||||||
//gv.buildImage()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("deploy") {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
echo "deploying"
|
|
||||||
//gv.deployApp()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
34
pom.xml
34
pom.xml
@@ -6,36 +6,34 @@
|
|||||||
|
|
||||||
<groupId>com.example</groupId>
|
<groupId>com.example</groupId>
|
||||||
<artifactId>java-maven-app</artifactId>
|
<artifactId>java-maven-app</artifactId>
|
||||||
<version>1.1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
<version>2.3.5.RELEASE</version>
|
<version>2.8.2</version>
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>repackage</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
|
||||||
<!-- to handle any Java version mismatch, add the following configuration for maven-compiler-plugin -->
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
<version>3.6.0</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>nexus-snapshots</id>
|
||||||
|
<url>http://167.99.248.163:8081/repository/maven-snapshots/</url>
|
||||||
|
</snapshotRepository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
def buildJar() {
|
|
||||||
echo "building the application..."
|
|
||||||
sh 'mvn package'
|
|
||||||
}
|
|
||||||
|
|
||||||
def buildImage() {
|
|
||||||
echo "building the docker image..."
|
|
||||||
withCredentials([usernamePassword(credentialsId: 'docker-hub-repo', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
|
|
||||||
sh 'docker build -t nanajanashia/demo-app:jma-2.0 .'
|
|
||||||
sh "echo $PASS | docker login -u $USER --password-stdin"
|
|
||||||
sh 'docker push nanajanashia/demo-app:jma-2.0'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def deployApp() {
|
|
||||||
echo 'deploying the application...'
|
|
||||||
}
|
|
||||||
|
|
||||||
return this
|
|
||||||
Reference in New Issue
Block a user