mirror of
https://github.com/kairos-io/packages.git
synced 2025-08-02 08:10:19 +00:00
Add provider-kairos package
as part of this: https://github.com/kairos-io/kairos/issues/1609 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
parent
2dbc00de7a
commit
4392f5997d
38
packages/system/provider-kairos/build.yaml
Normal file
38
packages/system/provider-kairos/build.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
{{if or (eq .Values.category "fips") (eq .Values.category "fips-static")}}
|
||||
requires:
|
||||
- name: "toolchain-go-ubuntu"
|
||||
category: "fips"
|
||||
version: ">=0"
|
||||
{{else}}
|
||||
requires:
|
||||
- name: "toolchain-go-ubuntu"
|
||||
category: "development"
|
||||
version: ">=0"
|
||||
{{end}}
|
||||
prelude:
|
||||
{{if or (eq .Values.category "fips") (eq .Values.category "fips-static")}}
|
||||
- apt-get update && apt-get install gcc
|
||||
{{end}}
|
||||
- mkdir go/src/github.com/${GITHUB_ORG}/ -p
|
||||
- cd go/src/github.com/${GITHUB_ORG}/ && git clone https://github.com/${GITHUB_ORG}/{{ .Values.name }}.git
|
||||
env:
|
||||
- GOPATH=/luetbuild/go/
|
||||
- GITHUB_ORG={{ ( index .Values.labels "github.owner" ) }}
|
||||
{{if or (eq .Values.category "fips") (eq .Values.category "fips-static")}}
|
||||
- CGO_ENABLED=1
|
||||
- GOEXPERIMENT=boringcrypto
|
||||
- LDFLAGS="-w -X github.com/kairos-io/provider-kairos/v2/internal/cli.VERSION=v${PACKAGE_VERSION} {{with .Values.ldflags}}{{.}}{{end}}"
|
||||
{{else}}
|
||||
- CGO_ENABLED=0
|
||||
- LDFLAGS="-s -w -X github.com/kairos-io/provider-kairos/v2/internal/cli.VERSION=v${PACKAGE_VERSION} {{with .Values.ldflags}}{{.}}{{end}}"
|
||||
{{end}}
|
||||
steps:
|
||||
- |
|
||||
PACKAGE_VERSION=${PACKAGE_VERSION%\+*} && \
|
||||
cd go/src/github.com/${GITHUB_ORG}/{{ .Values.name }}/ && git checkout v"${PACKAGE_VERSION}" -b build && go build -o {{ .Values.name }} -ldflags="${LDFLAGS}" && mv {{.Values.name}} /usr/bin/
|
||||
- chmod +x /usr/bin/{{.Values.name}}
|
||||
{{if or (eq .Values.category "fips") (eq .Values.category "fips-static")}}
|
||||
- /usr/bin/{{.Values.name}} version 2>&1 >/dev/null | grep -i boringcrypto
|
||||
{{end}}
|
||||
includes:
|
||||
- /usr/bin/{{.Values.name}}
|
35
packages/system/provider-kairos/collection.yaml
Normal file
35
packages/system/provider-kairos/collection.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
packages:
|
||||
- name: "provider-kairos"
|
||||
category: "system"
|
||||
version: "2.3.0"
|
||||
labels:
|
||||
github.repo: "provider-kairos"
|
||||
autobump.revdeps: "true"
|
||||
github.owner: "kairos-io"
|
||||
uri:
|
||||
- https://github.com/kairos-io/provider-kairos
|
||||
license: "Apache License v2"
|
||||
description: "The Kairos standard provider"
|
||||
- name: "provider-kairos"
|
||||
category: "fips"
|
||||
version: "2.3.0"
|
||||
labels:
|
||||
github.repo: "provider-kairos"
|
||||
autobump.revdeps: "true"
|
||||
github.owner: "kairos-io"
|
||||
uri:
|
||||
- https://github.com/kairos-io/provider-kairos
|
||||
license: "Apache License v2"
|
||||
description: "The Kairos standard provider"
|
||||
- name: "provider-kairos"
|
||||
category: "fips-static"
|
||||
ldflags: "-linkmode external -extldflags -static"
|
||||
version: "2.3.0"
|
||||
labels:
|
||||
github.repo: "provider-kairos"
|
||||
autobump.revdeps: "true"
|
||||
github.owner: "kairos-io"
|
||||
uri:
|
||||
- https://github.com/kairos-io/provider-kairos
|
||||
license: "Apache License v2"
|
||||
description: "The Kairos standard provider"
|
Loading…
Reference in New Issue
Block a user