Skip to content

Commit

Permalink
ft(ci): jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhantprateek committed Sep 9, 2023
1 parent 9401f57 commit a13ea81
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
pipeline {
agent any
tools{
go 'go1.20'
}

environment {
GO114MODULE = 'on'
CGO_ENABLED = 0
}

stages{
stage('Build') {
steps {
echo 'Installing dependencies'
sh 'go version'
sh 'go mod download'
}
}
}

stages('Test') {
steps {
echo 'Running Test'
sh 'go test ./...'
}
}
post {
always {
emailext body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}",
recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']],
to: "${params.RECIPIENTS}",
subject: "Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}"

}
}
}

0 comments on commit a13ea81

Please sign in to comment.