Install sfdx plugins for Jenkins or github action #325
Pinned
gambe94
started this conversation in
Show and tell
Replies: 2 comments 8 replies
-
Thank you very much, very helpful |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello @scolladon & @gambe94 I'm having an issue using Git delta inside a Jenkins Pipeline.
I think I might miss a step in my pipeline but I don't what ... Here's my script:
|
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue
I experienced couple of times that sfdx plugin installation not work properly under the CI user.
In Jenkins pipeline
In Jenkins always run the agent with a Jenkins user.
And when we create our sfdx image where we want to install some plugins, it's tricky. Plugins are only available just for the user who installed them.
My solution in the docker file:
Github Action workflow
Option1
You need to include some environment variables in docker file before you install the plugins.
I used this image as a reference
My docker file:
Option2
Here my solution is more difficult, because I cannot manage to install the plugins inside of the docker container.
The problem is: when github action runs the container its true that is run as the root user. But its mount the workspace to root(docker) directory -> I think that's cause the issue that preinstalled plugin not working.
Check the official docs
How I managed to make it work:
Plugin not need to be installed in the docker image in this case
npm install --save-dev sfdx-git-delta
sfdx plugins:link node_modules/sfdx-git-delta
Example code for github action:
Beta Was this translation helpful? Give feedback.
All reactions