file sync for woodpecker-ci use https://github.com/filebrowser/filebrowser
10K+
sync as github.com/filebrowser/filebrowser
{.sync}/${repo-Hostname}/${repo-Owner}/${repo-Name}/{build-number}support link choose by web test
file-browser-urls support multi urls, will auto switch host fastfile-browser-standby-url if multi urls not work, will use this support dry-run mode
support sync mode download and upload
sync-include-globs and sync-exclude-globs| Name | Required | Default value | Description |
|---|---|---|---|
debug | no | false | open debug log or open by env PLUGIN_DEBUG |
sync-dry-run | no | false | dry run, only print some info, not real sync |
file-browser-urls | yes | file browser urls, support multi urls, will auto switch host fast | |
file-browser-username | yes | file browser username, support from secret | |
file-browser-user-password | yes | file browser password, support from secret | |
file-browser-standby-url | yes | file browser standby url, if multi urls not work, will use this | |
file-browser-standby-username | yes | file browser standby username, support from secret | |
file-browser-standby-user-passwords | yes | file browser standby password, support from secret | |
sync-mode | yes | sync mode, support: upload, download | |
sync-work-space-path | yes | sync path under workspace path | |
sync-include-globs | no | include globs do not use with exclude globs | |
sync-exclude-globs | no | exclude globs do not use with include globs |
Hide Settings:
| Name | Required | Default value | Description |
|---|---|---|---|
timeout_second | no | 10 | command timeout setting by second, minimum 10s |
file-browser-sync-timeout-second | no | 60 | file browser sync files timeout second, minimum 60s |
woodpecker-kit-steps-transfer-file-path | no | .woodpecker_kit.steps.transfer | Steps transfer file path, default by wd_steps_transfer.DefaultKitStepsFileName |
woodpecker-kit-steps-transfer-disable-out | no | false | Steps transfer write disable out |
dockerlabels:
backend: docker
steps:
woodpecker-file-browser-sync:
image: sinlov/woodpecker-file-browser-sync:latest
pull: false
settings:
# debug: true
# sync-dry-run: true # dry run, only print some info, not real sync
## connect config
file-browser-urls:
- https://filebrowser-inner.example.com
- https://filebrowser.example.com
- https://filebrowser-zone.example.com
file-browser-username:
from_secret: file_browser_sync_username
file-browser-user-password:
from_secret: file_browser_sync_password
# standby url
file-browser-standby-url: https://filebrowser-standby.example.com
file-browser-standby-username:
from_secret: file_browser_sync_standby_username
file-browser-standby-user-passwords:
from_secret: file_browser_sync_standby_password
## sync config
sync-work-space-path: dist # sync path under workspace path, Required
sync-mode: upload # sync mode, support: upload, download
sync-include-globs: # include globs do not use with exclude globs
- "**/**/*.dll"
- "**/*.md"
local, must install at local and effective at evn PATH
go install -a github.com/woodpecker-kit/woodpecker-file-browser-sync/cmd/woodpecker-file-browser-sync@latest
go install -v github.com/woodpecker-kit/woodpecker-file-browser-sync/cmd/[email protected]
labels:
backend: local
steps:
woodpecker-file-browser-sync:
image: woodpecker-file-browser-sync
settings:
# debug: true
# sync-dry-run: true # dry run, only print some info, not real sync
## connect config
file-browser-urls:
- https://filebrowser-inner.example.com
- https://filebrowser.example.com
- https://filebrowser-zone.example.com
file-browser-username:
from_secret: file_browser_sync_username
file-browser-user-password:
from_secret: file_browser_sync_password
# standby url
file-browser-standby-url: https://filebrowser-standby.example.com
file-browser-standby-username:
from_secret: file_browser_sync_standby_username
file-browser-standby-user-passwords:
from_secret: file_browser_sync_standby_password
## sync config
sync-work-space-path: dist # sync path under workspace path, Required
sync-mode: upload # sync mode, support: upload, download
sync-include-globs: # include globs do not use with exclude globs
- "**/**/*.dll"
- "**/*.md"
labels:
backend: docker
steps:
woodpecker-file-browser-sync:
image: sinlov/woodpecker-file-browser-sync:latest
pull: false
settings:
debug: true
sync-dry-run: true # dry run, only print some info, not real sync
file-browser-sync-timeout-second: 120 # file browser sync files timeout second, minimum 60s
## connect config
file-browser-urls:
- https://filebrowser-inner.example.com
- https://filebrowser.example.com
- https://filebrowser-zone.example.com
file-browser-username:
from_secret: file_browser_sync_username
file-browser-user-password:
from_secret: file_browser_sync_password
# standby url
file-browser-standby-url: https://filebrowser-standby.example.com
file-browser-standby-username:
from_secret: file_browser_sync_standby_username
file-browser-standby-user-passwords:
from_secret: file_browser_sync_standby_password
## sync config
sync-work-space-path: dist # sync path under workspace path, Required
sync-mode: upload # sync mode, support: upload, download
sync-include-globs: # include globs do not use with exclude globs
- "**/**/*.dll"
- "**/*.md"
sync-exclude-globs: # exclude globs do not use with include globs
- "**/node_modules/**"
- "**/vendor/**"
file-browser-urls support multi urls, However, these URLs actually point to the same service, preventing files from
being downloaded or uploaded normally in the same build.
file-browser-standby-urland related parameters can be set in the server environment
variable WOODPECKER_ENVIRONMENT for use in multiple environments
WOODPECKER_ENVIRONMENT="PLUGIN_FILE_BROWSER_STANDBY_URL:https://filebrowser-standby.example.com,PLUGIN_FILE_BROWSER_USERNAME:sync-filebrowser,PLUGIN_FILE_BROWSER_STANDBY_USERNAME:sync-filebrowser"
then it can be simplified
labels:
backend: docker
steps:
woodpecker-file-browser-sync:
image: sinlov/woodpecker-file-browser-sync:latest
pull: false
settings:
# debug: true
# sync-dry-run: true # dry run, only print some info, not real sync
## connect config
file-browser-urls:
- https://filebrowser-inner.example.com
- https://filebrowser.example.com
- https://filebrowser-zone.example.com
file-browser-user-password:
from_secret: file_browser_sync_password
# standby url
file-browser-standby-user-passwords:
from_secret: file_browser_sync_standby_password
## sync config
sync-work-space-path: dist # sync path under workspace path, Required
sync-mode: upload # sync mode, support: upload, download
sync-include-globs: # include globs do not use with exclude globs
- "**/**/*.dll"
- "**/*.md"
file-browser-standby-url is required, if file-browser-urls not work, will use this, but
if file-browser-standby-url
not work, will not retry.Content type
Image
Digest
sha256:07c52f52f…
Size
5.7 MB
Last updated
over 1 year ago
docker pull sinlov/woodpecker-file-browser-sync