traefik.io (#3772)

* new file:   projects/traefik.io/package.yml

* fix linux
This commit is contained in:
Andrew 2023-10-23 17:07:35 +03:00 committed by GitHub
parent f255ed67f8
commit 06c537c7ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,45 @@
distributable:
url: https://github.com/traefik/traefik/releases/download/v{{version}}/traefik-v{{version}}.src.tar.gz
strip-components: 1
versions:
github: traefik/traefik
build:
dependencies:
go.dev: '*'
script:
- go generate
- go build $GO_ARGS -ldflags="$LD_FLAGS" ./cmd/traefik
env:
GO_ARGS:
- -trimpath
- -o="{{prefix}}/bin/traefik"
LD_FLAGS:
- -s
- -w
- -X github.com/traefik/traefik/v{{version.major}}/pkg/version.Version={{version}}
linux:
LD_FLAGS:
- -buildmode=pie
provides:
- bin/traefik
test:
dependencies:
curl.se: '*'
script:
- traefik version 2>&1 | grep {{version}}
- mv $FIXTURE traefik.toml
- traefik --configfile=$PWD/traefik.toml &
- sleep 5
- curl -sIm3 -XGET http://127.0.0.1:2020/ | grep "HTTP/1.1 404 Not Found"
- sleep 1
- curl -sIm3 -XGET http://127.0.0.1:2030/dashboard/ | grep "HTTP/1.1 200 OK"
- killall traefik || true
fixture: |
[entryPoints]
[entryPoints.http]
address = ":2020"
[entryPoints.traefik]
address = ":2030"
[api]
insecure = true
dashboard = true