Skip to content

Commit

Permalink
FABN-1193 Update CI Scripts
Browse files Browse the repository at this point in the history
This patch fix the errors observed in fabric-sdk-node
merge jobs. Also, update the documentation.

Change-Id: I3c694328691c183c0118ef886a10af565a840f11
Signed-off-by: rameshthoomu <[email protected]>
  • Loading branch information
rameshthoomu committed Mar 26, 2019
1 parent 1a7a53f commit 0a95259
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
16 changes: 11 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ timestamps { // set the timestamps on the jenkins console
} // End node
} else {
node ('hyp-x') { // trigger jobs on x86_64 builds nodes
// LF team has to install the newer version in Jenkins global config
// Send an email to [email protected] to add newer version
def nodeHome = tool 'nodejs-8.14.0'
env.GOPATH = "$WORKSPACE/gopath"
env.PATH = "$GOPATH/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:${nodeHome}/bin:$PATH"
Expand Down Expand Up @@ -62,11 +64,13 @@ def buildStages() {
env.GOROOT = "/opt/go/go" + props["GO_VER"] + ".linux." + "$MARCH"
env.GOPATH = "$GOPATH/bin"
env.PATH = "$GOROOT/bin:$GOPATH/bin:$PATH"
// call buildFabric to clone and build images
// Clone fabric repository
fabBuildLibrary.cloneScm('fabric', '$GERRIT_BRANCH')
// Build fabric images
fabBuildLibrary.fabBuildImages('fabric', 'docker')
// call buildFabric to clone and build images
// Clone fabric-ca repository
fabBuildLibrary.cloneScm('fabric-ca', '$GERRIT_BRANCH')
// Build fabric-ca docker images
fabBuildLibrary.fabBuildImages('fabric-ca', 'docker')
// Pull Docker Images from nexus3
fabBuildLibrary.pullDockerImages(props["FAB_BASE_VERSION"], props["FAB_IMAGES_LIST"])
Expand Down Expand Up @@ -103,7 +107,7 @@ def buildStages() {
}

// Publish npm modules only from amd64 merge jobs
if ((env.JOB_TYPE == "merge") && (env.MARCH = "amd64")) {
if (env.JOB_TYPE == "merge" && env.MARCH == "amd64") {
publishNpm()
apiDocs()
} else {
Expand Down Expand Up @@ -135,12 +139,13 @@ if ((env.JOB_TYPE == "merge") && (env.MARCH = "amd64")) {
def publishNpm() {
// Publish npm modules after successful merge
stage("Publish npm Modules") {
def ROOTDIR = pwd()
sh 'echo "-------> Publish npm Modules"'
withCredentials([[$class : 'StringBinding',
credentialsId: 'NPM_LOCAL',
variable : 'NPM_TOKEN']]) {
try {
dir("$ROOTDIR/$PROJECT_DIR/scripts/ci_script") {
dir("$ROOTDIR/$PROJECT_DIR/scripts/ci_scripts") {
sh './ciScript.sh --publish_NpmModules'
}
} catch (err) {
Expand All @@ -155,13 +160,14 @@ def publishNpm() {
def apiDocs() {
// Publish SDK_NODE API docs after successful merge
stage("Publish API Docs") {
def ROOTDIR = pwd()
sh 'echo "--------> Publish API Docs"'
withCredentials([[$class : 'UsernamePasswordMultiBinding',
credentialsId: 'sdk-node-credentials',
usernameVariable: 'NODE_SDK_USERNAME',
passwordVariable: 'NODE_SDK_PASSWORD']]) {
try {
dir("$ROOTDIR/$PROJECT_DIR/scripts/ci_script") {
dir("$ROOTDIR/$PROJECT_DIR/scripts/ci_scripts") {
sh './ciScript.sh --publish_ApiDocs'
}
}
Expand Down
Binary file removed docs/images/sdk-node-pipeline-flow.png
Binary file not shown.
Binary file added docs/images/sdk-node-pipeline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/sdk-node-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ the pipeline job configuration template here https://ci-docs.readthedocs.io/en/l

## CI Pipeline flow

![](sdk-node-pipeline-flow.png)
![](images/sdk-node-pipeline.png)

- Every Gerrit patchset triggers a verify job and run the below tests from the `Jenkinsfile`

Expand Down Expand Up @@ -82,7 +82,7 @@ build jobs are progressing.
Developer can post below comments to trigger the particular failed build:

reverify-x or reverify - to restart the build on sdk-node-verify x86_64 platform.
remerge-x or remerge - to restart the build on sdk-node-verify x86_64 platform.
remerge-x or remerge - to restart the build on sdk-node-merge x86_64 platform.

#### Where to see the output of the stages?

Expand Down

0 comments on commit 0a95259

Please sign in to comment.