completed = 'Completed.'
failed = 'Failed'
-node {
+node ('nordix-nsm-build-ubuntu1804') {
build_number = env.BUILD_NUMBER
workspace = env.WORKSPACE
ws("${workspace}/${build_number}") {
stage('Unit Tests') {
try {
SetBuildStatus(in_progress, context, pending)
- sh 'make test'
+ sh '''
+ . \${HOME}/.profile
+ make test
+ '''
SetBuildStatus(completed, context, success)
} catch (Exception e) {
SetBuildStatus(failed, context, failure)
stage('Linter') {
try {
SetBuildStatus(in_progress, context, pending)
- sh 'make lint'
+ sh '''
+ . \${HOME}/.profile
+ make lint
+ '''
SetBuildStatus(completed, context, success)
} catch (Exception e) {
SetBuildStatus(failed, context, failure)
SetBuildStatus(in_progress, context, pending)
stage('go mod tidy') {
try {
- sh 'go mod tidy'
+ sh '''
+ . \${HOME}/.profile
+ go mod tidy
+ '''
if (GetModifiedFiles() != '') {
throw new Exception(exception_message)
}
}
stage('go generate ./...') {
try {
- sh 'make generate'
+ sh '''
+ . \${HOME}/.profile
+ make generate
+ '''
if (GetModifiedFiles() != '') {
throw new Exception(exception_message)
}