pipeline { agent none stages { stage('Build') { agent { docker { image 'rust:alpine' } } environment { RUSTFLAGS = '-C target-feature=+crt-static -C link-self-contained=yes -C link-arg=-s' TOKEN = credentials('00912d76-da44-4f04-890f-b11180e7a68f') } steps { sh 'apk add pkgconf musl-dev curl' sh 'cargo build --release --target x86_64-unknown-linux-musl' 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' } } } }