This repository has been archived by the owner on Aug 24, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
.drone.yml
96 lines (91 loc) · 3.44 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
kind: pipeline
name: default
platform:
os: linux
arch: amd64
steps:
- name: docker-dry-run
image: plugins/docker
settings:
repo: techknowlogick/caddy-s3browser
dry_run: true
when:
event:
- pull_request
- name: create-test-bucket
image: minio/mc:RELEASE.2020-04-04T05-28-55Z
commands:
- sleep 4 # hope that minio has started by this point
- mc config host add test http://objectstorage:9000 51bcaa680ac2fa4bb9f38bde4bf6f5620c542222393f95e2e6f6d38f838e3c17 51bcaa680ac2fa4bb9f38bde4bf6f5620c542222393f95e2e6f6d38f838e3c17
- mc ls test
- mc mb test/s3browser-test
- echo "test file 1" > main.txt
- echo "test file 12" > one.txt
- echo "test file 123" > second.txt
- echo "test file 1234" > another.txt
- echo "test file 12345" > last.txt
- mc policy set download test/s3browser-test
- mc cp main.txt test/s3browser-test
- mc cp second.txt test/s3browser-test
- mc cp one.txt test/s3browser-test/one/
- mc cp another.txt test/s3browser-test/one/
#- mc mb test/s3browser-test/one/two/
#- mc mb test/s3browser-test/one/two/three/
#- mc mb test/s3browser-test/one/two/three/four/
#- mc cp another.txt test/s3browser-test/one/two
#- mc cp another.txt test/s3browser-test/one/two/three
- mc cp last.txt test/s3browser-test/one/two/three/four/
#- mc rm test/s3browser-test/one/two/another.txt
#- mc rm test/s3browser-test/one/two/three/another.txt
- mc cp one.txt test/s3browser-test/1.1.0/
- mc cp one.txt test/s3browser-test/1.1/
- mc cp one.txt test/s3browser-test/1/
- mc cp one.txt test/s3browser-test/1.2.0/
- mc cp one.txt test/s3browser-test/1.2.0-dev/
- mc cp one.txt test/s3browser-test/1.10.0/
- mc cp one.txt test/s3browser-test/1.10/
- mc cp one.txt test/s3browser-test/1.10.0-rc1/
- mc cp one.txt test/s3browser-test/1.11.0/
- mc cp one.txt test/s3browser-test/not-a-version-abc/
- mc cp one.txt test/s3browser-test/not-a-version-xyz/
- name: compile-and-run
image: caddy:2.2.1-builder-alpine
environment:
S3_SITENAME: "Test Site"
S3_REGION: us-east-1
S3_DEBUG: true
S3_KEY: 51bcaa680ac2fa4bb9f38bde4bf6f5620c542222393f95e2e6f6d38f838e3c17
S3_SECRET: 51bcaa680ac2fa4bb9f38bde4bf6f5620c542222393f95e2e6f6d38f838e3c17
S3_ENDPOINT: objectstorage:9000
S3_HOST: objectstorage
S3_EXTRA: ":9000"
S3_BUCKET: s3browser-test
S3_SECURE: false
S3_PROTO: http
S3_REFRESH: 25s
S3_REFRESH_SECRET: "secret"
S3_SIGNED_URL_REDIRECT: true
S3_SORT_ALGORITHM: "reverse-semver"
GO111MODULE: on
commands:
- apk add wget mailcap ca-certificates gettext libintl curl git
- xcaddy build --output /usr/bin/caddy --with github.com/techknowlogick/caddy-s3browser=/drone/src
- /usr/bin/caddy version
- "envsubst < /drone/src/Caddyfile.tmpl > /drone/src/Caddyfile"
- cat /drone/src/Caddyfile
- /usr/bin/caddy start -config /drone/src/Caddyfile
- sleep 6
- "curl -v localhost"
- "curl -v -H \"Accept: application/json\" localhost"
- "curl -v -X POST 'api:$S3_REFRESH_SECRET@localhost'"
services:
- name: objectstorage
image: minio/minio:RELEASE.2020-04-04T05-39-31Z
command:
- server
- /data
environment:
MINIO_ACCESS_KEY: 51bcaa680ac2fa4bb9f38bde4bf6f5620c542222393f95e2e6f6d38f838e3c17
MINIO_BROWSER: off
MINIO_SECRET_KEY: 51bcaa680ac2fa4bb9f38bde4bf6f5620c542222393f95e2e6f6d38f838e3c17