From f1d8bc2fac56bdf38fd2373fea8b1ed6d9fe6a03 Mon Sep 17 00:00:00 2001 From: Robert McNees Date: Wed, 5 Jun 2024 08:02:40 -0400 Subject: [PATCH] Use GitHub Actions instead of Jenkins for CI --- .../continuous-integration-build.yml | 13 ++++++ Jenkinsfile | 44 ------------------- test/run.sh | 36 --------------- 3 files changed, 13 insertions(+), 80 deletions(-) create mode 100644 .github/workflows/continuous-integration-build.yml delete mode 100644 Jenkinsfile delete mode 100755 test/run.sh diff --git a/.github/workflows/continuous-integration-build.yml b/.github/workflows/continuous-integration-build.yml new file mode 100644 index 0000000..5d3e68e --- /dev/null +++ b/.github/workflows/continuous-integration-build.yml @@ -0,0 +1,13 @@ +name: CI Build + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + uses: spring-guides/getting-started-macros/.github/workflows/build_initial_complete_maven_gradle.yml@main \ No newline at end of file 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/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