Jenkinsfile cleanup

This commit is contained in:
Fabien Poussin 2020-12-06 00:59:01 +01:00 committed by GitHub
parent 9cd5012f22
commit 057d889384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 73 additions and 201 deletions

274
Jenkinsfile vendored
View File

@ -1,213 +1,85 @@
pipeline { pipeline {
agent any agent {
docker { image 'fpoussin/jenkins:ubuntu-18.04-chibios' }
}
stages { stages {
stage('Prepare ChibiOS') { stage('Prepare ChibiOS') {
agent {
docker {
image 'fpoussin/jenkins:ubuntu-18.04'
}
}
steps { steps {
sh '''echo $CH_BRANCH sh '''
echo $CH_PATH echo $CH_BRANCH
echo $CHC_PATH echo $CH_PATH
echo $CHC_PATH
exit 0''' exit 0
'''
sh '''
arm-none-eabi-gcc -v
cd $WORKSPACE/ext
for i in *.7z; do 7z x -y $i; done
cd $WORKSPACE
rm -rf $CH_PATH
git clone /var/lib/git/ChibiOS $CH_PATH
cd $CH_PATH
git remote set-url origin https://github.com/ChibiOS/ChibiOS.git
git fetch --all
git checkout -b $CH_BRANCH origin/$CH_BRANCH
git pull --rebase origin $CH_BRANCH
cd ext
for i in *.7z; do 7z x -y $i; done
'''
} }
} }
stage('Build STM32') {
stage('Build Platforms') { steps {
parallel { sh '''
stage('Build STM32') { ./tools/chbuild.sh ./testhal/STM32/
agent { ./tools/chbuild.sh ./demos/STM32/
docker { '''
image 'fpoussin/jenkins:ubuntu-18.04-chibios' }
} }
stage('Build NRF51') {
} steps {
steps { sh '''
sh '''arm-none-eabi-gcc -v ./tools/chbuild.sh ./testhal/NRF51/
./tools/chbuild.sh ./demos/NRF51/
cd $WORKSPACE/ext '''
for i in *.7z; do 7z x -y $i; done }
}
cd $WORKSPACE stage('Build NRF52') {
rm -rf $CH_PATH steps {
git clone /var/lib/git/ChibiOS $CH_PATH sh '''
cd $CH_PATH ./tools/chbuild.sh ./testhal/NRF52/
git remote set-url origin https://github.com/ChibiOS/ChibiOS.git ./tools/chbuild.sh ./demos/NRF52/
git fetch --all '''
git checkout -b $CH_BRANCH origin/$CH_BRANCH }
git pull --rebase origin $CH_BRANCH }
stage('Build Kinetis') {
cd ext steps {
for i in *.7z; do 7z x -y $i; done''' sh '''
sh '''export CH_PATH=$WORKSPACE/ChibiOS ./tools/chbuild.sh ./testhal/KINETIS/
export CHC_PATH=$WORKSPACE ./tools/chbuild.sh ./demos/KINETIS/
'''
./tools/chbuild.sh ./testhal/STM32/ }
./tools/chbuild.sh ./demos/STM32/''' }
} stage('Build LPC') {
} steps {
sh '''
stage('Build NRF51') { ./tools/chbuild.sh ./demos/LPC/
agent { '''
docker { }
image 'fpoussin/jenkins:ubuntu-18.04-chibios' }
} stage('Build NUMICRO') {
steps {
} sh '''
steps { ./tools/chbuild.sh ./testhal/NUMICRO/
sh '''arm-none-eabi-gcc -v ./tools/chbuild.sh ./demos/NUMICRO/
'''
cd $WORKSPACE/ext
for i in *.7z; do 7z x -y $i; done
cd $WORKSPACE
rm -rf $CH_PATH
git clone /var/lib/git/ChibiOS $CH_PATH
cd $CH_PATH
git remote set-url origin https://github.com/ChibiOS/ChibiOS.git
git fetch --all
git checkout -b $CH_BRANCH origin/$CH_BRANCH
git pull --rebase origin $CH_BRANCH
cd ext
for i in *.7z; do 7z x -y $i; done'''
sh '''export CH_PATH=$WORKSPACE/ChibiOS
export CHC_PATH=$WORKSPACE
./tools/chbuild.sh ./testhal/NRF51/
./tools/chbuild.sh ./demos/NRF51/
'''
}
}
stage('Build NRF52') {
agent {
docker {
image 'fpoussin/jenkins:ubuntu-18.04-chibios'
}
}
steps {
sh '''arm-none-eabi-gcc -v
cd $WORKSPACE/ext
for i in *.7z; do 7z x -y $i; done
cd $WORKSPACE
rm -rf $CH_PATH
git clone /var/lib/git/ChibiOS $CH_PATH
cd $CH_PATH
git remote set-url origin https://github.com/ChibiOS/ChibiOS.git
git fetch --all
git checkout -b $CH_BRANCH origin/$CH_BRANCH
git pull --rebase origin $CH_BRANCH
cd ext
for i in *.7z; do 7z x -y $i; done'''
sh '''export CH_PATH=$WORKSPACE/ChibiOS
export CHC_PATH=$WORKSPACE
./tools/chbuild.sh ./testhal/NRF52/
./tools/chbuild.sh ./demos/NRF52/
'''
}
}
stage('Build Kinetis') {
agent {
docker {
image 'fpoussin/jenkins:ubuntu-18.04-chibios'
}
}
steps {
sh '''arm-none-eabi-gcc -v
cd $WORKSPACE/ext
for i in *.7z; do 7z x -y $i; done
cd $WORKSPACE
rm -rf $CH_PATH
git clone /var/lib/git/ChibiOS $CH_PATH
cd $CH_PATH
git remote set-url origin https://github.com/ChibiOS/ChibiOS.git
git fetch --all
git checkout -b $CH_BRANCH origin/$CH_BRANCH
git pull --rebase origin $CH_BRANCH
cd ext
for i in *.7z; do 7z x -y $i; done'''
sh '''export CH_PATH=$WORKSPACE/ChibiOS
export CHC_PATH=$WORKSPACE
./tools/chbuild.sh ./testhal/KINETIS/
./tools/chbuild.sh ./demos/KINETIS/
'''
}
}
stage('Build LPC') {
agent {
docker {
image 'fpoussin/jenkins:ubuntu-18.04-chibios'
}
}
steps {
sh '''arm-none-eabi-gcc -v
cd $WORKSPACE/ext
for i in *.7z; do 7z x -y $i; done
cd $WORKSPACE
rm -rf $CH_PATH
git clone /var/lib/git/ChibiOS $CH_PATH
cd $CH_PATH
git remote set-url origin https://github.com/ChibiOS/ChibiOS.git
git fetch --all
git checkout -b $CH_BRANCH origin/$CH_BRANCH
git pull --rebase origin $CH_BRANCH
cd ext
for i in *.7z; do 7z x -y $i; done'''
sh '''export CH_PATH=$WORKSPACE/ChibiOS
export CHC_PATH=$WORKSPACE
./tools/chbuild.sh ./demos/LPC/
'''
}
}
stage('Build NUMICRO') {
agent {
docker {
image 'fpoussin/jenkins:ubuntu-18.04-chibios'
}
}
steps {
sh '''arm-none-eabi-gcc -v
cd $WORKSPACE/ext
for i in *.7z; do 7z x -y $i; done
cd $WORKSPACE
rm -rf $CH_PATH
git clone /var/lib/git/ChibiOS $CH_PATH
cd $CH_PATH
git remote set-url origin https://github.com/ChibiOS/ChibiOS.git
git fetch --all
git checkout -b $CH_BRANCH origin/$CH_BRANCH
git pull --rebase origin $CH_BRANCH
cd ext
for i in *.7z; do 7z x -y $i; done'''
sh '''export CH_PATH=$WORKSPACE/ChibiOS
export CHC_PATH=$WORKSPACE
./tools/chbuild.sh ./testhal/NUMICRO/
./tools/chbuild.sh ./demos/NUMICRO/
'''
}
}
} }
} }
} }
environment { environment {
CH_BRANCH = 'stable_20.3.x' CH_BRANCH = 'stable_20.3.x'