appleboy / drone-minio

Drone plugin to upload or remove filesystems and object storage.
MIT License
5 stars 0 forks source link

Missing example in readme / Documentation #2

Open matEhickey opened 5 years ago

matEhickey commented 5 years ago

Hello, I can't achieve to find a documentation/examples about this pluggin.

I went looking to sources to find informations about how to use, but i'm still unexperienced with drone itself so to plugin developement..

What I achieve to produce now look like:

  - name: upload
    image: appleboy/minio
    settings:
      url: https://minio.ownserver.com
      access-key:
        from_secret: minio_access_key
      secret-key:
        from_secret: minio_secret_key
      path: /bucket/file
      actions: ???

but I can't find a clear definition of the arguments

I achieve to find a quich description and the types of all the fields in https://github.com/appleboy/drone-minio/blob/master/main.go:

actions : StringSlice
url : String
access-key : String
secret-key : String
quiet : Bool
no-color : Bool
debug : Bool
json : Bool
insecure : Bool
force : Bool
recursive : Bool
dangerous : Bool
incomplete : Bool
encrypt-key : String
older-than : Int
newer-than : Int
fake : Bool
path : String

but the description is not really detailed..

Are actions 'cp' or 'rm' as this pluggin seem to be only for upload and deletion ? Or is this : 'a list of actions to have packer perform' ?

I dont even know what packer is, is this the tool for creating image by hashicorp ? (https://github.com/hashicorp/packer).

I could be nice to know the default value of all these arguments too !

Also, is this plugin production ready ?
or was it replaced by drone-plugins/drone-s3, as minio seem to use s3 as a protocol ?

Thank you for your work, let me know if you'll want me to document this after finding my responses.
Best regards !

:)

matEhickey commented 5 years ago

As a workaround i'm using the minio/mc image (the minio cli), that connect to the server passing credentials in secrets:

  upload:
    image: minio/mc
    commands:
      - mc config host add minio https://minio.ownserver.com $${MINIO_ACCESS_KEY} $${MINIO_SECRET_KEY}
      - mc rm minio/bucket/file-${DRONE_COMMIT_BRANCH}.txt
      - mc cp file.txt minio/bucket/file-${DRONE_COMMIT_BRANCH}.txt
    secrets: [ minio_access_key, minio_secret_key ]
    when:
      branch:
        - master
        - develop
ramosisw commented 4 years ago

As a workaround i'm using the minio/mc image (the minio cli), that connect to the server passing credentials in secrets:

  upload:
    image: minio/mc
    commands:
      - mc config host add minio https://minio.ownserver.com $${MINIO_ACCESS_KEY} $${MINIO_SECRET_KEY}
      - mc rm minio/bucket/file-${DRONE_COMMIT_BRANCH}.txt
      - mc cp file.txt minio/bucket/file-${DRONE_COMMIT_BRANCH}.txt
    secrets: [ minio_access_key, minio_secret_key ]
    when:
      branch:
        - master
        - develop

You are the best! Regars.