25 lines
590 B
Groovy
25 lines
590 B
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('build') {
|
|
steps {
|
|
checkout scm
|
|
script {
|
|
sh 'git rev-parse HEAD > commit'
|
|
def gitCommit = readFile('commit').trim()
|
|
def registryHost = "registry.terrible.network"
|
|
def imageName = "${registryHost}/terribleplan/mopidy"
|
|
|
|
// build
|
|
def app = docker.build("${imageName}:${gitCommit}")
|
|
// beta push
|
|
docker.withRegistry("https://${registryHost}", "registry-terrible-network") {
|
|
app.push("latest")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|