项目测试
Some checks reported warnings
Personal/PersonalMain-Golang/pipeline/head This commit is unstable

This commit is contained in:
筱锋xiao_lfeng 2024-01-31 18:41:23 +08:00
parent d7a16d9971
commit 625360a673
Signed by: XiaoLFeng
GPG Key ID: F693AA12AABBFA87
2 changed files with 5 additions and 5 deletions

8
Jenkinsfile vendored
View File

@ -22,7 +22,7 @@ pipeline {
} }
stage('项目构建') { stage('项目构建') {
steps { steps {
sh 'echo "部署项目"' echo '部署项目'
sh 'export GOARCH=amd64' sh 'export GOARCH=amd64'
sh 'export GOOS=linux' sh 'export GOOS=linux'
sh '/usr/local/go/bin/go build -o personalMain' sh '/usr/local/go/bin/go build -o personalMain'
@ -30,10 +30,10 @@ pipeline {
} }
stage('项目部署至服务器') { stage('项目部署至服务器') {
steps { steps {
sh 'echo "部署项目至服务器"' echo '部署项目至服务器'
sshPublisher(publishers: [sshPublisherDesc(configName: 'XiaoLFengBlogServer', sshCredentials: [encryptedPassphrase: '{AQAAABAAAAAQrXydf4kWME+M5r1FJeIC7y3P7e+14xuo5oNTQ6wxhrw=}', key: '', keyPath: '/var/jenkins_home/general-key', username: 'ecs-user'], transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''cd ./blog-main sshPublisher(publishers: [sshPublisherDesc(configName: 'XiaoLFengBlogServer', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''cd ./blog-main
chmod +x ./personalMain chmod +x ./personalMain
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)]) nohup ./personalMain > logger.log 2>&1 &''', execTimeout: 120000, flatten: false, keepFilePermissions: true, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: 'blog-main', remoteDirectorySDF: false, removePrefix: '', sourceFiles: './personalMain')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: true)])
} }
} }
} }

View File

@ -83,7 +83,7 @@ var (
) )
}) })
}) })
s.SetServerRoot("resource/public") //s.SetServerRoot("resource/public")
s.Run() s.Run()
return nil return nil
}, },