drone / go-convert

Package convert provides tools for converting pipeline configuration files to the Drone format.
Apache License 2.0
10 stars 8 forks source link

Drone downgrade does not honor `-project` flag #6

Closed jimsheldon closed 1 year ago

jimsheldon commented 1 year ago

Steps to reproduce

  1. Create example.yml

    kind: pipeline
    name: example
    type: docker
    
    steps:
    - name: echo
     image: busybox
     commands: [echo hello]
  2. Run go-convert
    $ go-convert drone -downgrade -project example example.yml
    pipeline:
     identifier: default
     name: default
     orgIdentifier: default
     projectIdentifier: default
     properties:
       ci:
         codebase:
           build: <+input>
     stages:
     - stage:
         identifier: example
         name: example
         spec:
           cloneCodebase: true
           execution:
             steps:
             - step:
                 identifier: echo
                 name: echo
                 spec:
                   command: echo hello
                   image: busybox
                 timeout: ""
                 type: Run
           platform:
             arch: Amd64
             os: Linux
           runtime:
             spec: {}
             type: Cloud
         type: CI

    Notice that projectIdentifier is default when it should be example.

bradrydzewski commented 1 year ago

should be fixed by https://github.com/drone/go-convert/commit/645061fbf98be64f3504affc6d61e4aad51e24f7

jimsheldon commented 1 year ago

Looks good!