dotfiles/Jenkinsfile

20 lines
815 B
Plaintext
Raw Normal View History

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 12:47:23 +00:00
TOKEN = credentials('00912d76-da44-4f04-890f-b11180e7a68f')
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'
sh 'curl --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
}
}
}