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
41 changes: 41 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
pipeline {
agent any
stages {
stage('build') {
steps {
echo 'compile'
sh 'mvn compile'
}
}

stage('build unit test') {
steps {
echo 'test'
sh 'mvn clean test'
}
}

stage('build package jo') {
steps {
echo 'package'
sh '''# Truncate the GIT_COMMIT to the first 7 characters
GIT_SHORT_COMMIT=$(echo $GIT_COMMIT | cut -c 1-7)
# Set the version using Maven
mvn versions:set -DnewVersion="$GIT_SHORT_COMMIT"
mvn versions:commit'''
sh 'mvn package -Dskiptests'
archiveArtifacts '**/target/*.jar'
}
}

}
tools {
maven 'Maven 3.9.6'
}
post {
always {
echo 'This pipeline is completed..'
}

}
}
2 changes: 2 additions & 0 deletions changlog..txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ch00
ch01
2 changes: 2 additions & 0 deletions logfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hello
checking poll scm