Update 'Jenkinsfile'

This commit is contained in:
dany 2022-09-20 14:21:09 +02:00
parent 87e5d5d010
commit 4814a4fa84

72
Jenkinsfile vendored
View File

@ -1,3 +1,11 @@
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'
def build_appimage() def build_appimage()
{ {
sh ''' sh '''
@ -34,48 +42,42 @@ pipeline{
stages stages
{ {
stage('Build AMD64') { stage('Build AMD64') {
agent {
docker {
image 'xsangle/ci-tools:latest-amd64'
args '-v /var/jenkins_home/workspace/nightly-antosaio:/var/jenkins_home/workspace/nightly-antosaio'
reuseNode true
}
}
steps { steps {
script{ sshCommand remote: remote, command: '''
env.arch = "amd64" export WORKSPACE=/var/jenkins_home/workspace/antos-appimage
} cd $WORKSPACE
build_appimage() [ -d build ] || mkdir build
} for file in /var/jenkins_home/workspace/nightly-antosaio/build/frontend/*; do
} echo "Building for AMD64 version $tag"
stage('Build ARM') { ./mkimg.sh amd64 $(basename $file)
agent { done
docker { '''
image 'xsangle/ci-tools:latest-arm'
args '-v /var/jenkins_home/workspace/nightly-antosaio:/var/jenkins_home/workspace/nightly-antosaio'
reuseNode true
} }
} }
stage('Build arm64') {
steps { steps {
script{ sshCommand remote: remote, command: '''
env.arch = "arm" export WORKSPACE=/var/jenkins_home/workspace/antos-appimage
} cd $WORKSPACE
build_appimage() [ -d build ] || mkdir build
} for file in /var/jenkins_home/workspace/nightly-antosaio/build/frontend/*; do
} echo "Building for arm64 version $tag"
stage('Build ARM64') { ./mkimg.sh arm64 $(basename $file)
agent { done
docker { '''
image 'xsangle/ci-tools:latest-arm64'
args '-v /var/jenkins_home/workspace/nightly-antosaio:/var/jenkins_home/workspace/nightly-antosaio'
reuseNode true
} }
} }
stage('Build arm') {
steps { steps {
script{ sshCommand remote: remote, command: '''
env.arch = "arm64" export WORKSPACE=/var/jenkins_home/workspace/antos-appimage
} cd $WORKSPACE
build_appimage() [ -d build ] || mkdir build
for file in /var/jenkins_home/workspace/nightly-antosaio/build/frontend/*; do
echo "Building for arm version $tag"
./mkimg.sh arm $(basename $file)
done
'''
} }
} }
stage('Archive') { stage('Archive') {