2023-04-03 15:28:16 +00:00
|
|
|
library 'status-jenkins-lib@v1.7.0'
|
|
|
|
|
2022-06-19 21:50:37 +00:00
|
|
|
pipeline {
|
|
|
|
agent {
|
2023-04-03 15:28:16 +00:00
|
|
|
label 'linux && nix-2.11 && x86_64'
|
2022-06-19 21:50:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
options {
|
|
|
|
timestamps()
|
|
|
|
disableConcurrentBuilds()
|
|
|
|
buildDiscarder(logRotator(
|
|
|
|
numToKeepStr: '10',
|
|
|
|
daysToKeepStr: '30',
|
|
|
|
))
|
|
|
|
}
|
|
|
|
|
|
|
|
environment {
|
2023-04-03 15:28:16 +00:00
|
|
|
TARGET = 'tests'
|
2022-06-19 21:50:37 +00:00
|
|
|
GOPATH = "${env.HOME}/go"
|
|
|
|
PATH = "${env.PATH}:${env.GOPATH}/bin"
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Lint') {
|
2023-04-03 15:28:16 +00:00
|
|
|
steps { script {
|
|
|
|
nix.develop('make lint', pure: false)
|
|
|
|
} }
|
2022-06-19 21:50:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stage('Test') {
|
2023-04-03 15:28:16 +00:00
|
|
|
steps { script {
|
|
|
|
nix.develop('make test-ci', pure: false)
|
|
|
|
} }
|
2022-06-19 21:50:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
2023-04-03 15:28:16 +00:00
|
|
|
always { script { /* No artifact but a PKG_URL is necessary. */
|
|
|
|
env.PKG_URL = "${currentBuild.absoluteUrl}consoleText"
|
|
|
|
} }
|
|
|
|
success { script { github.notifyPR(true) } }
|
|
|
|
failure { script { github.notifyPR(false) } }
|
|
|
|
cleanup { cleanWs() }
|
2022-06-19 21:50:37 +00:00
|
|
|
}
|
|
|
|
}
|