mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-11-20 02:18:20 +01:00
use remote agent instead of ssh
Some checks failed
gitea-sync/antd-web-apps/pipeline/head There was a failure building this commit
Some checks failed
gitea-sync/antd-web-apps/pipeline/head There was a failure building this commit
This commit is contained in:
parent
7081d2c337
commit
59dd9276bf
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@ -1,13 +1,5 @@
|
|||||||
def remote = [:]
|
|
||||||
remote.name = 'workstation'
|
|
||||||
remote.host = 'workstation'
|
|
||||||
remote.user = 'dany'
|
|
||||||
remote.identityFile = '/var/jenkins_home/.ssh/id_rsa'
|
|
||||||
remote.allowAnyHosts = true
|
|
||||||
remote.agent = false
|
|
||||||
remote.logLevel = 'INFO'
|
|
||||||
pipeline{
|
pipeline{
|
||||||
agent { node{ label'master' }}
|
agent { node{ label'workstation' }}
|
||||||
options {
|
options {
|
||||||
// Limit build history with buildDiscarder option:
|
// Limit build history with buildDiscarder option:
|
||||||
// daysToKeepStr: history is only kept up to this many days.
|
// daysToKeepStr: history is only kept up to this many days.
|
||||||
@ -29,16 +21,11 @@ pipeline{
|
|||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
sh'''
|
sh'''
|
||||||
export -p | tee build.source
|
|
||||||
cat <<"EOF" >>build.source
|
|
||||||
cd $WORKSPACE
|
cd $WORKSPACE
|
||||||
[ -d build ] && rm -rf build
|
[ -d build ] && rm -rf build
|
||||||
mkdir -p build/opt/www/htdocs
|
mkdir -p build/opt/www/htdocs
|
||||||
export BUILDDIR="$WORKSPACE/build/opt/www/htdocs"
|
export BUILDDIR="$WORKSPACE/build/opt/www/htdocs"
|
||||||
make
|
|
||||||
EOF
|
|
||||||
'''
|
'''
|
||||||
sshScript remote: remote, script: "build.source"
|
|
||||||
script {
|
script {
|
||||||
// only useful for any master branch
|
// only useful for any master branch
|
||||||
//if (env.BRANCH_NAME =~ /^master/) {
|
//if (env.BRANCH_NAME =~ /^master/) {
|
||||||
|
Loading…
Reference in New Issue
Block a user