0

I'm new to jenkins . I have written a jenkins pipeline to create blockchain network using HLF Operator. I've installed kubectl on the vm and used it as node in jenkins. The kubectl commands and other work fine but I'm facing issues when it comes to krew.

If I run the pipeline stages steps with

 stage('Install Krew HLF'){
    steps{
        script{
            sh 'export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" && kubectl krew install hlf '
        }
    }

But when I use the command without the export part , it fails.

How am I supposed to tackle this.

1
  • This got resolved . The issue was with the path variable . I made these changes in my pipeline. environment{ PATH = "${PATH}:/home/xyz/.krew/bin" } Feb 22 at 14:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.