Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Upgrade dependencies & Fix Jenkins stages #45

Merged
merged 11 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ pipeline {
deleteDir()
gitCheckout(basedir: "${BASE_DIR}", githubNotifyFirstTimeContributor: true)
stash allowEmpty: true, name: 'source', useDefaultExcludes: false
dir("${BASE_DIR}"){
setEnvVar('GO_VERSION', readFile(".go-version").trim())
}
}
}
stage('Lint'){
stage('Check'){
steps {
withGithubNotify(context: "Lint") {
dir("${BASE_DIR}"){
withGoEnv(){
sh(label: 'lint', script: '''
go mod tidy && git diff --exit-code
gofmt -l . | read && echo "Code differs from gofmt's style. Run 'gofmt -w .'" 1>&2 && exit 1 || true
''')
sh(label: 'Go vet', script: 'go vet')
withGithubNotify(context: "Check") {
withMageEnv(version: "${env.GO_VERSION}"){
dir("${BASE_DIR}"){
cmd(label: 'mage notice', script: 'mage notice')
cmd(label: 'mage check', script: 'mage check')
}
}
}
Expand All @@ -67,8 +67,8 @@ pipeline {
}
unstash 'source'
dir("${BASE_DIR}"){
withGoEnv(){
cmd(label: 'Go build', script: 'go build')
withMageEnv(version: "${env.GO_VERSION}"){
cmd(label: 'Go build', script: 'mage build')
}
}
}
Expand Down
Loading