use remote agent instead of ssh connection
All checks were successful
gitea-sync/ci-yocto/pipeline/head This commit looks good

This commit is contained in:
dany 2022-09-29 19:09:44 +02:00
parent 09e3c5d6a7
commit 7d9f09eaba

15
Jenkinsfile vendored
View File

@ -1,14 +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{
agent { node{ label'master' }}
agent { node{ label'workstation' }}
options {
// Limit build history with buildDiscarder option:
// daysToKeepStr: history is only kept up to this many days.
@ -30,8 +21,6 @@ pipeline{
stage('Build') {
steps {
sh'''
export -p | tee build.source
cat <<"EOF" >>build.source
cd $WORKSPACE
docker buildx build \
--platform amd64 \
@ -39,9 +28,7 @@ cat <<"EOF" >>build.source
.
docker tag xsangle/ci-yocto:focal workstation:5000/xsangle/ci-yocto:focal
docker push workstation:5000/xsangle/ci-yocto:focal
EOF
'''
sshScript remote: remote, script: "build.source"
}
}
}