diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..e171bc0 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,26 @@ +pipeline { + agent any + options { + timestamps() + disableConcurrentBuilds() + } + stages { + stage('Build & Test') { + steps { + sh 'chmod +x gradlew' + sh './gradlew clean build --no-daemon' + } + } + stage('Deploy') { + steps { + sh ''' + set -e + JAR=$(ls build/libs/h-lab-*.jar | grep -v plain | head -1) + echo "Deploying: $JAR" + docker cp "$JAR" springboot-app:/app/app.jar + docker restart springboot-app + ''' + } + } + } +} \ No newline at end of file