2023-02-11 11:21:44 +00:00
|
|
|
pipeline {
|
|
|
|
agent none
|
2023-02-11 11:22:46 +00:00
|
|
|
stages {
|
|
|
|
stage('Build') {
|
|
|
|
agent {
|
|
|
|
docker { image 'rust:alpine' }
|
|
|
|
}
|
2023-02-11 11:44:02 +00:00
|
|
|
environment {
|
|
|
|
RUSTFLAGS = '-C target-feature=+crt-static -C link-self-contained=yes -C link-arg=-s'
|
2023-02-11 15:36:38 +00:00
|
|
|
TOKEN = credentials('abd7020c-43d6-485b-ae09-2f9b484d9c15')
|
2023-02-11 11:44:02 +00:00
|
|
|
}
|
2023-02-11 11:22:46 +00:00
|
|
|
steps {
|
2023-02-11 12:02:39 +00:00
|
|
|
sh 'apk add pkgconf musl-dev curl'
|
2023-02-11 11:44:02 +00:00
|
|
|
sh 'cargo build --release --target x86_64-unknown-linux-musl'
|
2023-02-11 12:47:23 +00:00
|
|
|
sh 'cp target/x86_64-unknown-linux-musl/release/dotfiles_installer ./installer-amd64'
|
2023-02-12 21:13:29 +00:00
|
|
|
sh 'curl -s -v --user root:${TOKEN} --upload-file ./installer-amd64 https://gitea.mattv.de/api/packages/root/generic/installer/${BUILD_NUMBER}/installer-amd64'
|
2023-02-11 11:22:46 +00:00
|
|
|
}
|
2023-02-11 11:21:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|