Hi I am new to Jenkins and at present exploring the Continuous Integration feature using a Jenkins Pipeline project. I use this to perform a Spyglass Build on my FPGA vivado project. The jenkins file script runs once i push any change in my GitLab vivado project. If I run the commands on lsf grid terminal(remote desktop) it works fine. Here is my Jenkins script.
pipeline {
agent {
// runs on lsf
label 'grid'
}
options {
timestamps()
timeout(time: 800, unit: 'MINUTES')
buildDiscarder(logRotator(artifactDaysToKeepStr: '14', artifactNumToKeepStr: '7', daysToKeepStr: '14', numToKeepStr: '7'))
}
environment {
spyglass_git="${WORKSPACE}/users/marvels/spyglass_work_dir_2"
}
stages {
stage('Build and run') {
steps { // use shell commands
sh label: '', script: '''#!/bin/bash
module load git/2_22_0
git lfs install
git submodule foreach git lfs pull
git submodule update --recursive --remote
module load lsf
module load spyglass/M_2017_03_SP2
bsub -Is -q i_soc_rh7 -R "rusage[mem=25600]" sg_shell
open_project /users/marvels/spyglass_work_dir_2/captain_120.prj
source spyglass.tcl
'''
}
}
}
}
sg_shell is the spyglass tool terminal. Here I am trying to open a spyglass terminal and then run the spyglass commands. The tcl file also has some spyglass rules to perform the analysis on the opened proj. I get the following error after the jenkins pipeline is built. I have copied a part of the log file here.
15:30:29 [Pipeline] // stage
15:30:29 [Pipeline] withEnv
15:30:29 [Pipeline] {
15:30:29 [Pipeline] withEnv
15:30:29 [Pipeline] {
15:30:29 [Pipeline] timestamps
15:30:29 The timestamps step is unnecessary when timestamps are enabled for all Pipeline builds.
15:30:29 [Pipeline] {
15:30:29 [Pipeline] timeout
15:30:29 Timeout set to expire in 13 hr
15:30:29 [Pipeline] {
15:30:29 [Pipeline] stage
15:30:29 [Pipeline] { (Build and run)
15:30:29 [Pipeline] sh
15:30:29 Updated git hooks.
15:30:29 Git LFS initialized.
15:31:38 Job <26375005> is submitted to queue <i_soc_rh7>.
15:31:38 <<Waiting for dispatch ...>>
15:31:38 <<Starting on oulng200>>
15:31:38 +------------------------------------------------------------------+
15:31:38 | |
15:31:38 | SpyGlass Predictive Analyzer(R) - |
15:31:38 | Last compiled on Aug 24 2017 |
15:31:38 | |
15:31:38 | All Rights Reserved. |
15:31:38 | without prior written permission of Synopsys Inc. is prohibited. |
15:31:38 | Technical support: email spyglass_support@synopsys.com. |
15:31:38 +------------------------------------------------------------------+
15:31:38
15:31:38 To access quickstart manual, please use `man quickstart'
15:31:38
15:31:38 /userwork10/socci_lsf/jenkins-slaves/sochw-oulnxc58/workspace/Examples/test1_tmp/durable-c699ec59/script.sh: line 12: open_project: command not found
15:31:38 ./spyglass.tcl: line 3: read_file: command not found
15:31:38 ./spyglass.tcl: line 6: set_option: command not found
15:31:38 ./spyglass.tcl: line 7: set_option: command not found
15:31:38 ./spyglass.tcl: line 8: set_option: command not found
I am not sure what the error is. Is the sg_shell not opened for the commands to run? Also i had one more query. If i want to run these commands on my lsf grid where do i mention the build path?Will that solve my issue?