From 29fbd66a8825080e38ede15152b5a4b0561caf5e Mon Sep 17 00:00:00 2001 From: Robert McNees Date: Fri, 14 Jun 2024 06:14:34 -0400 Subject: [PATCH] Pass CI build from GitHub Actions instead of Jenkins The initial folder was missing the Application class so a version was copied from the complete folder so that builds pass. The files required for Jenkins builds were removed as the project will migrate to GitHub Actions for CI. --- Jenkinsfile | 44 -------------------- initial/src/main/java/hello/Application.java | 12 ++++++ test/run.sh | 36 ---------------- 3 files changed, 12 insertions(+), 80 deletions(-) delete mode 100644 Jenkinsfile create mode 100644 initial/src/main/java/hello/Application.java delete mode 100755 test/run.sh diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 2087732..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,44 +0,0 @@ -pipeline { - agent none - - triggers { - pollSCM 'H/10 * * * *' - } - - options { - disableConcurrentBuilds() - buildDiscarder(logRotator(numToKeepStr: '14')) - } - - stages { - stage("test: baseline (jdk17)") { - agent { - docker { - image 'harbor-repo.vmware.com/dockerhub-proxy-cache/library/adoptopenjdk/openjdk17:latest' - args '-v $HOME/.m2:/tmp/jenkins-home/.m2' - } - } - options { timeout(time: 30, unit: 'MINUTES') } - steps { - sh 'test/run.sh' - } - } - - } - - post { - changed { - script { - slackSend( - color: (currentBuild.currentResult == 'SUCCESS') ? 'good' : 'danger', - channel: '#sagan-content', - message: "${currentBuild.fullDisplayName} - `${currentBuild.currentResult}`\n${env.BUILD_URL}") - emailext( - subject: "[${currentBuild.fullDisplayName}] ${currentBuild.currentResult}", - mimeType: 'text/html', - recipientProviders: [[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']], - body: "${currentBuild.fullDisplayName} is reported as ${currentBuild.currentResult}") - } - } - } -} diff --git a/initial/src/main/java/hello/Application.java b/initial/src/main/java/hello/Application.java new file mode 100644 index 0000000..33c3f3b --- /dev/null +++ b/initial/src/main/java/hello/Application.java @@ -0,0 +1,12 @@ +package hello; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Application { + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } +} diff --git a/test/run.sh b/test/run.sh deleted file mode 100755 index dff7e36..0000000 --- a/test/run.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -cd $(dirname $0) - -cd ../complete - -./mvnw clean package -ret=$? -if [ $ret -ne 0 ]; then - exit $ret -fi -rm -rf target - -./gradlew build -ret=$? -if [ $ret -ne 0 ]; then - exit $ret -fi -rm -rf build - -cd ../initial - -./mvnw clean compile -ret=$? -if [ $ret -ne 0 ]; then - exit $ret -fi -rm -rf target - -./gradlew compileJava -ret=$? -if [ $ret -ne 0 ]; then - exit $ret -fi -rm -rf build - -exit