From 9ac9fe2666281b1b6e653aac95b01b517658ab29 Mon Sep 17 00:00:00 2001 From: Andrew <51118083+ArionThinker@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:57:26 +0200 Subject: [PATCH] +vcluster.com (#5516) * new file: projects/vcluster.com/package.yml * i want to see full out.log on linux * +ca-certs +gcc --- projects/vcluster.com/package.yml | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 projects/vcluster.com/package.yml diff --git a/projects/vcluster.com/package.yml b/projects/vcluster.com/package.yml new file mode 100644 index 00000000..cbaf7d0a --- /dev/null +++ b/projects/vcluster.com/package.yml @@ -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' \ No newline at end of file