HazAT / badge

Add a badge to your app icon
MIT License
966 stars 87 forks source link

Jenkins can't find imagemagick #117

Closed sweepty closed 2 years ago

sweepty commented 2 years ago

I installed librsvg, imagemagick, graphicsmagick on my jenkins machine. It works well in command line, but the error occurs when using jenkins. What's problem in my case? Help me.

My jenkins machine is MacBook Pro(2021), Apple M1 Pro chip. Here's my log and settings.

jenkins console log

14:19:10 [14:19:10]: -----------------------
14:19:10 [14:19:10]: --- Step: add_badge ---
14:19:10 [14:19:10]: -----------------------
14:19:10 [14:19:10]: Install RSVG to get better results for shields on top of your icon
14:19:10 [14:19:10]: 
14:19:10 [14:19:10]: Install it using (RSVG):
14:19:10 [14:19:10]: $ brew install librsvg
14:19:10 [14:19:10]: 
14:19:10 [14:19:10]: You have to install ImageMagick or GraphicsMagick to use `badge`
14:19:10 [14:19:10]: 
14:19:10 [14:19:10]: Install it using (ImageMagick):
14:19:10 [14:19:10]: $ brew install imagemagick
14:19:10 [14:19:10]: 
14:19:10 [14:19:10]: Install it using (GraphicsMagick):
14:19:10 [14:19:10]: $ brew install graphicsmagick
14:19:10 [14:19:10]: 
14:19:10 [14:19:10]: If you don't have homebrew, visit [http://brew.sh](http://brew.sh%1B[0m/)
14:19:11 +------------------------------------+-------------------------------------------------------------------------+
14:19:11 [14:19:11]: Install ImageMagick and start your lane again!

.zshrc environment variable settings

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home
export PATH=${PATH}:$JAVA_HOME/bin 

PATH=$PATH:/usr/local/bin
export PATH=/opt/homebrew/bin:$PATH

brew list

aom         imagemagick@6       libyaml
brotli          imath           little-cms2
ca-certificates     jasper          lzo
cairo           jbig2dec        m4
cocoapods       jpeg            mpdecimal
docbook         jpeg-xl         openexr
docbook-xsl     libde265        openjpeg
fastlane        libffi          openssl@1.1
fontconfig      libheif         pango
freetype        libidn          pcre
fribidi         liblqr          pixman
gdbm            libomp          pkg-config
gdk-pixbuf      libpng          python@3.9
gettext         libpthread-stubs    readline
ghostscript     librsvg         ruby
giflib          libtiff         shared-mime-info
glib            libtool         sqlite
gnu-getopt      libvmaf         terminal-notifier
gobject-introspection   libx11          webp
graphicsmagick      libxau          x265
graphite2       libxcb          xmlto
harfbuzz        libxdmcp        xorgproto
icu4c           libxext         xz
imagemagick     libxrender
HazAT commented 2 years ago

This is almost certainly an environment issue with your Jenkins installation / runtime.

HazAT commented 2 years ago

Did you add this to your job environment? PATH=$PATH:/usr/local/bin

sweepty commented 2 years ago

Yes I did. But it still not working. I agree with you that this is a Jenkins environment issue. For a few days, I looked for a solution, but I have not found it yet.. So I removed badge action in my fastfile, and added a new AppIcon asset applied badge action to my project. Thanks for your help.