diff --git a/k3s.yaml b/k3s.yaml new file mode 100644 index 00000000000..9d1a8ad3fe8 --- /dev/null +++ b/k3s.yaml @@ -0,0 +1,57 @@ +package: + name: k3s + version: 1.27.2_k3s1 + epoch: 0 + description: + copyright: + - license: Apache-2.0 + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - go + - git + - curl + - yq + - libseccomp-dev + - zstd + +var-transforms: + - from: ${{package.version}} + match: \_ + replace: + + to: mangled-package-version + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/k3s-io/k3s + tag: v${{vars.mangled-package-version}} + expected-commit: 213d7ad499e166290872f51c63d8eaa2f1fe78b3 + + - runs: | + # k3s normally uses a tool called dapper to do this in a consistent environment + # melange already provides a consistent environment, so we can just do it manually + # thankfully the dapper wrapper stuff is just a few levels of indirection + # from calling these scripts in the right order, so what could go wrong? + + mkdir -p build/data bin build/static + ./scripts/generate + ./scripts/download + ./scripts/build + + # The package script tries to package images as well, comment that part out: + sed -i 's/^\.\/package-image/#&/' ./scripts/package + SKIP_AIRGAP=1 ./scripts/package + + mkdir -p ${{targets.destdir}}/usr/bin + mv dist/artifacts/k3s-* ${{targets.destdir}}/usr/bin/k3s + +update: + enabled: true + github: + identifier: k3s-io/k3s + strip-prefix: v diff --git a/packages.txt b/packages.txt index f0b7366fde2..e7de67b31a9 100644 --- a/packages.txt +++ b/packages.txt @@ -749,3 +749,4 @@ ingress-nginx-controller tomcat tomcat-native cilium-cli +k3s