1
0
mirror of https://github.com/lxsang/antd-lua-plugin synced 2024-12-27 09:58:21 +01:00

Update Jenkinsfile

This commit is contained in:
Dany LE 2022-08-02 21:55:31 +02:00 committed by GitHub
parent 1396fe3d41
commit 3c602dabd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

97
Jenkinsfile vendored
View File

@ -1,11 +1,19 @@
def remote = [:] def build_antd()
remote.name = 'workstation' {
remote.host = 'workstation' sh '''
remote.user = 'dany' set -e
remote.identityFile = '/var/jenkins_home/.ssh/id_rsa' cd $WORKSPACE
remote.allowAnyHosts = true mkdir -p build/$arch/opt/www
remote.agent = false [ -f Makefile ] && make clean
remote.logLevel = 'INFO' libtoolize
aclocal
autoconf
automake --add-missing
./configure --prefix=/opt/www
CFLAGS="-I$WORKSPACE../ant-http/build/$arch/usr/include" LDFLAGS="-L$WORKSPACE../ant-http/build/$arch/usr/lib" make
DESTDIR=$WORKSPACE/build/$arch make install
'''
}
pipeline{ pipeline{
agent { node{ label'master' }} agent { node{ label'master' }}
@ -27,27 +35,64 @@ pipeline{
} }
stages stages
{ {
stage('Build') { stage('Build AMD64') {
agent {
docker {
image 'xsangle/ci-tools:latest-amd64'
// Run the container on the node specified at the
// top-level of the Pipeline, in the same workspace,
// rather than on a new node entirely:
reuseNode true
registryUrl 'http://workstation:5000/'
}
}
steps {
script{
env.arch = "amd64"
}
build_plugin()
}
}
stage('Build ARM64') {
agent {
docker {
image 'xsangle/ci-tools:latest-arm64'
// Run the container on the node specified at the
// top-level of the Pipeline, in the same workspace,
// rather than on a new node entirely:
reuseNode true
registryUrl 'http://workstation:5000/'
}
}
steps {
script{
env.arch = "arm64"
}
build_plugin()
}
}
stage('Build ARM') {
agent {
docker {
image 'xsangle/ci-tools:latest-arm'
// Run the container on the node specified at the
// top-level of the Pipeline, in the same workspace,
// rather than on a new node entirely:
reuseNode true
registryUrl 'http://workstation:5000/'
}
}
steps {
script{
env.arch = "arm"
}
build_plugin()
}
}
stage('Archive') {
steps { steps {
sshCommand remote: remote, command: '''
set -e
export WORKSPACE=$(realpath "./jenkins/workspace/antd-lua-plugin")
cd $WORKSPACE
[ -d build ] && rm build
mkdir build
libtoolize
aclocal
autoconf
automake --add-missing
./configure --prefix=/opt/www
make
DESTDIR=$WORKSPACE/build make install
'''
script { script {
// only useful for any master branch
//if (env.BRANCH_NAME =~ /^master/) {
archiveArtifacts artifacts: 'build/', fingerprint: true archiveArtifacts artifacts: 'build/', fingerprint: true
//}
} }
} }
} }