Skip to content

Commit

Permalink
Merge pull request #83 from Fantom-foundation/ws/jenkinsfile
Browse files Browse the repository at this point in the history
Add Jenkinsfile
  • Loading branch information
wsodsong authored Sep 4, 2024
2 parents 23958dd + d765820 commit c86fdde
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 22 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/CI_UBUNTU.yaml

This file was deleted.

40 changes: 40 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
pipeline {
agent { label 'quick' }

options {
timestamps ()
timeout(time: 1, unit: 'HOURS')
}

environment {
GOROOT = '/usr/lib/go-1.21/'
GOMEMLIMIT = "5GiB"
}

stages {
stage('Validate commit') {
steps {
script {
def CHANGE_REPO = sh (script: "basename -s .git `git config --get remote.origin.url`", returnStdout: true).trim()
build job: '/Utils/Validate-Git-Commit', parameters: [
string(name: 'Repo', value: "${CHANGE_REPO}"),
string(name: 'Branch', value: "${env.CHANGE_BRANCH}"),
string(name: 'Commit', value: "${GIT_COMMIT}")
]
}
}
}

stage('Check Go sources formatting') {
steps {
sh 'diff=`gofmt -s -d .`; echo "$diff"; test -z "$diff"'
}
}

stage('Run go tests') {
steps {
sh 'go test ./... -timeout 30m'
}
}
}
}

0 comments on commit c86fdde

Please sign in to comment.