🔥 Chore: Remove Jenkinsfile
The project no longer uses Jenkins, nor will it ever again
This commit is contained in:
parent
2db8edfe68
commit
ff5f340d8c
1 changed files with 0 additions and 70 deletions
70
Jenkinsfile
vendored
70
Jenkinsfile
vendored
|
@ -1,70 +0,0 @@
|
|||
pipeline {
|
||||
agent {
|
||||
label 'podman'
|
||||
}
|
||||
tools {
|
||||
go '1.21.1'
|
||||
}
|
||||
environment {
|
||||
registry = "docker.io/notatio/notatio"
|
||||
registryCredential = 'docker-hub-credentials'
|
||||
podmanImage = ''
|
||||
}
|
||||
stages {
|
||||
stage('Clone repository') {
|
||||
steps {
|
||||
git branch: 'main', credentialsId: 'codeberg-musselman-builder-jenkins', url: 'https://codeberg.org/Musselman/Notatio.git'
|
||||
}
|
||||
}
|
||||
stage('Retrieve Git tag') {
|
||||
steps {
|
||||
script {
|
||||
def tagOutput = sh(script: 'git describe --abbrev=0 --tags || true', returnStdout: true).trim()
|
||||
if (tagOutput.isEmpty() || tagOutput.equals("fatal: No names found, cannot describe anything.")) {
|
||||
TAG = 'latest' // Set a default tag if no tags are found
|
||||
echo "No tags found, using default tag: ${TAG}"
|
||||
} else {
|
||||
TAG = tagOutput
|
||||
echo "Latest tag found: ${TAG}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
echo 'Building..'
|
||||
sh 'go build'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
echo 'Testing..'
|
||||
echo 'No Testing to do currently..'
|
||||
}
|
||||
}
|
||||
stage('Building image') {
|
||||
steps {
|
||||
script {
|
||||
sh "podman build -t notatio ."
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Push image') {
|
||||
steps {
|
||||
script {
|
||||
withCredentials([usernamePassword(credentialsId: registryCredential, passwordVariable: 'REGISTRY_PASSWORD', usernameVariable: 'REGISTRY_USERNAME')]) {
|
||||
sh "podman login -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD docker.io"
|
||||
sh "podman push notatio $registry:${TAG}"
|
||||
sh "podman logout $registry"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Cleanup') {
|
||||
steps {
|
||||
sh "podman rmi -a -f"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue