Updated to jenkins and gitea (#4)
All checks were successful
Gitea Organization/dotfiles/pipeline/head This commit looks good
All checks were successful
Gitea Organization/dotfiles/pipeline/head This commit looks good
Co-authored-by: Mutzi <root@mattv.de> Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
20
Jenkinsfile
vendored
Normal file
20
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
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('abd7020c-43d6-485b-ae09-2f9b484d9c15')
|
||||
}
|
||||
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 -H "Authorization: token ${TOKEN_PSW}" --upload-file ./installer-amd64 https://gitea.mattv.de/api/packages/root/generic/installer/${GIT_COMMIT}/installer-amd64'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user