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