Skip to content

Commit

Permalink
Merge 7743a06 into cafa811
Browse files Browse the repository at this point in the history
  • Loading branch information
wass3r committed Mar 8, 2021
2 parents cafa811 + 7743a06 commit 4d21576
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 92 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,6 @@ config/
### Git ###
vendor
_vendor*

### GoReleaser ###
dist/
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ builds:
- windows
goarch:
- amd64
- arm64

changelog:
sort: asc
Expand Down
16 changes: 5 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ GOLANGCI_LINT_VERSION := "v1.23.8"

DOCKER_IMAGE ?= "target/flottbot"
DOCKER_FLAVORS ?= golang ruby python
PLATFORMS ?= linux/amd64 darwin/amd64 windows/amd64

# some helpers for building for each platform
p = $(subst /, ,$@)
os = $(word 1, $(p))
arch = $(word 2, $(p))

.PHONY: all
all: test build
Expand All @@ -38,17 +32,17 @@ getdeps:
.PHONY: lint
lint:
@echo "Running $@ check"
@GO111MODULE=on golangci-lint run
@golangci-lint run

.PHONY: fmt
fmt:
@echo "Running $@ check"
@GO111MODULE=on go fmt ./...
@go fmt ./...

.PHONY: vet
vet:
@echo "Running $@ check"
@GO111MODULE=on go vet ./...
@go vet ./...

.PHONY: tidy
tidy:
Expand All @@ -59,7 +53,7 @@ tidy:
ensure-go-acc:
@which go-acc 1>/dev/null || \
(echo "Installing go-acc" && \
GO111MODULE=off go get -u github.com/ory/go-acc)
go get -u github.com/ory/go-acc)

.PHONY: test
test:
Expand All @@ -83,7 +77,7 @@ clean: validate tidy
.PHONY: build
build: clean
@echo "Building flottbot binary to './flottbot'"
@GO111MODULE=on go build -a \
@go build -a \
-ldflags '$(BUILD_LDFLAGS)' -o $(PWD)/flottbot ./cmd/flottbot

# ┌┬┐┌─┐┌─┐┬┌─┌─┐┬─┐
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ We currently provide a few Docker images:

[target/flottbot:ruby](https://hub.docker.com/r/target/flottbot) - Alpine image, flottbot binary, and ruby v2.7 installed

[target/flottbot:golang](https://hub.docker.com/r/target/flottbot) - Alpine image, flottbot binary, and golang v1.15 installed
[target/flottbot:golang](https://hub.docker.com/r/target/flottbot) - Alpine image, flottbot binary, and golang v1.16 installed

[target/flottbot:python](https://hub.docker.com/r/target/flottbot) - Alpine image, flottbot binary, and python v3.8 installed

Expand All @@ -66,6 +66,7 @@ To install using the [Helm](https://helm.sh/) chart located in this repo, clone
| --------------------------------- | ------ | -------------------------------------------------------------- |
| [Slack](https://slack.com) || [Docs](https://target.github.io/flottbot-docs/basics/slack/) |
| [Discord](https://discordapp.com) | 🚧 | [Docs](https://target.github.io/flottbot-docs/basics/discord/) |
| [Telegram](https://telegram.org) | 🚧 | coming soon |

✔ = Done 🚧 = in progress

Expand Down
5 changes: 2 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM golang:1.15-alpine AS build
FROM golang:1.16-alpine AS build
ARG VERSION
ARG GIT_HASH
ENV GO111MODULE=on

WORKDIR /src

Expand All @@ -27,4 +26,4 @@ COPY --from=build /src/flottbot /flottbot
EXPOSE 3000 4000 8080

USER ${USERNAME}
CMD [ "/flottbot" ]
CMD [ "/flottbot" ]
5 changes: 2 additions & 3 deletions docker/Dockerfile.golang
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM golang:1.15-alpine AS build
FROM golang:1.16-alpine AS build
ARG VERSION
ARG GIT_HASH
ENV GO111MODULE=on

WORKDIR /src

Expand All @@ -15,7 +14,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -a -ldflags "-s -w -X github.com/target/flottbot/version.Version=${VERSION} -X github.com/target/flottbot/version.GitHash=${GIT_HASH}" \
-o flottbot ./cmd/flottbot

FROM golang:1.15-alpine
FROM golang:1.16-alpine
ENV USERNAME=flottbot
ENV GROUP=flottbot
ENV UID=900
Expand Down
3 changes: 1 addition & 2 deletions docker/Dockerfile.python
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM golang:1.15-alpine AS build
FROM golang:1.16-alpine AS build
ARG VERSION
ARG GIT_HASH
ENV GO111MODULE=on

WORKDIR /src

Expand Down
3 changes: 1 addition & 2 deletions docker/Dockerfile.ruby
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM golang:1.15-alpine AS build
FROM golang:1.16-alpine AS build
ARG VERSION
ARG GIT_HASH
ENV GO111MODULE=on

WORKDIR /src
Expand Down
34 changes: 19 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
module github.com/target/flottbot

go 1.15
go 1.16

require (
github.com/Masterminds/goutils v1.1.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/bwmarrin/discordgo v0.22.0
github.com/bwmarrin/discordgo v0.23.2
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible
github.com/google/uuid v1.1.2 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/gorilla/mux v1.8.0
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.11 // indirect
github.com/kr/pretty v0.2.0 // indirect
github.com/magefile/mage v1.11.0 // indirect
github.com/magiconair/properties v1.8.4 // indirect
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.3.3 // indirect
github.com/mitchellh/reflectwalk v1.0.1 // indirect
github.com/mitchellh/copystructure v1.1.1 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
github.com/pelletier/go-toml v1.8.1 // indirect
github.com/prometheus/client_golang v1.8.0
github.com/prometheus/common v0.15.0 // indirect
github.com/prometheus/client_golang v1.9.0
github.com/prometheus/common v0.18.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/robfig/cron/v3 v3.0.1
github.com/rs/xid v1.2.1
github.com/sirupsen/logrus v1.7.0
github.com/slack-go/slack v0.7.2
github.com/spf13/afero v1.4.1 // indirect
github.com/sirupsen/logrus v1.8.0
github.com/slack-go/slack v0.8.1
github.com/spf13/afero v1.5.1 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.5.1 // indirect
github.com/technoweenie/multipartstreamer v1.0.1 // indirect
golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 // indirect
golang.org/x/sys v0.0.0-20201113233024-12cec1faf1ba // indirect
golang.org/x/text v0.3.4 // indirect
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect
golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b // indirect
golang.org/x/text v0.3.5 // indirect
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading

0 comments on commit 4d21576

Please sign in to comment.