woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.3k stars 370 forks source link

Need both environment and settings for plugin appleboy/dron-ssh, but this is deprecated #4430

Open smainz opened 6 hours ago

smainz commented 6 hours ago

Component

server

Describe the bug

I am using this drone plugin: https://github.com/appleboy/drone-ssh

And I need additional env vars set in my script (and the optional env var for deployment $TAG will override the constant dev)

  - name: Deploy to Server
    image: appleboy/drone-ssh
    environment:
      TAG: ${TAG=dev}
    settings:
      proxy_host: jumphost.xxx.xxxxxx.xx
      proxy_username:
        from_secret: SSH_USER
      proxy_key:
        from_secret: SSH_KEY
      host: "10.1.0.5"
      username:
        from_secret: SSH_USER
      key:
        from_secret: SSH_KEY
      envs:
        - TAG
      script:
        - cd /srv/docker.nbr
        - echo "TAG=$${TAG}" > .env
        - docker-compose pull
        - docker-compose down
        - docker-compose up -d

How is this supposed in the futire as I get the linter warning: Should not configure both environment and settings

The docs of this plugin explicitly state this kind of usage. Is there differnet woodpecker plugin for the same use?

Steps to reproduce

Should be obvious

Expected behavior

No response

System Info

Woodpecker 2.7.2 from docker image

Additional context

No response

Validations