Skip to content

Commit

Permalink
merge upstream master
Browse files Browse the repository at this point in the history
  • Loading branch information
hacktron95 committed Sep 15, 2022
2 parents bd7acb0 + 299a9e5 commit 594ea60
Show file tree
Hide file tree
Showing 68 changed files with 2,553 additions and 649 deletions.
34 changes: 8 additions & 26 deletions .bingo/Variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,15 @@ GO ?= $(shell which go)
# @echo "Running bingo"
# @$(BINGO) <flags/args..>
#
BINGO := $(GOBIN)/bingo-v0.2.2
$(BINGO): .bingo/bingo.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/bingo-v0.2.2"
@cd .bingo && $(GO) build -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.2.2 "github.com/bwplotka/bingo"

EMBEDMD := $(GOBIN)/embedmd-v1.0.0
$(EMBEDMD): .bingo/embedmd.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/embedmd-v1.0.0"
@cd .bingo && $(GO) build -modfile=embedmd.mod -o=$(GOBIN)/embedmd-v1.0.0 "github.com/campoy/embedmd"
#BINGO := $(GOBIN)/bingo-v0.2.2
#$(BINGO): .bingo/bingo.mod
# @# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
# @echo "(re)installing $(GOBIN)/bingo-v0.2.2"
# @cd .bingo && $(GO) build -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.2.2 "github.com/bwplotka/bingo"

GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.27.0
$(GOLANGCI_LINT): .bingo/golangci-lint.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/golangci-lint-v1.27.0"
@cd .bingo && $(GO) build -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.27.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"

GOTEST := $(GOBIN)/gotest-v0.0.4
$(GOTEST): .bingo/gotest.mod
GOTEST := $(GOBIN)/gotest
$(GOTEST):
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/gotest-v0.0.4"
@cd .bingo && $(GO) build -modfile=gotest.mod -o=$(GOBIN)/gotest-v0.0.4 "github.com/rakyll/gotest"

LICHE := $(GOBIN)/liche-v0.0.0-20200229003944-f57a5d1c5be4
$(LICHE): .bingo/liche.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/liche-v0.0.0-20200229003944-f57a5d1c5be4"
@cd .bingo && $(GO) build -modfile=liche.mod -o=$(GOBIN)/liche-v0.0.0-20200229003944-f57a5d1c5be4 "github.com/raviqqe/liche"
@ $(GO) install github.com/rakyll/[email protected]

5 changes: 0 additions & 5 deletions .bingo/embedmd.mod

This file was deleted.

5 changes: 0 additions & 5 deletions .bingo/liche.mod

This file was deleted.

4 changes: 0 additions & 4 deletions .bingo/variables.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ fi

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

EMBEDMD="${gobin}/embedmd-v1.0.0"

GOLANGCI_LINT="${gobin}/golangci-lint-v1.27.0"

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

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

273 changes: 273 additions & 0 deletions .drone-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,273 @@
---

# This is an example of a Drone pipeline that can be run locally
kind: pipeline
name: local-pipeline

platform:
os: linux
arch: amd64

clone:
depth: 50

steps:
- name: configure-buckets
image: minio/mc:RELEASE.2020-10-03T02-54-56Z
commands:
- sleep 5
- mc config host add minio http://minio:9000 AKIAIOSFODNN7EXAMPLE wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
- mc mb --region=eu-west-1 minio/drone-cache-bucket
- mc admin user add minio foo barbarbar
- "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"
- mc admin policy add minio userpolicy /tmp/policy.json
- mc admin policy set minio userpolicy user=foo

- name: build
image: golang:1.18.4
commands:
- make drone-cache
environment:
CGO_ENABLED: 0

- name: lint
image: docker.io/golangci/golangci-lint:v1.46.2
commands:
- make lint
environment:
CGO_ENABLED: 0

- name: test
image: golang:1.18.4
commands:
- go test -mod=vendor -short -cover -tags=integration ./...
environment:
CGO_ENABLED: 0
TEST_S3_ENDPOINT: minio:9000
TEST_GCS_ENDPOINT: http://fakegcs:4443/storage/v1/
TEST_STORAGE_EMULATOR_HOST: fakegcs:4443
TEST_SFTP_HOST: sftp
TEST_AZURITE_URL: azurite:10000
volumes:
- name: testdata
path: /drone/src/tmp/testdata/cache

- name: rebuild-cache
image: drone-cache:MyTestTag
pull: if-not-exists
settings:
bucket: drone-cache-bucket
mount:
- vendor
rebuild: true
region: eu-west-1
path_style: true
endpoint: minio:9000
exit_code: true
environment:
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

- name: rebuild-cache-with-key
image: drone-cache:MyTestTag
pull: if-not-exists
settings:
bucket: drone-cache-bucket
cache_key: "{{ .Repo.Name }}_{{ checksum \"go.mod\" }}_{{ checksum \"go.sum\" }}_{{ arch }}_{{ os }}"
mount:
- vendor
rebuild: true
region: eu-west-1
path_style: true
endpoint: minio:9000
exit_code: true
environment:
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

- name: rebuild-cache-with-gzip
image: drone-cache:MyTestTag
pull: if-not-exists
settings:
archive_format: gzip
bucket: drone-cache-bucket
cache_key: gzip
mount:
- vendor
rebuild: true
region: eu-west-1
path_style: true
endpoint: minio:9000
exit_code: true
environment:
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

- name: rebuild-cache-with-zstd
image: drone-cache:MyTestTag
pull: if-not-exists
settings:
archive_format: zstd
bucket: drone-cache-bucket
cache_key: zstd
mount:
- vendor
rebuild: true
region: eu-west-1
path_style: true
endpoint: minio:9000
exit_code: true
environment:
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

- name: rebuild-cache-with-filesystem
image: drone-cache:MyTestTag
pull: if-not-exists
settings:
archive_format: gzip
backend: filesystem
cache_key: volume
mount:
- vendor
rebuild: true
exit_code: true
volumes:
- name: cache
path: /tmp/cache

- name: restore-cache-with-key
image: drone-cache:MyTestTag
pull: if-not-exists
settings:
bucket: drone-cache-bucket
cache_key: "{{ .Repo.Name }}_{{ checksum \"go.mod\" }}_{{ checksum \"go.sum\" }}_{{ arch }}_{{ os }}"
mount:
- vendor
region: eu-west-1
pull: always
restore: true
path_style: true
endpoint: minio:9000
exit_code: true
environment:
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

- name: restore-cache-with-gzip
image: drone-cache:MyTestTag
pull: if-not-exists
settings:
archive_format: gzip
bucket: drone-cache-bucket
cache_key: gzip
mount:
- vendor
region: eu-west-1
restore: true
path_style: true
endpoint: minio:9000
exit_code: true
environment:
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

- name: restore-cache-with-zstd
image: drone-cache:MyTestTag
pull: if-not-exists
settings:
archive_format: zstd
bucket: drone-cache-bucket
cache_key: zstd
mount:
- vendor
region: eu-west-1
restore: true
path_style: true
endpoint: minio:9000
exit_code: true
environment:
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

- name: restore-cache-with-filesystem
image: drone-cache:MyTestTag
pull: if-not-exists
settings:
archive_format: gzip
backend: filesystem
cache_key: volume
mount:
- vendor
restore: true
exit_code: true
volumes:
- name: cache
path: /tmp/cache

- name: restore-cache-debug
image: drone-cache:MyTestTag
pull: if-not-exists
settings:
debug: true
restore: true
pull: always

- name: restore-cache
image: drone-cache:MyTestTag
pull: if-not-exists
settings:
bucket: drone-cache-bucket
mount:
- vendor
region: eu-west-1
restore: true
path_style: true
endpoint: minio:9000
exit_code: true
environment:
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

services:
- name: minio
image: minio/minio:RELEASE.2022-07-15T03-44-22Z
commands:
- minio server /data
environment:
MINIO_ACCESS_KEY: AKIAIOSFODNN7EXAMPLE
MINIO_REGION: eu-west-1
MINIO_SECRET_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
ports:
- 9000
- name: fakegcs
image: fsouza/fake-gcs-server:1.38.3
ports:
- 4443
commands:
- fake-gcs-server -public-host fakegcs -scheme http
- name: sftp
image: atmoz/sftp:alpine
ports:
- 22
commands:
- /entrypoint foo:pass:::sftp_test bar:pass:::plugin_test
- name: azurite
image: mcr.microsoft.com/azure-storage/azurite:3.18.0
commands:
- azurite-blob --blobHost 0.0.0.0
ports:
- 10000

volumes:
- name: cache
temp: {}
- name: testdata
temp: {}

trigger:
branch:
- master
event:
-
...
Loading

0 comments on commit 594ea60

Please sign in to comment.