Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhquang111 committed Sep 5, 2024
1 parent a4d3c5a commit 752c40c
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
pipeline {
agent any
tools {
go 'go1.22'
}
stages {
stage('Checkout') {
steps {
// Checkout your code from your version control system
git 'https://github.com/your-username/your-repo.git'
}
}

stage('Build') {
steps {
// Run tests
sh 'go test ./...'

// Build the project
sh 'go build -o myapp'
}
}

stage('Archive') {
steps {
// Archive the built artifact
archiveArtifacts artifacts: 'myapp', fingerprint: true
}
}
}

post {
always {
// Clean up workspace
cleanWs()
}
}
}

0 comments on commit 752c40c

Please sign in to comment.