项目部署
Some checks failed
Personal/PersonalMain-Golang/pipeline/head There was a failure building this commit

This commit is contained in:
筱锋xiao_lfeng 2024-01-31 16:23:02 +08:00
parent ebff4d629b
commit 912d8a55ab
Signed by: XiaoLFeng
GPG Key ID: F693AA12AABBFA87
2 changed files with 19 additions and 2 deletions

19
Jenkinsfile vendored
View File

@ -12,10 +12,27 @@ pipeline {
}
}
stages {
stage('Qodana') {
stage('Qodana代码检查') {
when {
branch 'feature'
}
steps {
sh '''qodana'''
}
}
stage('项目部署') {
steps {
sh '''echo "部署项目"'''
sh '''set GOARCH=amd64'''
sh '''set GOOS=linux'''
sh '''go build -o personalMain'''
}
}
stage('项目部署至服务器') {
steps {
sh '''echo "部署项目至服务器"'''
sshPublisher(publishers: [sshPublisherDesc(configName: 'XiaoLFengBlogServer', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''cd ./blog-main
nohup ./personalMain > logger.log 2>&1 &''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: 'blog-main', remoteDirectorySDF: false, removePrefix: '', sourceFiles: './personalMain')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: true)])
}
}
}

View File

@ -8,7 +8,7 @@ import (
"PersonalMain/utility/ErrorCode"
"PersonalMain/utility/ResultUtil"
"github.com/gogf/gf/v2/net/ghttp"
regexp "regexp"
"regexp"
)
// GetLinkFriend