项目测试
Some checks reported warnings
Personal/PersonalMain-Golang/pipeline/head This commit is unstable
Some checks reported warnings
Personal/PersonalMain-Golang/pipeline/head This commit is unstable
This commit is contained in:
parent
d7a16d9971
commit
625360a673
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
|
@ -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)])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ var (
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
s.SetServerRoot("resource/public")
|
//s.SetServerRoot("resource/public")
|
||||||
s.Run()
|
s.Run()
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user