mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
+openshift.com (#5507)
* new file: projects/openshift.com/package.yml * \n * go.dev: ^1.16 * Update package.yml * GO_REQUIRED_MIN_VERSION:=1.21 * SHELL * cross-build-{{hw.platform}}-amd64 & cross-build-{{hw.platform}}-arm64 * ARCH * Oh, I got it. First I have to declare this variable. I didn't know that * let's try clang * i don't know why it does this * not this * -buildmode=pie --------- Co-authored-by: Jacob Heider <jacob@pkgx.dev>
This commit is contained in:
parent
fd5653b2eb
commit
30b24c303a
1 changed files with 50 additions and 0 deletions
50
projects/openshift.com/package.yml
Normal file
50
projects/openshift.com/package.yml
Normal file
|
@ -0,0 +1,50 @@
|
|||
distributable:
|
||||
url: https://mirror.openshift.com/pub/openshift-v{{version.major}}/clients/ocp/{{version}}/openshift-client-src.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
versions:
|
||||
url: https://mirror.openshift.com/pub/openshift-v4/clients/ocp/
|
||||
match: /\d+\.\d+\.\d+/
|
||||
|
||||
dependencies:
|
||||
kerberos.org: ^1.21
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
go.dev: ^1.21
|
||||
linux:
|
||||
gnu.org/gcc: '*' # aarch64 wants `ld.gold`
|
||||
script:
|
||||
# linux builds like to segfault without -buildmode=pie
|
||||
- run: sed -i 's/GO_LD_EXTRAFLAGS :=/GO_LD_EXTRAFLAGS :=-buildmode=pie /' Makefile
|
||||
if: linux
|
||||
|
||||
- make $ARGS
|
||||
- install -D _output/bin/{{hw.platform}}_${ARCH}/oc {{prefix}}/bin/oc
|
||||
env:
|
||||
# Without declaring ARCH, cross-build-{{hw.platform}}-${ARCH} will execute like cross-build-{{hw.platform}}-
|
||||
ARCH:
|
||||
x86-64:
|
||||
ARCH: amd64
|
||||
aarch64:
|
||||
ARCH: arm64
|
||||
ARGS:
|
||||
- cross-build-{{hw.platform}}-${ARCH}
|
||||
- OS_GIT_VERSION={{version}}
|
||||
linux:
|
||||
ARGS:
|
||||
# https://github.com/openshift/oc/issues/562
|
||||
- SHELL=/bin/bash
|
||||
|
||||
provides:
|
||||
- bin/oc
|
||||
|
||||
test:
|
||||
script:
|
||||
- touch ./kubeconfig
|
||||
- oc version --client --output=json | grep {{version}}
|
||||
- oc config set-context foo 2>&1 | grep 'created'
|
||||
- oc config get-contexts -o name | grep 'foo'
|
||||
- cat kubeconfig | grep 'foo'
|
||||
env:
|
||||
KUBECONFIG: $PWD/kubeconfig
|
Loading…
Reference in a new issue