Jump to content

Evgeny

Members
  • Posts

    17
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Evgeny

  1. Thank you for documentation link. Instructions on manual installation helped.

     

    Automatic installation doesn't work for me.

    And you have wrong path in documentation: ${INSTALL_DIR}/intellij_plugin/plastic4idea.jar. It's actually was ${INSTALL_DIR}/client/intellij12/plastic4idea.jar

  2. In older versions it was installed automatically. But I turned it off because of lags.

    I wanted to try it now, but can't find it anywhere. 

    Reinstalled Plastic with IntelliJ plugin, but there are nothing in Rider Plugins.

     

    Plastic version

    10.0.16.5953

    Rider version

    JetBrains Rider 2020.3.4
    Build #RD-203.7717.10, built on March 17, 2021
     

  3. I added all paths to the Agent Path variable and cm began to work trough the shell. It worth mentioning, that you can't add just Plastic path, as it will replace all other paths and event "sh" wouldn't be found.

    But cm command from Jenkins Plugin are still failing with the same error.

  4. Jenkins server is running on Windows and i'm trying to setup agent on MacOS. So i can't use absolute path to cm - that will brake all windows builds.

    What i tryed

    - Reinstall Plastic under Jenkins user (Should'n this add cm to Path?)

    - Add Plastic to /etc/paths 

    /usr/local/bin
    /usr/bin
    /bin
    /usr/sbin
    /sbin
    /Applications/PlasticSCM.app/Contents/MonoBundle

    And it didn't work

    bizon:TestScripts jenkins$ echo $PATH
    /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin
    bizon:TestScripts jenkins$ sudo open /etc/paths

    - I tryed to execute cm in Bash (under Jenkins user) and it works. It seems, that cm is added to Path, but it only visible from Bash. And not visible from scripts.

  5. Maybe i did something wrong on the mac?

    I just did another test.

    Shell script executed from Jenkins pipeline "cm worspace create ..." returned "cm: command not found"

    [Pipeline] sh
    + cm workspace create hc-smf-living-pictures-client /Volumes/LittleBigBOSS/JA1/workspace/hc-smf/hc-smf-living-pictures-client/hc-smf-living-pictures-client --repository=hc-smf/hc-smf-living-pictures-client@__@cloud
    /Volumes/LittleBigBOSS/JA1/workspace/hc-smf/hc-smf-living-pictures-client@tmp/durable-62867457/script.sh: line 1: cm: command not found

    I copyed the same command in bash and executed it manually and worspace was succesfully created

    bizon:TestScripts jenkins$ cm workspace create hc-smf-living-pictures-client /Volumes/LittleBigBOSS/JA1/workspace/hc-smf/hc-smf-living-pictures-client/hc-smf-living-pictures-client --repository=hc-smf/hc-smf-living-pictures-client@__@cloud
    Workspace hc-smf-living-pictures-client has been correctly created

    What am i missing?

  6. I'm trying to setup iOS build on MacOS and checkout are failing with following error

    [TestScripts] $ cm lwk --format={wkname}#{path}#{wkid}
    FATAL: Cannot run program "cm" (in directory "/Volumes/LittleBigBOSS/JA1/workspace/TestJobs/TestScripts"): error=2, No such file or directory

     

    Pipeline script is very simple and it works if i launch it on Windows Node

    node('iOS')
    {
        cm branch: context.BranchName, repository: context.SCMRepository, server: context.SCMServer
    }

     

    I checked all steps manually and they works.

    1. cd to the path "/Volumes/LittleBigBOSS/JA1/workspace/TestJobs/TestScripts"
    2. launched command "cm lwk --format={wkname}#{path}#{wkid}"

    Here are shell log for this:

    Last login: Fri May 15 23:28:59 on ttys000
    bizon:~ admin$ cd /Volumes/LittleBigBOSS/JA1/workspace/TestJobs/TestScripts
    bizon:TestScripts admin$ cm lwk --format={wkname}#{path}#{wkid}
    default#/Users/admin/wkspaces/default#8b1b592b-f895-4377-b118-d4f1fa7fcbd0
    bizon:TestScripts admin$ 
    
    

    PS

    Noticed, that i previously opened shell from admin user. Repeated test, using Jenkins user with same results

  7. As i said earlier - i solved my problem by defining 2 different libraries in Jenkins Settings. I'm ok with this workaround. So we can close this topic :)

     
    In case, you want to investigate this further:
    version selection doesn't work as they propose in the previous link for legacy SCM. I tested it with:
    - Plastic - returns errors in selector
    - Github (legacy SCM) - just checksout latest changeset (regardless of brunch)
     
    I didn't find any references to someone using library versions on legacy SCM and decided that this is a Jenkins bug, but i didn't created issue on their bug tracker
     
     
    • Like 1
  8. I tryed the same setup with GitHub and it didn't work either. It just checkout the latest changeset. So it looks like some bug in Jenkins.

     

    I added 2 different libraries that point to a different branches of the same repository. So now i can't use "Load implicitly" setting, but i can switch shared library on certain jobs to development branch.

  9. Hi,

     

    I'm currently trying to setup shared libraries to use different versions. 

    Example use-case: Test job, that will use /main/development branch, where i can experiment with shared libraries and not ruining all production jobs.

     

    1) First of all i tryed to set branch explicitly to "/main/development":

    image.png.d38a04b360b2beef9e3d397c5bf02dd1.png

    It works, as expected. But i can't see this selector in Jenkins log. Log looks loke this, and only in changesets i can see, that new selector actually worked

    image.thumb.png.8e52fc6ca86c3d17153a1bb5023bd890.png

     

    2) After that a tryed to setup lybrary versions for legacy SCM, as described in documentation (https://www.jenkins.io/doc/book/pipeline/shared-libraries/)

    Here are shared libraries settings:

    image.thumb.png.91849208a294434cfd284d73528d0454.png

     

    Build fails with the same error. I tryed:

    - Default version = "/main"

    - Default version = "/main/development"

    - @Library('Default@main/development') in pipeline script

     

    Maybe i'm making some stupid error in setup, but i have no means to debug that, as i can't get final selector from log.

    image.thumb.png.7bdf6e5e6d76bab5a1e14f0cc75d3455.png

    Log shows only last succesful selector, and that new selector are saved to txt file, that instantly gets deleted.

    I checked, that both selectors ("/main" and "/main/development"), written explicitly in settings - works as expected. But "${library.Default.version}" shows an error.

     

    What i'm doing wrong? Or how i can see actual selector, that are generated in txt file?

×
×
  • Create New...