Add Jenkinsfile
All checks were successful
Cadoles/go-http-peering/pipeline/head This commit looks good
All checks were successful
Cadoles/go-http-peering/pipeline/head This commit looks good
This commit is contained in:
43
Jenkinsfile
vendored
Normal file
43
Jenkinsfile
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
@Library('cadoles@gitea-release') _
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
dockerfile {
|
||||
filename 'Dockerfile'
|
||||
dir 'misc/ci'
|
||||
}
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Release') {
|
||||
steps {
|
||||
script {
|
||||
def isPrerelease = true
|
||||
try {
|
||||
sh(script: "git describe --exact-match ${GIT_COMMIT}")
|
||||
isPrerelease = false
|
||||
} catch (err) {
|
||||
println "Could not find tag associated with commit '${GIT_COMMIT}' ! Generating a prerelease..."
|
||||
}
|
||||
|
||||
sh 'ARCH_TARGETS="amd64 arm arm64" make release'
|
||||
|
||||
def attachments = sh(returnStdout: true, script: 'ls release/*.tar.gz').split(' ')
|
||||
gitea.release('forge-jenkins', 'Cadoles', 'go-http-peering', [
|
||||
'attachments': attachments,
|
||||
'isDraft': false,
|
||||
'isPrerelease': isPrerelease,
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
cleanWs()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user