1 Star 1 Fork 0

Tender / course

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Jenkinsfile.back 2.23 KB
一键复制 编辑 原始数据 按行查看 历史
cuisd 提交于 2024-01-10 21:40 . feat - course 工程模板,全量提交
// gitlab credential
def git_auth = "848ca7f1-2ba7-4850-b88b-39c72c7fa5df"
// the tag version of image
def tag = "latest"
// harbor server address
def harbor_url = "192.168.255.102:5000/course_project"
// harbor auth
def harbor_auth = ""
def project_name_4_image = "course:v1"
node {
stage('pull project code 01') {
checkout scmGit(
branches: [[name: '*/master']],
extensions: [],
userRemoteConfigs: [[
credentialsId: "${git_auth}",
url: 'git@192.168.255.100:base_tutorials/course.git'
]]
)
}
//stage('SonarQube code audit 02'){
// environment{
// JDK_HOME = tool 'jdk17'
// SCANNER_HOME=tool 'Sonar-Scanner'
// }
// script{
// withSonarQubeEnv('SonarQube-Server'){
// withEnv(["PATH+JDK=${JDK_HOME}/bin", "PATH+SONARQUBE=${SCANNER_HOME}/bin"]) {
// // jvm param
// sh "sonar-scanner -Dsonar.jvmOpts='--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.net.util=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED'"
// }
// // has configed in system config
// sh"${SCANNER_HOME}/bin/sonar-scanner"
// }
// }
//}
stage('package build image 03') {
// compile,install common jar
sh "mvn clean -Dmaven.skip.test=true install"
// more than one dockerfile:build ,this is used to build specified module image
sh "mvn -f course-test/pom.xml clean package dockerfile:build"
sh "docker tag course-test:0.0.1-SNAPSHOT ${harbor_url}/${project_name_4_image}"
}
// stage('push image to Harbor 04') {
// sh "docker tag course-test:0.0.1-SNAPSHOT ${harbor_url}/${project_name_4_image}"
// }
// stage('remote publish war 04') {
// steps {
// deploy adapters: [
// tomcat8(
// credentialsId: '9fbd4fd5-19a7-45c2-a275-622fa4dfc6d1',
// path: '',
// url: 'http://192.168.255.102:8080'
// )
// ],
// contextPath: null,
// war: 'target/*.war'
// }
// }
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/Tender_Cui/course.git
git@gitee.com:Tender_Cui/course.git
Tender_Cui
course
course
master

搜索帮助