2023-07-11 23:00:12 +02:00
|
|
|
pipeline {
|
2023-09-21 18:24:37 +02:00
|
|
|
agent {
|
|
|
|
dockerfile {
|
|
|
|
dir 'automation'
|
|
|
|
reuseNode true
|
2023-09-21 18:27:54 +02:00
|
|
|
args '--network host'
|
2023-07-11 23:00:12 +02:00
|
|
|
}
|
2023-09-21 18:24:37 +02:00
|
|
|
}
|
2023-07-11 23:00:12 +02:00
|
|
|
|
2023-09-21 18:24:37 +02:00
|
|
|
stages {
|
|
|
|
stage('Rust Toolchain Info') {
|
|
|
|
steps {
|
|
|
|
sh 'rustc --version'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Clippy') {
|
|
|
|
steps {
|
|
|
|
sh 'cargo clippy'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Docs') {
|
|
|
|
steps {
|
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
|
|
sh 'cargo +nightly doc --all-features'
|
2023-07-11 23:00:12 +02:00
|
|
|
}
|
2023-09-21 18:24:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Rustfmt') {
|
|
|
|
steps {
|
|
|
|
sh 'cargo fmt --all --check'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Test') {
|
|
|
|
steps {
|
2024-02-12 16:55:19 +01:00
|
|
|
sh 'cargo nextest r --all-features'
|
2023-09-21 18:24:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Check with all features') {
|
|
|
|
steps {
|
|
|
|
sh 'cargo check --all-features'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Check with no features') {
|
|
|
|
steps {
|
|
|
|
sh 'cargo check --no-default-features'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Check Cross Embedded Bare Metal') {
|
|
|
|
steps {
|
2024-02-12 15:51:37 +01:00
|
|
|
sh 'cargo check -p satrs --target thumbv7em-none-eabihf --no-default-features'
|
2023-09-21 18:24:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Check Cross Embedded Linux') {
|
|
|
|
steps {
|
|
|
|
sh 'cargo check --target armv7-unknown-linux-gnueabihf'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Deploy satrs-book') {
|
2023-09-21 18:26:33 +02:00
|
|
|
when {
|
2023-09-21 19:35:29 +02:00
|
|
|
anyOf {
|
2023-09-21 19:40:53 +02:00
|
|
|
branch 'main';
|
|
|
|
branch pattern: 'mdbook-deployment*'
|
2023-09-21 19:35:29 +02:00
|
|
|
}
|
2023-09-21 18:26:33 +02:00
|
|
|
}
|
2023-09-21 18:24:37 +02:00
|
|
|
steps {
|
|
|
|
dir('satrs-book') {
|
2023-09-21 19:50:13 +02:00
|
|
|
sh 'mdbook build'
|
2023-09-21 18:24:37 +02:00
|
|
|
sshagent(credentials: ['documentation-buildfix']) {
|
|
|
|
// Deploy to Apache webserver
|
2024-02-09 00:43:20 +01:00
|
|
|
sh 'rsync -r --delete book/html/ buildfix@documentation.irs.uni-stuttgart.de:/projects/sat-rs/book/'
|
2023-09-21 18:24:37 +02:00
|
|
|
}
|
2023-07-11 23:00:12 +02:00
|
|
|
}
|
2023-09-21 18:24:37 +02:00
|
|
|
}
|
2023-07-11 23:00:12 +02:00
|
|
|
}
|
2023-09-21 18:24:37 +02:00
|
|
|
}
|
2023-07-11 23:00:12 +02:00
|
|
|
}
|