mirror of
https://github.com/kairos-io/packages.git
synced 2025-08-21 17:35:09 +00:00
Fix agent webui (#224)
This commit is contained in:
parent
bb2d1750ee
commit
dc1ae6a9c7
@ -1,3 +1,4 @@
|
|||||||
category: "kernels"
|
category: "kernels"
|
||||||
name: "linux-tegra"
|
name: "linux-tegra"
|
||||||
version: "5.15"
|
version: "5.15"
|
||||||
|
arch: "x86_64"
|
||||||
|
@ -1,19 +1,38 @@
|
|||||||
requires:
|
image: opensuse/tumbleweed
|
||||||
- name: "toolchain-go"
|
|
||||||
category: "development"
|
|
||||||
version: ">=0"
|
|
||||||
prelude:
|
|
||||||
- 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:
|
env:
|
||||||
- GOPATH=/luetbuild/go/
|
|
||||||
- GITHUB_ORG={{ ( index .Values.labels "github.owner" ) }}
|
- GITHUB_ORG={{ ( index .Values.labels "github.owner" ) }}
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
- LDFLAGS="-s -w -X github.com/kairos-io/kairos/v2/internal/common.VERSION=v${PACKAGE_VERSION}"
|
- LDFLAGS="-s -w -X github.com/kairos-io/kairos/v2/internal/common.VERSION=v${PACKAGE_VERSION}"
|
||||||
|
- HUGO_VERSION=0.110.0
|
||||||
|
prelude:
|
||||||
|
- zypper ref && zypper in -y git wget tar nodejs-default gzip npm go
|
||||||
|
- mkdir /go/src/github.com/${GITHUB_ORG}/ -p
|
||||||
|
- cd /go/src/github.com/${GITHUB_ORG}/ && git clone --branch v${PACKAGE_VERSION} https://github.com/${GITHUB_ORG}/{{ .Values.name }}.git
|
||||||
|
- cd /go/src/github.com/${GITHUB_ORG}/ && git clone https://github.com/${GITHUB_ORG}/kairos-docs.git
|
||||||
steps:
|
steps:
|
||||||
|
# Docs for webui
|
||||||
|
# TODO: build this as a package and use requires
|
||||||
|
- mkdir -p /go/src/github.com/${GITHUB_ORG}/{{ .Values.name }}/internal/webui/public/local
|
||||||
|
- |
|
||||||
|
wget "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-{{ .Values.arch }}.tar.gz" && \
|
||||||
|
tar xzf hugo_extended_${HUGO_VERSION}_linux-{{ .Values.arch }}.tar.gz && \
|
||||||
|
rm -r hugo_extended_${HUGO_VERSION}_linux-{{ .Values.arch }}.tar.gz && \
|
||||||
|
chmod +x hugo && \
|
||||||
|
mv hugo /usr/bin && \
|
||||||
|
cd /go/src/github.com/${GITHUB_ORG}/kairos-docs && \
|
||||||
|
npm install postcss-cli && \
|
||||||
|
npm run prepare && \
|
||||||
|
HUGO_ENV="production" /usr/bin/hugo --gc -b "/local/" -d "public/"
|
||||||
|
|
||||||
|
- cp -r /go/src/github.com/${GITHUB_ORG}/kairos-docs/public/* /go/src/github.com/${GITHUB_ORG}/{{ .Values.name }}/internal/webui/public/local
|
||||||
|
# Deps for webui
|
||||||
|
# TODO: If we use requires we cannot run this unless we package nodejs...
|
||||||
|
- cd /go/src/github.com/${GITHUB_ORG}/{{ .Values.name }}/internal/webui/public && npm install
|
||||||
|
# Now for the real binary with everything bundled!
|
||||||
- |
|
- |
|
||||||
PACKAGE_VERSION=${PACKAGE_VERSION%\+*} && \
|
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/
|
cd /go/src/github.com/${GITHUB_ORG}/{{ .Values.name }}/ && \
|
||||||
|
go build -o /usr/bin/{{ .Values.name }} -ldflags="${LDFLAGS}"
|
||||||
- chmod +x /usr/bin/{{.Values.name}}
|
- chmod +x /usr/bin/{{.Values.name}}
|
||||||
includes:
|
includes:
|
||||||
- /usr/bin/{{.Values.name}}
|
- /usr/bin/{{.Values.name}}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
name: "kairos-agent"
|
name: "kairos-agent"
|
||||||
category: "system"
|
category: "system"
|
||||||
version: "2.0.0-rc4"
|
version: "2.0.1"
|
||||||
|
arch: "amd64"
|
||||||
labels:
|
labels:
|
||||||
github.repo: "kairos-agent"
|
github.repo: "kairos-agent"
|
||||||
autobump.revdeps: "true"
|
autobump.revdeps: "true"
|
||||||
|
Loading…
Reference in New Issue
Block a user