mirror of
https://github.com/lxsang/ant-http
synced 2024-11-18 01:08:21 +01:00
fix(CI): use cross toolchain
All checks were successful
gitea-sync/ant-http/pipeline/head This commit looks good
All checks were successful
gitea-sync/ant-http/pipeline/head This commit looks good
This commit is contained in:
parent
4f91f99ca0
commit
2863cf1710
68
Jenkinsfile
vendored
68
Jenkinsfile
vendored
@ -3,22 +3,39 @@ def build_antd()
|
|||||||
sh '''
|
sh '''
|
||||||
set -e
|
set -e
|
||||||
cd $WORKSPACE
|
cd $WORKSPACE
|
||||||
mkdir -p build/$arch/etc/systemd/system/
|
mkdir -p build/$arch/
|
||||||
mkdir -p build/$arch/opt/www
|
|
||||||
[ -f Makefile ] && make clean
|
[ -f Makefile ] && make clean
|
||||||
|
case $arch in
|
||||||
|
amd64|x86_64)
|
||||||
|
HOST=
|
||||||
|
;;
|
||||||
|
aarch64|arm64)
|
||||||
|
HOST=--host=aarch64-linux-gnu
|
||||||
|
;;
|
||||||
|
armv7l|arm)
|
||||||
|
HOST=--host=arm-linux-gnueabihf
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unkown architecture"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
libtoolize
|
libtoolize
|
||||||
aclocal
|
aclocal
|
||||||
autoconf
|
autoconf
|
||||||
automake --add-missing
|
automake --add-missing
|
||||||
./configure --prefix=/usr
|
./configure $HOST --prefix=/usr
|
||||||
make
|
|
||||||
DESTDIR=$WORKSPACE/build/$arch make install
|
DESTDIR=$WORKSPACE/build/$arch make install
|
||||||
cp build/$arch/usr/etc/antd-config.ini build/$arch/opt/www/config.ini.example
|
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline{
|
pipeline{
|
||||||
agent { node{ label'master' }}
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'xsangle/ci-tools:latest'
|
||||||
|
reuseNode true
|
||||||
|
}
|
||||||
|
}
|
||||||
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.
|
||||||
@ -37,17 +54,16 @@ pipeline{
|
|||||||
}
|
}
|
||||||
stages
|
stages
|
||||||
{
|
{
|
||||||
|
stage('Prepare') {
|
||||||
|
steps {
|
||||||
|
sh'''
|
||||||
|
make clean || true
|
||||||
|
rm -rf build/* || true
|
||||||
|
mkdir build || true
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Build AMD64') {
|
stage('Build AMD64') {
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'xsangle/ci-tools:bionic-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 {
|
steps {
|
||||||
script{
|
script{
|
||||||
env.arch = "amd64"
|
env.arch = "amd64"
|
||||||
@ -56,16 +72,6 @@ pipeline{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build ARM64') {
|
stage('Build ARM64') {
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'xsangle/ci-tools:bionic-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 {
|
steps {
|
||||||
script{
|
script{
|
||||||
env.arch = "arm64"
|
env.arch = "arm64"
|
||||||
@ -74,16 +80,6 @@ pipeline{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build ARM') {
|
stage('Build ARM') {
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'xsangle/ci-tools:bionic-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 {
|
steps {
|
||||||
script{
|
script{
|
||||||
env.arch = "arm"
|
env.arch = "arm"
|
||||||
|
Loading…
Reference in New Issue
Block a user