2 Commits

Author SHA1 Message Date
Nana Janashia
4c53fe05e1 Add simple UI 2021-07-12 12:36:08 +02:00
Nana
fab255d0da Configure maven to push to nexus repo 2020-10-28 19:34:12 +01:00
3 changed files with 19 additions and 78 deletions

38
Jenkinsfile vendored
View File

@@ -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()
}
}
}
}
}

40
pom.xml
View File

@@ -6,36 +6,34 @@
<groupId>com.example</groupId>
<artifactId>java-maven-app</artifactId>
<version>1.1.0-SNAPSHOT</version>
<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.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.3.5.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- to handle any Java version mismatch, add the following configuration for maven-compiler-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
<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>

View File

@@ -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