Create Jenkinsfile

This commit is contained in:
DeFranco13 2023-09-18 17:43:06 +02:00 committed by GitHub
commit dcbf6e9d19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

39
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,39 @@
pipeline {
agent any
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Build Go Application') {
steps {
sh 'go get -u github.com/bettercap/bettercap'
sh 'go build -o myapp main.go'
}
}
stage('Run Bettercap') {
steps {
sh './bettercap <options>'
}
}
stage('Publish Artifacts') {
steps {
archiveArtifacts artifacts: 'myapp'
}
}
}
post {
success {
echo 'Build successful!'
}
failure {
echo 'Build failed!'
}
}
}