Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Commit 594ea60

Browse files
committed
merge upstream master
2 parents bd7acb0 + 299a9e5 commit 594ea60

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2553
-649
lines changed

.bingo/Variables.mk

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,15 @@ GO ?= $(shell which go)
1616
# @echo "Running bingo"
1717
# @$(BINGO) <flags/args..>
1818
#
19-
BINGO := $(GOBIN)/bingo-v0.2.2
20-
$(BINGO): .bingo/bingo.mod
21-
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
22-
@echo "(re)installing $(GOBIN)/bingo-v0.2.2"
23-
@cd .bingo && $(GO) build -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.2.2 "github.com/bwplotka/bingo"
24-
25-
EMBEDMD := $(GOBIN)/embedmd-v1.0.0
26-
$(EMBEDMD): .bingo/embedmd.mod
27-
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
28-
@echo "(re)installing $(GOBIN)/embedmd-v1.0.0"
29-
@cd .bingo && $(GO) build -modfile=embedmd.mod -o=$(GOBIN)/embedmd-v1.0.0 "github.com/campoy/embedmd"
19+
#BINGO := $(GOBIN)/bingo-v0.2.2
20+
#$(BINGO): .bingo/bingo.mod
21+
# @# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
22+
# @echo "(re)installing $(GOBIN)/bingo-v0.2.2"
23+
# @cd .bingo && $(GO) build -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.2.2 "github.com/bwplotka/bingo"
3024

31-
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.27.0
32-
$(GOLANGCI_LINT): .bingo/golangci-lint.mod
33-
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
34-
@echo "(re)installing $(GOBIN)/golangci-lint-v1.27.0"
35-
@cd .bingo && $(GO) build -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.27.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
36-
37-
GOTEST := $(GOBIN)/gotest-v0.0.4
38-
$(GOTEST): .bingo/gotest.mod
25+
GOTEST := $(GOBIN)/gotest
26+
$(GOTEST):
3927
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
4028
@echo "(re)installing $(GOBIN)/gotest-v0.0.4"
41-
@cd .bingo && $(GO) build -modfile=gotest.mod -o=$(GOBIN)/gotest-v0.0.4 "github.com/rakyll/gotest"
42-
43-
LICHE := $(GOBIN)/liche-v0.0.0-20200229003944-f57a5d1c5be4
44-
$(LICHE): .bingo/liche.mod
45-
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
46-
@echo "(re)installing $(GOBIN)/liche-v0.0.0-20200229003944-f57a5d1c5be4"
47-
@cd .bingo && $(GO) build -modfile=liche.mod -o=$(GOBIN)/liche-v0.0.0-20200229003944-f57a5d1c5be4 "github.com/raviqqe/liche"
29+
@ $(GO) install github.com/rakyll/[email protected]
4830

.bingo/embedmd.mod

Lines changed: 0 additions & 5 deletions
This file was deleted.

.bingo/liche.mod

Lines changed: 0 additions & 5 deletions
This file was deleted.

.bingo/variables.env

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ fi
1010

1111
BINGO="${gobin}/bingo-v0.2.2"
1212

13-
EMBEDMD="${gobin}/embedmd-v1.0.0"
14-
1513
GOLANGCI_LINT="${gobin}/golangci-lint-v1.27.0"
1614

1715
GOTEST="${gobin}/gotest-v0.0.4"
1816

19-
LICHE="${gobin}/liche-v0.0.0-20200229003944-f57a5d1c5be4"
20-

.drone-local.yml

Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
---
2+
3+
# This is an example of a Drone pipeline that can be run locally
4+
kind: pipeline
5+
name: local-pipeline
6+
7+
platform:
8+
os: linux
9+
arch: amd64
10+
11+
clone:
12+
depth: 50
13+
14+
steps:
15+
- name: configure-buckets
16+
image: minio/mc:RELEASE.2020-10-03T02-54-56Z
17+
commands:
18+
- sleep 5
19+
- mc config host add minio http://minio:9000 AKIAIOSFODNN7EXAMPLE wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
20+
- mc mb --region=eu-west-1 minio/drone-cache-bucket
21+
- mc admin user add minio foo barbarbar
22+
- "echo '{\"Version\": \"2012-10-17\", \"Statement\": [ { \"Action\": [ \"s3:GetObject\", \"s3:PutObject\", \"s3:DeleteObject\", \"s3:CreateBucket\", \"s3:DeleteBucket\" ], \"Effect\": \"Allow\", \"Resource\": [ \"arn:aws:s3:::s3-round-trip-with-role/*\", \"arn:aws:s3:::s3-round-trip-with-role\" ], \"Sid\": \"\" } ] }' >> /tmp/policy.json"
23+
- mc admin policy add minio userpolicy /tmp/policy.json
24+
- mc admin policy set minio userpolicy user=foo
25+
26+
- name: build
27+
image: golang:1.18.4
28+
commands:
29+
- make drone-cache
30+
environment:
31+
CGO_ENABLED: 0
32+
33+
- name: lint
34+
image: docker.io/golangci/golangci-lint:v1.46.2
35+
commands:
36+
- make lint
37+
environment:
38+
CGO_ENABLED: 0
39+
40+
- name: test
41+
image: golang:1.18.4
42+
commands:
43+
- go test -mod=vendor -short -cover -tags=integration ./...
44+
environment:
45+
CGO_ENABLED: 0
46+
TEST_S3_ENDPOINT: minio:9000
47+
TEST_GCS_ENDPOINT: http://fakegcs:4443/storage/v1/
48+
TEST_STORAGE_EMULATOR_HOST: fakegcs:4443
49+
TEST_SFTP_HOST: sftp
50+
TEST_AZURITE_URL: azurite:10000
51+
volumes:
52+
- name: testdata
53+
path: /drone/src/tmp/testdata/cache
54+
55+
- name: rebuild-cache
56+
image: drone-cache:MyTestTag
57+
pull: if-not-exists
58+
settings:
59+
bucket: drone-cache-bucket
60+
mount:
61+
- vendor
62+
rebuild: true
63+
region: eu-west-1
64+
path_style: true
65+
endpoint: minio:9000
66+
exit_code: true
67+
environment:
68+
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
69+
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
70+
71+
- name: rebuild-cache-with-key
72+
image: drone-cache:MyTestTag
73+
pull: if-not-exists
74+
settings:
75+
bucket: drone-cache-bucket
76+
cache_key: "{{ .Repo.Name }}_{{ checksum \"go.mod\" }}_{{ checksum \"go.sum\" }}_{{ arch }}_{{ os }}"
77+
mount:
78+
- vendor
79+
rebuild: true
80+
region: eu-west-1
81+
path_style: true
82+
endpoint: minio:9000
83+
exit_code: true
84+
environment:
85+
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
86+
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
87+
88+
- name: rebuild-cache-with-gzip
89+
image: drone-cache:MyTestTag
90+
pull: if-not-exists
91+
settings:
92+
archive_format: gzip
93+
bucket: drone-cache-bucket
94+
cache_key: gzip
95+
mount:
96+
- vendor
97+
rebuild: true
98+
region: eu-west-1
99+
path_style: true
100+
endpoint: minio:9000
101+
exit_code: true
102+
environment:
103+
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
104+
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
105+
106+
- name: rebuild-cache-with-zstd
107+
image: drone-cache:MyTestTag
108+
pull: if-not-exists
109+
settings:
110+
archive_format: zstd
111+
bucket: drone-cache-bucket
112+
cache_key: zstd
113+
mount:
114+
- vendor
115+
rebuild: true
116+
region: eu-west-1
117+
path_style: true
118+
endpoint: minio:9000
119+
exit_code: true
120+
environment:
121+
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
122+
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
123+
124+
- name: rebuild-cache-with-filesystem
125+
image: drone-cache:MyTestTag
126+
pull: if-not-exists
127+
settings:
128+
archive_format: gzip
129+
backend: filesystem
130+
cache_key: volume
131+
mount:
132+
- vendor
133+
rebuild: true
134+
exit_code: true
135+
volumes:
136+
- name: cache
137+
path: /tmp/cache
138+
139+
- name: restore-cache-with-key
140+
image: drone-cache:MyTestTag
141+
pull: if-not-exists
142+
settings:
143+
bucket: drone-cache-bucket
144+
cache_key: "{{ .Repo.Name }}_{{ checksum \"go.mod\" }}_{{ checksum \"go.sum\" }}_{{ arch }}_{{ os }}"
145+
mount:
146+
- vendor
147+
region: eu-west-1
148+
pull: always
149+
restore: true
150+
path_style: true
151+
endpoint: minio:9000
152+
exit_code: true
153+
environment:
154+
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
155+
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
156+
157+
- name: restore-cache-with-gzip
158+
image: drone-cache:MyTestTag
159+
pull: if-not-exists
160+
settings:
161+
archive_format: gzip
162+
bucket: drone-cache-bucket
163+
cache_key: gzip
164+
mount:
165+
- vendor
166+
region: eu-west-1
167+
restore: true
168+
path_style: true
169+
endpoint: minio:9000
170+
exit_code: true
171+
environment:
172+
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
173+
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
174+
175+
- name: restore-cache-with-zstd
176+
image: drone-cache:MyTestTag
177+
pull: if-not-exists
178+
settings:
179+
archive_format: zstd
180+
bucket: drone-cache-bucket
181+
cache_key: zstd
182+
mount:
183+
- vendor
184+
region: eu-west-1
185+
restore: true
186+
path_style: true
187+
endpoint: minio:9000
188+
exit_code: true
189+
environment:
190+
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
191+
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
192+
193+
- name: restore-cache-with-filesystem
194+
image: drone-cache:MyTestTag
195+
pull: if-not-exists
196+
settings:
197+
archive_format: gzip
198+
backend: filesystem
199+
cache_key: volume
200+
mount:
201+
- vendor
202+
restore: true
203+
exit_code: true
204+
volumes:
205+
- name: cache
206+
path: /tmp/cache
207+
208+
- name: restore-cache-debug
209+
image: drone-cache:MyTestTag
210+
pull: if-not-exists
211+
settings:
212+
debug: true
213+
restore: true
214+
pull: always
215+
216+
- name: restore-cache
217+
image: drone-cache:MyTestTag
218+
pull: if-not-exists
219+
settings:
220+
bucket: drone-cache-bucket
221+
mount:
222+
- vendor
223+
region: eu-west-1
224+
restore: true
225+
path_style: true
226+
endpoint: minio:9000
227+
exit_code: true
228+
environment:
229+
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
230+
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
231+
232+
services:
233+
- name: minio
234+
image: minio/minio:RELEASE.2022-07-15T03-44-22Z
235+
commands:
236+
- minio server /data
237+
environment:
238+
MINIO_ACCESS_KEY: AKIAIOSFODNN7EXAMPLE
239+
MINIO_REGION: eu-west-1
240+
MINIO_SECRET_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
241+
ports:
242+
- 9000
243+
- name: fakegcs
244+
image: fsouza/fake-gcs-server:1.38.3
245+
ports:
246+
- 4443
247+
commands:
248+
- fake-gcs-server -public-host fakegcs -scheme http
249+
- name: sftp
250+
image: atmoz/sftp:alpine
251+
ports:
252+
- 22
253+
commands:
254+
- /entrypoint foo:pass:::sftp_test bar:pass:::plugin_test
255+
- name: azurite
256+
image: mcr.microsoft.com/azure-storage/azurite:3.18.0
257+
commands:
258+
- azurite-blob --blobHost 0.0.0.0
259+
ports:
260+
- 10000
261+
262+
volumes:
263+
- name: cache
264+
temp: {}
265+
- name: testdata
266+
temp: {}
267+
268+
trigger:
269+
branch:
270+
- master
271+
event:
272+
-
273+
...

0 commit comments

Comments
 (0)