+vcluster.com (#5516)

* new file:   projects/vcluster.com/package.yml

* i want to see full out.log on linux

* +ca-certs +gcc
This commit is contained in:
Andrew 2024-03-11 15:57:26 +02:00 committed by GitHub
parent 822b8b6e19
commit 9ac9fe2666
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,47 @@
distributable:
url: git+https://github.com/loft-sh/vcluster.git
ref: ${{version.tag}}
versions:
github: loft-sh/vcluster
dependencies:
kubernetes.io/kubectl: ^1
linux:
curl.se/ca-certs: '*'
build:
dependencies:
go.dev: ^1.21
linux:
# gcc: error: invalid linker name in argument '-fuse-ld=gold'
gnu.org/gcc: '*'
script:
- go generate ./...
- go build $ARGS -ldflags="$LDFLAGS" ./cmd/vclusterctl/main.go
env:
COMMIT_SHA: "$(git describe --always --abbrev=8 --dirty)"
VERSION_DATE: "$(date -u +%FT%TZ)"
LDFLAGS:
- -s
- -w
- -X main.commitHash=${COMMIT_SHA}
- -X main.buildDate=${VERSION_DATE}
- -X main.version={{version}}
ARGS:
- -mod vendor
- -trimpath
- -o={{prefix}}/bin/vcluster
linux:
ARGS:
- -buildmode=pie
provides:
- bin/vcluster
test:
- export PATH={{deps.helm.sh.prefix}}/bin:$PATH
- vcluster --version | grep {{version}}
- vcluster --help | grep 'vcluster root command'
- vcluster create vcluster -n vcluster --create-namespace 2>out.log || true
- cat out.log | grep 'please make sure you have access to a kubernetes cluster and the command'