diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..2275b2d --- /dev/null +++ b/Jenkinsfile @@ -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..' + } + + } +} \ No newline at end of file diff --git a/changlog..txt b/changlog..txt new file mode 100644 index 0000000..d1d3540 --- /dev/null +++ b/changlog..txt @@ -0,0 +1,2 @@ +ch00 +ch01 diff --git a/logfile.txt b/logfile.txt new file mode 100644 index 0000000..8b702a8 --- /dev/null +++ b/logfile.txt @@ -0,0 +1,2 @@ +hello +checking poll scm