dont use fixed workspace path for building
All checks were successful
gitea-sync/ci-yocto/pipeline/head This commit looks good

This commit is contained in:
dany 2022-09-26 09:33:00 +02:00
parent 2bd5e258bd
commit 09e3c5d6a7

12
Jenkinsfile vendored
View File

@ -29,17 +29,19 @@ pipeline{
{ {
stage('Build') { stage('Build') {
steps { steps {
sshCommand remote: remote, command: ''' sh'''
set -e export -p | tee build.source
export WORKSPACE=$(realpath "./jenkins/workspace/ci-yocto") cat <<"EOF" >>build.source
cd $WORKSPACE cd $WORKSPACE
docker buildx build \ docker buildx build \
--platform amd64 \ --platform amd64 \
--output "type=docker,push=false,name=xsangle/ci-yocto:focal" \ --output "type=docker,push=false,name=xsangle/ci-yocto:focal" \
. .
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"
} }
} }
} }