From: robert.tomczyk Date: Thu, 8 Sep 2022 17:26:30 +0000 (+0100) Subject: NSM: Update Jenkinsfile for meridio X-Git-Url: https://gerrit.nordix.org/gitweb?a=commitdiff_plain;h=0f89335a552847b2e169ee52048a486fb7f3ba2e;p=infra%2Fcicd.git NSM: Update Jenkinsfile for meridio - Specify correct build server: nordix-nsm-build-ubuntu1804 - Source profile with correct PATH for go binary Change-Id: I0ffc80cf49492865e592d710875761a6c9d08586 --- diff --git a/jjb/nsm/Jenkinsfile b/jjb/nsm/Jenkinsfile index 722467629..4362fc663 100644 --- a/jjb/nsm/Jenkinsfile +++ b/jjb/nsm/Jenkinsfile @@ -24,7 +24,7 @@ in_progress = 'In Progress.' completed = 'Completed.' failed = 'Failed' -node { +node ('nordix-nsm-build-ubuntu1804') { build_number = env.BUILD_NUMBER workspace = env.WORKSPACE ws("${workspace}/${build_number}") { @@ -97,7 +97,10 @@ def UnitTests() { 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) @@ -114,7 +117,10 @@ def Linter() { 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) @@ -136,7 +142,10 @@ def GeneratedCode() { 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) } @@ -149,7 +158,10 @@ def GeneratedCode() { } stage('go generate ./...') { try { - sh 'make generate' + sh ''' + . \${HOME}/.profile + make generate + ''' if (GetModifiedFiles() != '') { throw new Exception(exception_message) }