Skip to content

Commit

Permalink
Add provider-kairos package
Browse files Browse the repository at this point in the history
as part of this: kairos-io/kairos#1609

Signed-off-by: Dimitris Karakasilis <[email protected]>
  • Loading branch information
jimmykarily committed Jul 18, 2023
1 parent 2dbc00d commit 678f7d4
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
38 changes: 38 additions & 0 deletions packages/system/provider-kairos/build.yaml
Original file line number Diff line number Diff line change
@@ -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 changes: 35 additions & 0 deletions packages/system/provider-kairos/collection.yaml
Original file line number Diff line number Diff line change
@@ -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: "0.1.2"
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"

0 comments on commit 678f7d4

Please sign in to comment.