Skip to content

Commit

Permalink
Merge pull request #280 from devopsfaith/v1.3.0-dev
Browse files Browse the repository at this point in the history
bump v1.3.0
  • Loading branch information
kpacha authored Feb 24, 2021
2 parents 25050a1 + f5c62c6 commit f77ed77
Show file tree
Hide file tree
Showing 25 changed files with 109 additions and 179 deletions.
26 changes: 0 additions & 26 deletions Dockerfile.alpine

This file was deleted.

109 changes: 21 additions & 88 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

BIN_NAME :=krakend
OS := $(shell uname | tr '[:upper:]' '[:lower:]')
VERSION := 1.2.0
VERSION := 1.3.0
PKGNAME := krakend
LICENSE := Apache 2.0
VENDOR=
Expand All @@ -18,7 +18,7 @@ DESC := High performance API gateway. Aggregate, filter, manipulate and add midd
MAINTAINER := Daniel Ortiz <[email protected]>
DOCKER_WDIR := /tmp/fpm
DOCKER_FPM := devopsfaith/fpm
GOLANG_VERSION := 1.15.2
GOLANG_VERSION := 1.15.8

FPM_OPTS=-s dir -v $(VERSION) -n $(PKGNAME) \
--license "$(LICENSE)" \
Expand All @@ -36,8 +36,6 @@ DEB_OPTS= -t deb --deb-user $(USER) \
--after-remove builder/scripts/postrm.deb \
--before-install builder/scripts/preinst.deb

DEB_INIT=--deb-init builder/files/krakend.init

RPM_OPTS =--rpm-user $(USER) \
--before-install builder/scripts/preinst.rpm \
--before-remove builder/scripts/prerm.rpm \
Expand Down Expand Up @@ -89,33 +87,11 @@ build:
test: build
go test -v ./tests

docker_build:
build_on_docker:
docker run --rm -it -v "${PWD}:/app" -w /app golang:${GOLANG_VERSION} make build

krakend_docker: docker_build
docker build -t devopsfaith/krakend:${VERSION} .

krakend_docker_alpine:
docker build -t devopsfaith/krakend:${VERSION}-alpine -f Dockerfile.alpine .

tgz: builder/skel/tgz/usr/bin/krakend
tgz: builder/skel/tgz/etc/krakend/krakend.json
tgz: builder/skel/tgz/etc/init.d/krakend
tar zcvf krakend_${VERSION}_${ARCH}.tar.gz -C builder/skel/tgz/ .

deb: ubuntu debian
rpm: el6 el7

ubuntu: ubuntu-trusty ubuntu-xenial
debian: debian-wheezy debian-jessie debian-stretch

builder/skel/el6/etc/init/krakend.conf: builder/files/krakend.conf.el6
mkdir -p "$(dir $@)"
cp builder/files/krakend.conf.el6 "$@"

builder/skel/%/etc/init/krakend.conf: builder/files/krakend.conf
mkdir -p "$(dir $@)"
cp builder/files/krakend.conf "$@"
docker:
docker build --pull -t devopsfaith/krakend:${VERSION} .

builder/skel/%/etc/init.d/krakend: builder/files/krakend.init
mkdir -p "$(dir $@)"
Expand All @@ -137,73 +113,30 @@ builder/skel/%/usr/lib/systemd/system/krakend.service: builder/files/krakend.ser
mkdir -p "$(dir $@)"
cp builder/files/krakend.service "$@"

.PHONY: ubuntu-trusty
ubuntu-trusty: builder/skel/ubuntu-trusty/usr/bin/krakend
ubuntu-trusty: builder/skel/ubuntu-trusty/etc/krakend/krakend.json
ubuntu-trusty: builder/skel/ubuntu-trusty/etc/init.d/krakend
ubuntu-trusty: builder/skel/ubuntu-trusty/etc/init/krakend.conf
docker run --rm -it -v "${PWD}:${DOCKER_WDIR}" -w ${DOCKER_WDIR} ${DOCKER_FPM}:deb -t deb ${DEB_OPTS} \
--iteration ${RELEASE}.ubuntu-trusty \
-C builder/skel/ubuntu-trusty \
${DEB_INIT} \
${FPM_OPTS}

.PHONY: ubuntu-xenial
ubuntu-xenial: builder/skel/ubuntu-xenial/usr/bin/krakend
ubuntu-xenial: builder/skel/ubuntu-xenial/etc/krakend/krakend.json
docker run --rm -it -v "${PWD}:${DOCKER_WDIR}" -w ${DOCKER_WDIR} ${DOCKER_FPM}:deb -t deb ${DEB_OPTS} \
--iteration ${RELEASE}.ubuntu-xenial \
--deb-systemd builder/files/krakend.service \
-C builder/skel/ubuntu-xenial \
${FPM_OPTS}

.PHONY: debian-wheezy
debian-wheezy: builder/skel/debian-wheezy/usr/bin/krakend
debian-wheezy: builder/skel/debian-wheezy/etc/krakend/krakend.json
debian-wheezy: builder/skel/debian-wheezy/etc/init.d/krakend
debian-wheezy: builder/skel/debian-wheezy/etc/init/krakend.conf
docker run --rm -it -v "${PWD}:${DOCKER_WDIR}" -w ${DOCKER_WDIR} ${DOCKER_FPM}:deb -t deb ${DEB_OPTS} \
--iteration ${RELEASE}.debian-wheezy \
-C builder/skel/debian-wheezy \
--before-install builder/scripts/preinst-debian-wheezy.deb \
${DEB_INIT} \
${FPM_OPTS}

.PHONY: debian-jessie
debian-jessie: builder/skel/debian-jessie/usr/bin/krakend
debian-jessie: builder/skel/debian-jessie/etc/krakend/krakend.json
docker run --rm -it -v "${PWD}:${DOCKER_WDIR}" -w ${DOCKER_WDIR} ${DOCKER_FPM}:deb -t deb ${DEB_OPTS} \
--iteration ${RELEASE}.debian-jessie \
--deb-systemd builder/files/krakend.service \
-C builder/skel/debian-jessie \
${FPM_OPTS}
.PHONE: tgz
tgz: builder/skel/tgz/usr/bin/krakend
tgz: builder/skel/tgz/etc/krakend/krakend.json
tgz: builder/skel/tgz/etc/init.d/krakend
tar zcvf krakend_${VERSION}_${ARCH}.tar.gz -C builder/skel/tgz/ .

.PHONY: debian-stretch
debian-stretch: builder/skel/debian-stretch/usr/bin/krakend
debian-stretch: builder/skel/debian-stretch/etc/krakend/krakend.json
.PHONY: deb
deb: builder/skel/deb/usr/bin/krakend
deb: builder/skel/deb/etc/krakend/krakend.json
docker run --rm -it -v "${PWD}:${DOCKER_WDIR}" -w ${DOCKER_WDIR} ${DOCKER_FPM}:deb -t deb ${DEB_OPTS} \
--iteration ${RELEASE}.debian-stretch \
--iteration ${RELEASE} \
--deb-systemd builder/files/krakend.service \
-C builder/skel/debian-stretch \
-C builder/skel/deb \
${FPM_OPTS}

.PHONY: el7
el7: builder/skel/el7/usr/lib/systemd/system/krakend.service
el7: builder/skel/el7/usr/bin/krakend
el7: builder/skel/el7/etc/krakend/krakend.json
.PHONY: rpm
rpm: builder/skel/rpm/usr/lib/systemd/system/krakend.service
rpm: builder/skel/rpm/usr/bin/krakend
rpm: builder/skel/rpm/etc/krakend/krakend.json
docker run --rm -it -v "${PWD}:${DOCKER_WDIR}" -w ${DOCKER_WDIR} ${DOCKER_FPM}:rpm -t rpm ${RPM_OPTS} \
--iteration ${RELEASE}.el7 \
-C builder/skel/el7 \
--iteration ${RELEASE} \
-C builder/skel/rpm \
${FPM_OPTS}

.PHONY: el6
el6: builder/skel/el6/etc/init/krakend.conf
el6: builder/skel/el6/usr/bin/krakend
el6: builder/skel/el6/etc/krakend/krakend.json
docker run --rm -it -v "${PWD}:${DOCKER_WDIR}" -w ${DOCKER_WDIR} ${DOCKER_FPM}:rpm -t rpm ${RPM_OPTS} \
--iteration ${RELEASE}.el6 \
-C builder/skel/el6 \
${FPM_OPTS}

.PHONY: clean
clean:
Expand Down
11 changes: 0 additions & 11 deletions builder/files/krakend.conf

This file was deleted.

8 changes: 0 additions & 8 deletions builder/files/krakend.conf.el6

This file was deleted.

13 changes: 0 additions & 13 deletions builder/scripts/preinst-debian-wheezy.deb

This file was deleted.

10 changes: 5 additions & 5 deletions executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (

krakendbf "github.com/devopsfaith/bloomfilter/krakend"
cel "github.com/devopsfaith/krakend-cel"
"github.com/devopsfaith/krakend-cobra"
cmd "github.com/devopsfaith/krakend-cobra"
cors "github.com/devopsfaith/krakend-cors/gin"
gelf "github.com/devopsfaith/krakend-gelf"
"github.com/devopsfaith/krakend-gologging"
"github.com/devopsfaith/krakend-jose"
gologging "github.com/devopsfaith/krakend-gologging"
jose "github.com/devopsfaith/krakend-jose"
logstash "github.com/devopsfaith/krakend-logstash"
metrics "github.com/devopsfaith/krakend-metrics/gin"
opencensus "github.com/devopsfaith/krakend-opencensus"
Expand All @@ -35,7 +35,7 @@ import (
server "github.com/devopsfaith/krakend/transport/http/server/plugin"
"github.com/gin-gonic/gin"
"github.com/go-contrib/uuid"
"github.com/letgoapp/krakend-influx"
influxdb "github.com/letgoapp/krakend-influx"
)

// NewExecutor returns an executor for the cmd package. The executor initalizes the entire gateway by
Expand Down Expand Up @@ -211,7 +211,7 @@ type DefaultRunServerFactory struct{}
func (d *DefaultRunServerFactory) NewRunServer(l logging.Logger, next router.RunServerFunc) RunServer {
return RunServer(server.New(
l,
server.RunServer(cors.NewRunServer(cors.RunServer(next))),
server.RunServer(cors.NewRunServer(cors.NewRunServerWithLogger(cors.RunServer(next), l))),
))
}

Expand Down
18 changes: 9 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@ require (
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/devopsfaith/bloomfilter v0.0.0-20190317200532-4687d0b9aa2a
github.com/devopsfaith/flatmap v0.0.0-20200601181759-8521186182fc // indirect
github.com/devopsfaith/krakend v1.1.2-0.20200930142252-7c9d4ace4128
github.com/devopsfaith/krakend v1.2.1-0.20210212160439-f312fca7be1e
github.com/devopsfaith/krakend-amqp v1.1.1-0.20200703170727-f0e7ebe619af
github.com/devopsfaith/krakend-botdetector v0.0.0-20200729112051-82f1b8f8fdfe
github.com/devopsfaith/krakend-cel v0.0.0-20200908134208-7162c125376d
github.com/devopsfaith/krakend-cel v0.0.0-20210127195753-2e4f1c7580e4
github.com/devopsfaith/krakend-circuitbreaker v0.0.0-20200703180246-3ea7a4c22c3b
github.com/devopsfaith/krakend-cobra v0.0.0-20200317174411-3518505e8cd2
github.com/devopsfaith/krakend-consul v0.0.0-20190130102841-7623a4da32a1
github.com/devopsfaith/krakend-cors v0.0.0-20200615164006-ad82a58ac55d
github.com/devopsfaith/krakend-consul v0.0.0-20210209180917-00d2bff69730
github.com/devopsfaith/krakend-cors v0.0.0-20210126212640-09bb3851d085
github.com/devopsfaith/krakend-etcd v0.0.0-20190425091451-d989a26508d7
github.com/devopsfaith/krakend-flexibleconfig v0.0.0-20190408143848-fc4ef2b4d5cf
github.com/devopsfaith/krakend-flexibleconfig v0.0.0-20210222183249-754d3c696149
github.com/devopsfaith/krakend-gelf v0.0.0-20181019222239-59c0250b1c60
github.com/devopsfaith/krakend-gologging v0.0.0-20190131142345-f3f256584ecc
github.com/devopsfaith/krakend-httpcache v0.0.0-20181030153148-8474476ff874
github.com/devopsfaith/krakend-httpsecure v0.0.0-20191009151918-298638962e76
github.com/devopsfaith/krakend-jose v1.1.1-0.20210119142416-ee6196d50d07
github.com/devopsfaith/krakend-jose v1.1.1-0.20210219175810-9b453c61a92e
github.com/devopsfaith/krakend-jsonschema v0.0.0-20200611142303-11a34c8149c3
github.com/devopsfaith/krakend-lambda v0.0.0-20201005114349-3d7d5730c1fa
github.com/devopsfaith/krakend-logstash v0.0.0-20190131142205-17f4745d3502
github.com/devopsfaith/krakend-lua v1.1.2-0.20200909152058-1b4e6c9afb8f
github.com/devopsfaith/krakend-lua v1.1.2-0.20210209235241-e842cd2d676e
github.com/devopsfaith/krakend-martian v0.0.0-20191207191841-92e3287c36d9
github.com/devopsfaith/krakend-metrics v1.1.0
github.com/devopsfaith/krakend-oauth2-clientcredentials v1.1.0
github.com/devopsfaith/krakend-opencensus v1.1.1-0.20200707175954-c3b3652bb365
github.com/devopsfaith/krakend-opencensus v1.1.1-0.20201119132304-815fbc5addba
github.com/devopsfaith/krakend-pubsub v0.0.0-20200728135630-1781054836a5
github.com/devopsfaith/krakend-ratelimit v1.1.1-0.20200309135238-076143483904
github.com/devopsfaith/krakend-ratelimit v1.1.1-0.20210208161207-53a76133553a
github.com/devopsfaith/krakend-rss v0.0.0-20200914123253-f81cced96000
github.com/devopsfaith/krakend-usage v0.0.0-20181025134340-476779c0a36c
github.com/devopsfaith/krakend-viper v0.0.0-20200605164302-854fa4ff4a66
Expand Down
Loading

0 comments on commit f77ed77

Please sign in to comment.