atuin/Jenkinsfile

29 lines
973 B
Text
Raw Normal View History

2025-03-06 16:03:07 +01:00
pipeline {
2025-06-03 19:10:54 +02:00
agent { label 'linux-aarch64' }
2025-06-03 18:52:56 +02:00
environment {
2025-06-03 19:03:17 +02:00
GIT_REF = """${sh(
returnStdout: true,
2025-06-03 19:14:47 +02:00
script: 'git describe --tags --exact-match 2>/dev/null || git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD'
2025-06-03 19:03:17 +02:00
).trim()}"""
2025-06-03 18:52:56 +02:00
}
2025-03-06 16:03:07 +01:00
stages {
2025-06-03 15:37:00 +00:00
stage('Build') {
2025-06-03 19:17:12 +02:00
when { tag "*" }
2025-03-06 16:03:07 +01:00
steps {
2025-06-03 19:21:46 +02:00
sh "podman build -t docker.io/thallian/atuin:${env.GIT_REF} ."
2025-03-06 16:03:07 +01:00
}
}
2025-06-03 19:32:22 +02:00
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}
'''
}
}
}
2025-03-06 16:03:07 +01:00
}
2025-06-03 18:38:40 +02:00
}