use remote agent instead of ssh connection
All checks were successful
gitea-sync/ci-yocto/pipeline/head This commit looks good
All checks were successful
gitea-sync/ci-yocto/pipeline/head This commit looks good
This commit is contained in:
parent
09e3c5d6a7
commit
7d9f09eaba
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@ -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{
|
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.
|
||||||
@ -30,8 +21,6 @@ pipeline{
|
|||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
sh'''
|
sh'''
|
||||||
export -p | tee build.source
|
|
||||||
cat <<"EOF" >>build.source
|
|
||||||
cd $WORKSPACE
|
cd $WORKSPACE
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform amd64 \
|
--platform amd64 \
|
||||||
@ -39,9 +28,7 @@ cat <<"EOF" >>build.source
|
|||||||
.
|
.
|
||||||
docker tag xsangle/ci-yocto:focal workstation:5000/xsangle/ci-yocto:focal
|
docker tag xsangle/ci-yocto:focal workstation:5000/xsangle/ci-yocto:focal
|
||||||
docker push workstation:5000/xsangle/ci-yocto:focal
|
docker push workstation:5000/xsangle/ci-yocto:focal
|
||||||
EOF
|
|
||||||
'''
|
'''
|
||||||
sshScript remote: remote, script: "build.source"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user