mirror of
https://github.com/harness/drone.git
synced 2025-05-02 13:40:22 +00:00
Merge pull request #2600 from JordanSussman/master
feat(s3): allow user to specify s3 endpoint for non aws usage
This commit is contained in:
commit
02df116424
@ -330,8 +330,9 @@ type (
|
|||||||
|
|
||||||
// S3 provides the storage configuration.
|
// S3 provides the storage configuration.
|
||||||
S3 struct {
|
S3 struct {
|
||||||
Bucket string `envconfig:"DRONE_S3_BUCKET"`
|
Bucket string `envconfig:"DRONE_S3_BUCKET"`
|
||||||
Prefix string `envconfig:"DRONE_S3_PREFIX"`
|
Prefix string `envconfig:"DRONE_S3_PREFIX"`
|
||||||
|
Endpoint string `envconfig:"DRONE_S3_ENDPOINT"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// HTTP provides http configuration.
|
// HTTP provides http configuration.
|
||||||
|
@ -85,6 +85,7 @@ func provideLogStore(db *db.DB, config config.Config) core.LogStore {
|
|||||||
return logs.NewS3Env(
|
return logs.NewS3Env(
|
||||||
config.S3.Bucket,
|
config.S3.Bucket,
|
||||||
config.S3.Prefix,
|
config.S3.Prefix,
|
||||||
|
config.S3.Endpoint,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM alpine:3.6 as alpine
|
FROM alpine:3.9 as alpine
|
||||||
RUN apk add -U --no-cache ca-certificates
|
RUN apk add -U --no-cache ca-certificates
|
||||||
|
|
||||||
FROM alpine:3.6
|
FROM alpine:3.9
|
||||||
ENV GODEBUG netdns=go
|
ENV GODEBUG netdns=go
|
||||||
ENV DRONE_RUNNER_OS=linux
|
ENV DRONE_RUNNER_OS=linux
|
||||||
ENV DRONE_RUNNER_ARCH=amd64
|
ENV DRONE_RUNNER_ARCH=amd64
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM alpine:3.6 as alpine
|
FROM alpine:3.9 as alpine
|
||||||
RUN apk add -U --no-cache ca-certificates
|
RUN apk add -U --no-cache ca-certificates
|
||||||
|
|
||||||
FROM alpine:3.6
|
FROM alpine:3.9
|
||||||
ENV GODEBUG netdns=go
|
ENV GODEBUG netdns=go
|
||||||
ENV DRONE_RUNNER_OS=linux
|
ENV DRONE_RUNNER_OS=linux
|
||||||
ENV DRONE_RUNNER_ARCH=amd64
|
ENV DRONE_RUNNER_ARCH=amd64
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM alpine:3.6 as alpine
|
FROM alpine:3.9 as alpine
|
||||||
RUN apk add -U --no-cache ca-certificates
|
RUN apk add -U --no-cache ca-certificates
|
||||||
|
|
||||||
FROM alpine:3.6
|
FROM alpine:3.9
|
||||||
ENV GODEBUG=netdns=go
|
ENV GODEBUG=netdns=go
|
||||||
ENV DRONE_RUNNER_OS=linux
|
ENV DRONE_RUNNER_OS=linux
|
||||||
ENV DRONE_RUNNER_ARCH=arm
|
ENV DRONE_RUNNER_ARCH=arm
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM alpine:3.6 as alpine
|
FROM alpine:3.9 as alpine
|
||||||
RUN apk add -U --no-cache ca-certificates
|
RUN apk add -U --no-cache ca-certificates
|
||||||
|
|
||||||
FROM alpine:3.6
|
FROM alpine:3.9
|
||||||
ENV GODEBUG=netdns=go
|
ENV GODEBUG=netdns=go
|
||||||
ENV DRONE_RUNNER_OS=linux
|
ENV DRONE_RUNNER_OS=linux
|
||||||
ENV DRONE_RUNNER_ARCH=arm64
|
ENV DRONE_RUNNER_ARCH=arm64
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# docker build --rm -f docker/Dockerfile -t drone/drone .
|
# docker build --rm -f docker/Dockerfile -t drone/drone .
|
||||||
|
|
||||||
FROM alpine:3.6 as alpine
|
FROM alpine:3.9 as alpine
|
||||||
RUN apk add -U --no-cache ca-certificates
|
RUN apk add -U --no-cache ca-certificates
|
||||||
|
|
||||||
FROM alpine:3.6
|
FROM alpine:3.9
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# docker build --rm -f docker/Dockerfile -t drone/drone .
|
# docker build --rm -f docker/Dockerfile -t drone/drone .
|
||||||
|
|
||||||
FROM alpine:3.6 as alpine
|
FROM alpine:3.9 as alpine
|
||||||
RUN apk add -U --no-cache ca-certificates
|
RUN apk add -U --no-cache ca-certificates
|
||||||
|
|
||||||
FROM alpine:3.6
|
FROM alpine:3.9
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# docker build --rm -f docker/Dockerfile -t drone/drone .
|
# docker build --rm -f docker/Dockerfile -t drone/drone .
|
||||||
|
|
||||||
FROM alpine:3.6 as alpine
|
FROM alpine:3.9 as alpine
|
||||||
RUN apk add -U --no-cache ca-certificates
|
RUN apk add -U --no-cache ca-certificates
|
||||||
|
|
||||||
FROM alpine:3.6
|
FROM alpine:3.9
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
@ -22,12 +22,14 @@ import (
|
|||||||
// s3gof3r as an alternate. github.com/rlmcpherson/s3gof3r
|
// s3gof3r as an alternate. github.com/rlmcpherson/s3gof3r
|
||||||
|
|
||||||
// NewS3Env returns a new S3 log store.
|
// NewS3Env returns a new S3 log store.
|
||||||
func NewS3Env(bucket, prefix string) core.LogStore {
|
func NewS3Env(bucket, prefix, endpoint string) core.LogStore {
|
||||||
return &s3store{
|
return &s3store{
|
||||||
bucket: bucket,
|
bucket: bucket,
|
||||||
prefix: prefix,
|
prefix: prefix,
|
||||||
session: session.Must(
|
session: session.Must(
|
||||||
session.NewSession(),
|
session.NewSession(&aws.Config{
|
||||||
|
Endpoint: aws.String(endpoint),
|
||||||
|
}),
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user