atuin/Jenkinsfile
Sebastian Hugentobler 9e35d642b8
Some checks are pending
Build Multiarch Container Image / call-reusable-workflow (push) Waiting to run
try git ref
2025-06-03 19:32:22 +02:00

28 lines
973 B
Groovy

pipeline {
agent { label 'linux-aarch64' }
environment {
GIT_REF = """${sh(
returnStdout: true,
script: 'git describe --tags --exact-match 2>/dev/null || git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD'
).trim()}"""
}
stages {
stage('Build') {
when { tag "*" }
steps {
sh "podman build -t docker.io/thallian/atuin:${env.GIT_REF} ."
}
}
stage('Push') {
when { tag "*" }
steps {
withCredentials([usernamePassword(credentialsId: 'dockerhub', usernameVariable: 'REG_USERNAME', passwordVariable: 'REG_PASSWORD')]) {
sh '''
podman login docker.io -u $REG_USERNAME -p $REG_PASSWORD
podman push docker.io/thallian/atuin:${GIT_REF}
'''
}
}
}
}
}