-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
as part of this: kairos-io/kairos#1609 Signed-off-by: Dimitris Karakasilis <[email protected]>
- Loading branch information
1 parent
2dbc00d
commit 678f7d4
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |