Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pipeline {
agent any

tools {
maven 'maven3'
jdk 'jdk17'
}

stages {

stage('Compile') {
steps {
sh "mvn compile"
}
}

stage('Test') {
steps {
sh "mvn test"
}
}

stage('Package') {
steps {
sh "mvn package"
}
}
}
}
29 changes: 29 additions & 0 deletions Jenkinsfile1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pipeline {
agent { label 'slave-1'}

tools {
maven 'maven3'
jdk 'jdk17'
}

stages {

stage('Compile') {
steps {
sh "mvn compile"
}
}

stage('Test') {
steps {
sh "mvn test"
}
}

stage('Package') {
steps {
sh "mvn package"
}
}
}
}
30 changes: 26 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>com.example</groupId>
<artifactId>twitter-app</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.3</version>
<name>twitter-app</name>
<description>Demo project for Spring Boot</description>
<url/>
Expand All @@ -28,6 +28,7 @@
</scm>
<properties>
<java.version>17</java.version>
<jacoco.version>0.8.8</jacoco.version>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -74,17 +75,38 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>

<!-- JaCoCo Maven Plugin -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<distributionManagement>
<distributionManagement>
<repository>
<id>maven-releases</id>
<url>http://3.110.172.144:8081/repository/maven-releases/</url>
<url>http://13.235.245.200:8081/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>maven-snapshots</id>
<url>http://3.110.172.144:8081/repository/maven-snapshots/</url>
<url>http://13.235.245.200:8081/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>

Expand Down
1 change: 1 addition & 0 deletions test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Aditya