add auto script for jenkins addon

This commit is contained in:
Yuxin Deng 2025-11-23 19:52:52 -05:00
parent c35fcccb1b
commit 5e7b2ec89c
2 changed files with 55 additions and 25 deletions

25
Jenkinsfile vendored
View file

@ -115,31 +115,6 @@ pipeline {
}
/*********************************************
* Checkstyle
*********************************************/
stage('Checkstyle (Java 25)') {
agent {
docker {
image 'maven-java25:latest'
args "${DOCKER_ARGS}"
}
}
steps {
echo 'Running Checkstyle analysis...'
sh './mvnw checkstyle:checkstyle'
}
post {
always {
recordIssues(
enabledForFailure: true,
tool: checkstyle(pattern: '**/target/checkstyle-result.xml')
)
}
}
}
/*********************************************
* Package JAR
*********************************************/

55
jenkins.yaml Normal file
View file

@ -0,0 +1,55 @@
jenkins:
systemMessage: "Automated Jenkins via JCasC"
nodes:
- permanent:
name: "master"
remoteFS: "/var/jenkins_home"
numExecutors: 2
unclassified:
sonarGlobalConfiguration:
installations:
- name: "SonarQubeServer"
serverUrl: "http://sonarqube:9000"
credentialsId: "sonar-token"
credentials:
system:
domainCredentials:
- credentials:
- string:
id: "sonar-token"
description: "SonarQube Token"
secret: "${SONAR_AUTH_TOKEN}"
tool:
maven:
installations:
- name: "Maven 3.9.5"
properties:
- installSource:
installers:
- maven:
id: "3.9.5"
jdk:
installations:
- name: "JDK 25"
home: "/usr/lib/jvm/jdk-25"
plugins:
required:
- git
- workflow-aggregator
- sonar
- jacoco
- pipeline-github-lib
- docker-workflow
- timestamper
- warnings-ng
- zap
- configuration-as-code
- blueocean
- prometheus
- htmlpublisher