🔥 Chore: Remove Jenkinsfile

The project no longer uses Jenkins, nor will it ever again
This commit is contained in:
James Musselman 2024-06-28 16:42:07 -05:00
parent 2db8edfe68
commit ff5f340d8c
No known key found for this signature in database
GPG key ID: 1DAEFF35ECB5D6DB

70
Jenkinsfile vendored
View file

@ -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"
}
}
}
}