16 Sep 2019 |
Brad Rydzewski (Gitter) | yes, the nested attributes was the big issue | 18:26:08 |
Thomas Boerger (Gitter) | What do you think? Execute the plugin for every different upload instead of the nested attributes? | 18:31:29 |
Thomas Boerger (Gitter) | Is he afraid now? 😝 | 18:35:16 |
Brad Rydzewski (Gitter) | yes, execute for each upload | 18:49:58 |
Brad Rydzewski (Gitter) | or for multi-upload in a single step load the configuration from file | 18:50:07 |
Brad Rydzewski (Gitter) | the best practice I would like to enforce are that anything super complex should define and use its own configuration file | 18:50:45 |
Brad Rydzewski (Gitter) | (edited) ... enforce are that ... => ... enforce is that ... | 18:50:54 |
Brad Rydzewski (Gitter) | so a plugin could support both this: - name: upload
settings:
token:
from_secret: token
bucket: foo
files:
- bar.tar.gz
- baz.tar.gz
and this: - name: upload
settings:
token:
from_secret: token
from_file: path/to/file.yaml | 18:52:36 |
Brad Rydzewski (Gitter) | (edited) ... this:
```
- name: upload
settings:
token:
from_secret: token
bucket: foo
files:
- bar.tar.gz
- baz.tar.gz
```
and this:
```
- ... => ... this:
```text
- name: upload
settings:
token:
from_secret: token
bucket: foo
files:
- bar.tar.gz
- baz.tar.gz
```
and this:
```text
- ... | 18:52:44 |
Brad Rydzewski (Gitter) | (edited) ... settings:
token:
from_secret: token
from_file: path/to/file.yaml
``` ... => ... settings:
import: path/to/file.yaml
token:
from_secret: token
``` ... | 18:52:57 |
Brad Rydzewski (Gitter) | (edited) so a plugin could support both this:
```text
- name: upload
settings:
token:
from_secret: token
bucket: foo
files:
- bar.tar.gz
- baz.tar.gz
```
and this:
```text
- name: upload
settings:
import: path/to/file.yaml
token:
from_secret: token
```
=> the best practice I would like to enforce is that a plugin with super-complex configuration should define its own configuration file | 18:53:37 |
Thomas Boerger (Gitter) | Sounds valid | 18:55:08 |
Thomas Boerger (Gitter) | Need to check if globs could make sense as well | 18:55:25 |
Brad Rydzewski (Gitter) | very possible | 18:57:42 |
Thomas Boerger (Gitter) | i have prepared the pipeline via drone-plugins/drone-bintray#24, it will anyway fail which is expected because trying the executeable will fail until it’s migrated to 1.x.x | 19:21:20 |
Thomas Boerger (Gitter) | @bradrydzewski @arcolife | 19:21:59 |
Archit Sharma (Gitter) | @tboerger @bradrydzewski wow thanks so much for answering my questions patiently. I'm in! Sorry I didn't get all the messages in my gitter app. But I'm here now | 20:22:16 |
Archit Sharma (Gitter) | Catching up on your messages. If either of you is up for a small session, I can do this now or we can schedule this tomorrow? It's 1:53 am at my place ;) | 20:23:22 |
Archit Sharma (Gitter) | Btw how do I interact with the plug-in build pipeline? Or is it upto the owners here? | 20:25:36 |
Thomas Boerger (Gitter) | i think https://github.com/drone-plugins/drone-webhook/blob/master/main.go could be a well starting point. the biggest difference between 0.4 and plugins for >= 0.6 is that the old plugins required a json payload via stdin while newer plugins are simply listening to env variables. | 20:27:13 |
Thomas Boerger (Gitter) | the nested array had been a poor design decision, that should be replaced by multiple calls of the bintray plugin instead. so keep the parameters as simple as possible, best would be plain types like int, float, string, boolean or slices of these simple types. | 20:28:18 |
Thomas Boerger (Gitter) | if something is unclear just write here, i will try to answer asap | 20:33:22 |
17 Sep 2019 |
Archit Sharma (Gitter) | Sure! | 03:04:57 |
| laughing (Gitter) joined the room. | 07:38:05 |
laughing (Gitter) | @RabeaWahab I have the same problem | 07:38:05 |
| laughing (Gitter) joined the room. | 07:54:26 |
laughing (Gitter) | I have a question about drone+vault, I want to use the secret in vault in drone.yml, what should I do? | 07:54:27 |
Thomas Boerger (Gitter) | @Laughingmoon first you need to setup the vault integration for your drone server, it’s based on https://hub.docker.com/r/drone/vault and accepts these config vars: https://github.com/drone/drone-vault/blob/master/cmd/drone-vault/main.go#L39-L47, after that you can follow https://docs.drone.io/configure/secrets/external/vault/ | 08:32:05 |
laughing (Gitter) | ''' version: "3.7" services: drone-server: image: drone/drone:1 container_name: drone_server networks: - dronenet
ports:
- "8000:80"
- "8443:443"
environment:
- DRONE_OPEN=true
- DRONE_GITEA=true
- DRONE_DEBUG=true
- DRONE_PROVIDER=gitea
- DRONE_RUNNER_CAPACITY=2
- DRONE_GIT_ALWAYS_AUTH=true
- DRONE_SERVER_HOST=192.168.32.50:8000
- DRONE_GITEA_SERVER=http://192.168.32.50:3000/
- DRONE_GITEA_SKIP_VERIFY=false
- DRONE_SERVER_PROTO=http
- DRONE_TLS_AUTOCERT=false
- DRONE_ADMIN=asher
- DRONE_GIT_USERNAME=asher
- DRONE_GIT_PASSWORD=123456
- DRONE_RPC_SECRET=8e1589b9261b53dd78e2180c0cd561198c2f5c1e
- DRONE_LOGS_DEBUG=true
- DRONE_DATABASE_DRIVER=sqlite3
- DRONE_DATABASE_DATASOURCE=/data/database.sqlite
- DRONE_USER_CREATE=username:asher,admin:true
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/drone_1.0:/data
drone-agent: image: drone/agent:1 container_name: drone_agent networks: - dronenet
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/drone_1.0:/data
depends_on:
- drone-server
restart: always
environment:
- DRONE_SECRET_SECRET=7890bcce69bb685a9a424767fe9d1be1
- DRONE_RPC_SERVER=http://drone-server:9000
- DRONE_SECRET_ENDPOINT=http://dronetest_vault:3000
- DRONE_RPC_SECRET=8e1589b9261b53dd78e2180c0cd561198c2f5c1e
- DRONE_LOGS_DEBUG=true
- DRONE_DEBUG=true
- DRONE_LOGS_PRETTY=true
- DRONE_LOGS_NOCOLOR=false
vault: image: vault:latest container_name: vault restart: always ports: - 8200:8200
networks:
- dronenet
volumes:
- ./vault/file:/vault/file
- ./vault/config:/vault/config
- ./vault/logs:/vault/logs
cap_add:
- IPC_LOCK
environment:
- VAULT_ADDR=http://127.0.0.1:8200
command: vault server -config=/vault/config/local.json
drone-vault: image: drone/vault container_name: dronetest_vault depends_on: - drone-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/drone_1.0:/data
restart: always
networks:
- dronenet
environment:
- SECRET_KEY=7890bcce69bb685a9a424767fe9d1be1
- DEBUG=true
- VAULT_ADDR=http://127.0.0.1:8200
- VAULT_TOKEN_RENEWAL=84h
- VAULT_TOKEN_TTL=168h
- VAULT_TOKEN=s.JXiDyRwdgEo1RI6yR6df1QHe
networks: dronenet: ''' | 10:01:37 |
laughing (Gitter) | This is my configuration, it looks a bit messy. | 10:02:26 |