rundeck-plugins / git-plugin

10 stars 21 forks source link

Support for symlinks in git repo #1

Closed kincl closed 6 years ago

kincl commented 6 years ago

It looks like the git plugin when checking out a repository with symlinks does not create the symlink on the filesystem but instead just creates a file with the destination which I think is what git is tracking internally.

ltamaster commented 6 years ago

Hi @kincl ,

I tested the plugin using a symlink and it worked OK, can you share your job or explain further your use case.

Thanks Luis

kincl commented 6 years ago

Hi @ltamaster

Sure so here is a simple job that shows what I am talking about. In the example b.txt should be a symlink to test1/a.txt but file returns b.txt: ASCII text, with no line terminators. The repo is https://github.com/kincl/test-symlinks

- defaultTab: summary
  description: ''
  executionEnabled: true
  id: 941e4e18-95c4-46b0-8da7-99f149c29dea
  loglevel: INFO
  name: test-symlinks
  nodeFilterEditable: false
  scheduleEnabled: true
  sequence:
    commands:
    - configuration:
        gitBaseDirectory: /tmp/test-symlinks
        gitBranch: master
        gitUrl: ssh://git@github.com/kincl/test-symlinks
        strictHostKeyChecking: 'no'
      nodeStep: false
      type: git-clone-step
    - script: |-
        #!/bin/bash
        ls -l /tmp/test-symlinks
        cat /tmp/test-symlinks/b.txt
        file /tmp/test-symlinks/b.txt
    keepgoing: false
    strategy: node-first
  uuid: 941e4e18-95c4-46b0-8da7-99f149c29dea
ltamaster commented 6 years ago

Hi @kincl

Fixed with https://github.com/rundeck-plugins/git-plugin/releases/tag/1.0.2

Luis