Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When triggered using Jenkins pipeline sfdx-git-delta is not recognized but recognized using Git Bash / Visual Studio Code / CMD #317

Closed
shrishrimal-swapnil opened this issue Jul 8, 2022 · 3 comments
Assignees
Labels
dependencies Pull requests that update a dependency file

Comments

@shrishrimal-swapnil
Copy link

Hello,

I am trying to integrate sfdx-git-delta plugins in my Jenkins CI / CD Pipeline. I have installed sfdx-git-delta plugin using below command.

sfdx plugins:install sfdx-git-delta

Post installation I have confirmed the same with sfdx plugins and I see the latest version has been installed.

image

I am able to get package/package.xml when I execute below command using either Visual Studio Code or Git Bash or CMD,

sfdx sgd:source:delta --to "HEAD" --from "HEAD^" --output .

However, when I use same commands in Jenkins pipeline, I get error message as mentioned below,

image

To debug the issue, I tried to echo installed plugins using "sfdx plugins" in Jenkins pipeline script and I see below message stating that "no plugins are installed"

image

I tried to navigate in Jenkins workspace using git bash and execute command to list sfdx plugins and I see the that latest plugin is installed.

Can anyone help me to understand what I am missing here ? As Jenkins is installed on the same machine on which SFDX CLI and sfdx-git-delta plugin is installed. Also, I have added path of SFDX CLI in Jenkins custom tool configuration.

Any help / suggestions are highly welcomed.

Thanks!

@scolladon
Copy link
Owner

Hi @shrishrimal-swapnil

Thanks for raising this issue !

This issue looks like a duplicate of this one right ?

@scolladon scolladon self-assigned this Jul 9, 2022
@scolladon scolladon added the dependencies Pull requests that update a dependency file label Jul 9, 2022
@shrishrimal-swapnil
Copy link
Author

Hi @scolladon

Thank you for your response.

I don't think this issue is duplicate of this one.

The plugin is installed on the same machine where Jenkins is installed and there is no Docker in the picture. Through Jenkins, I am just triggering command which should get sfdx plugin, but that is not the case. Using simple Git Bash or Visual Studio Code terminal the sfdx plugin shows list of plugins installed whereas if executed through Jenkins pipeline, it says no plugins installed.

@shrishrimal-swapnil
Copy link
Author

Hi @scolladon

Just an update. I tried below workaround and it did worked out for me.

Even though, the plugin is installed on my machine I installed it again through Jenkins pipeline and for subsequent execution it did not required plugin installation again.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants