crisward / dokku-clone

a dokku plugin for building an app from a cloned git repo
48 stars 9 forks source link

Cloning of tags broken? #22

Open ltalirz opened 3 years ago

ltalirz commented 3 years ago

I just noticed that cloning tags doesn't work for me (weird... I thought I tested it before, perhaps a recent change?):

It seems to fail because there is a check for refs/heads/master file in the git plugin:

$ dokku clone seekpath3 https://github.com/materialscloud-org/tools-seekpath v20.11.0
-----> Creating seekpath3...
...
-----> Creating seekpath3 from https://github.com/materialscloud-org/tools-seekpath v20.11.0
/var/lib/dokku/plugins/available/git/functions: line 172: /home/dokku/seekpath3/refs/heads/master: No such file or directory

Just to show that things work fine without the tag:

$ dokku clone seekpath2 https://github.com/materialscloud-org/tools-seekpath
-----> Creating seekpath2...
...
-----> Creating seekpath2 from https://github.com/materialscloud-org/tools-seekpath master
-----> Cleaning up...
-----> Building seekpath2 from dockerfile...
-----> Setting config vars
       DOKKU_DOCKERFILE_PORTS:  80
...
dokku report
$ dokku report
-----> uname: Linux dev-dokku 4.15.0-122-generic #124-Ubuntu SMP Thu Oct 15 13:03:05 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
-----> memory:
                     total        used        free      shared  buff/cache   available
       Mem:          32167        6750        4437          15       20980       25077
       Swap:             0           0           0
-----> docker version:
       Client: Docker Engine - Community
        Version:           19.03.13
        API version:       1.40
        Go version:        go1.13.15
        Git commit:        4484c46d9d
        Built:             Wed Sep 16 17:02:36 2020
        OS/Arch:           linux/amd64
        Experimental:      false

       Server: Docker Engine - Community
        Engine:
         Version:          19.03.13
         API version:      1.40 (minimum version 1.12)
         Go version:       go1.13.15
         Git commit:       4484c46d9d
         Built:            Wed Sep 16 17:01:06 2020
         OS/Arch:          linux/amd64
         Experimental:     false
        containerd:
         Version:          1.3.7
         GitCommit:        8fba4e9a7d01810a393d5d25a3621dc101981175
        runc:
         Version:          1.0.0-rc10
         GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
        docker-init:
         Version:          0.18.0
         GitCommit:        fec3683
-----> docker daemon info:
       Client:
        Debug Mode: true

       Server:
        Containers: 38
         Running: 20
         Paused: 0
         Stopped: 18
        Images: 430
        Server Version: 19.03.13
        Storage Driver: overlay2
         Backing Filesystem: extfs
         Supports d_type: true
         Native Overlay Diff: true
        Logging Driver: json-file
        Cgroup Driver: cgroupfs
        Plugins:
         Volume: local
         Network: bridge host ipvlan macvlan null overlay
         Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
        Swarm: inactive
        Runtimes: runc
        Default Runtime: runc
        Init Binary: docker-init
WARNING: No swap limit support
        containerd version: 8fba4e9a7d01810a393d5d25a3621dc101981175
        runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
        init version: fec3683
        Security Options:
         apparmor
         seccomp
          Profile: default
        Kernel Version: 4.15.0-122-generic
        Operating System: Ubuntu 18.04.5 LTS
        OSType: linux
        Architecture: x86_64
        CPUs: 8
        Total Memory: 31.41GiB
        Name: dev-dokku
        ID: 73QI:TDXC:BCRL:7V3Z:OIAI:F5BP:23MX:57OI:47VR:RYUK:EEHC:2FN6
        Docker Root Dir: /var/lib/docker
        Debug Mode: false
        Registry: https://index.docker.io/v1/
        Labels:
        Experimental: false
        Insecure Registries:
         127.0.0.0/8
        Live Restore Enabled: false

-----> sigil version: 0.6.0
-----> herokuish version:
       herokuish: 0.5.18
       buildpacks:
         heroku-buildpack-multi     v1.0.0
         heroku-buildpack-ruby      v218
         heroku-buildpack-nodejs    v175
         heroku-buildpack-clojure   v85
         heroku-buildpack-python    v177
         heroku-buildpack-java      v66
         heroku-buildpack-gradle    v31
         heroku-buildpack-scala     v87
         heroku-buildpack-play      v26
         heroku-buildpack-php       v179
         heroku-buildpack-go        v145
         buildpack-nginx            v14
-----> dokku version: dokku version 0.21.4
-----> dokku plugins:
       plugn: 0.5.0
         00_dokku-standard    0.21.4 enabled    dokku core standard plugin
         20_events            0.21.4 enabled    dokku core events logging plugin
         acl                  1.5.1 enabled    dokku plugin that can be used to restrict push privileges for app to certain users
         app-json             0.21.4 enabled    dokku core app-json plugin
         apps                 0.21.4 enabled    dokku core apps plugin
         builder-dockerfile   0.21.4 enabled    dokku core builder-dockerfile plugin
         builder-herokuish    0.21.4 enabled    dokku core builder-herokuish plugin
         buildpacks           0.21.4 enabled    dokku core buildpacks plugin
         certs                0.21.4 enabled    dokku core certificate management plugin
         checks               0.21.4 enabled    dokku core checks plugin
         clone                0.4.1 enabled    dokku git clone plugin
         common               0.21.4 enabled    dokku core common plugin
         config               0.21.4 enabled    dokku core config plugin
         docker-options       0.21.4 enabled    dokku core docker-options plugin
         domains              0.21.4 enabled    dokku core domains plugin
         enter                0.21.4 enabled    dokku core enter plugin
         git                  0.21.4 enabled    dokku core git plugin
         global-cert          0.4.5 enabled    manages a global certificate for dokku
         logs                 0.21.4 enabled    dokku core logs plugin
         network              0.21.4 enabled    dokku core network plugin
         nginx-vhosts         0.21.4 enabled    dokku core nginx-vhosts plugin
         plugin               0.21.4 enabled    dokku core plugin plugin
         postgres             1.11.5 enabled    dokku postgres service plugin
         proxy                0.21.4 enabled    dokku core proxy plugin
         ps                   0.21.4 enabled    dokku core ps plugin
         repo                 0.21.4 enabled    dokku core repo plugin
         resource             0.21.4 enabled    dokku core resource plugin
         scheduler-docker-local 0.21.4 enabled    dokku core scheduler-docker-local plugin
         shell                0.21.4 enabled    dokku core shell plugin
         ssh-keys             0.21.4 enabled    dokku core ssh-keys plugin
         storage              0.21.4 enabled    dokku core storage plugin
         tags                 0.21.4 enabled    dokku core tags plugin
         tar                  0.21.4 enabled    dokku core tar plugin
         trace                0.21.4 enabled    dokku core trace plugin
crisward commented 3 years ago

Have you tried adding .git to the end of the url. You should be using the git url, not the web address

eg. dokku clone seekpath3 https://github.com/materialscloud-org/tools-seekpath.git v20.11.0

ltalirz commented 3 years ago

thanks @crisward , I just tried and the result seems to be the same (I also leave in the intermediate messages now just for completeness):

$ dokku clone seekpath3 https://github.com/materialscloud-org/tools-seekpath.git v20.11.0
-----> Creating seekpath3...
-----> No matching configured domains for seekpath3 found in SSL certificate. Your app will show as insecure in a browser if accessed via SSL
-----> Please add appropriate domains via the dokku domains command
-----> Configured domains for app:
=====> matcloud.xyz
-----> Domains found in SSL certificate:
=====> *.matcloud.xyz
grep: /home/dokku/seekpath3/VHOST: No such file or directory
 !     No web listeners specified for seekpath3
-----> Creating seekpath3 from https://github.com/materialscloud-org/tools-seekpath.git v20.11.0
/var/lib/dokku/plugins/available/git/functions: line 172: /home/dokku/seekpath3/refs/heads/master: No such file or directory