Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Jenkins CI/CD pipeline failure for a gitlab proj build.

Status
Not open for further replies.

dipk11

Junior Member level 2
Joined
Jul 27, 2017
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
245
Hi i am new to using Jenkins CI/CD. I am using a Vnc server to connect to a remote Linux PC. I have a fpga project on gitlab which is cloned properly to my local repository. I used webhooks so that anything that is pushed inside the remote repository on the github, the jenkins script is triggered and the project is build.

Below is my jenkins script written in a Jenkinsfile which is a part of my project on the Gitlab.

Code:
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}"

    }
    stages {
        stage('Build and run') {
            steps { // use shell commands
                sh label: '', script: '''#!/bin/bash
                    module load lsf
                    module load spyglass/M_2017_03_SP2
                    bsub -Is -q i_soc_rh7 -R "rusage[mem=25600]" spyglass
                    source spyglass.tcl
                    '''
            }
        }

        }


    post {
        always {
            script{
                // when testcase fails
                if(manager.logContains('.*failed at.*')) {
                    manager.addWarningBadge("Some FHSS testcases failed! Check logs for details.")
                    manager.buildFailure()       
                }
            cleanWs()
            }
                       
        }
    }
}

This pipeline fails giving the below error.
16:36:08 Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing
16:36:08 Perhaps you forgot to surround the code with a step that provides this, such as: node
\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.\n

I am unable to understand the error. Also if anybody here knows how to use jenkins pipeline, how can i change my workspace to a folder on my vnc machine \Results?
At present it is running on oulnxc58.emea.nsn-net.net in /userwork10/socci_lsf/jenkins-slaves/sochw-oulnxc58/workspace/Examples/test1
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top