Andrey Smirnov 263f699ea4
chore: annotate extensions with tiers
Fixes #10940

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-08-26 20:58:30 +04:00

47 lines
2.1 KiB
YAML

name: cloudflared
variant: scratch
shell: /bin/bash
dependencies:
- stage: base
steps:
- sources:
# {{ if eq .ARCH "aarch64" }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
- url: https://github.com/cloudflare/cloudflared/releases/download/{{ .CLOUDFLARED_VERSION }}/cloudflared-linux-arm64
destination: cloudflared
sha256: {{ .CLOUDFLARED_ARM64_SHA256 }}
sha512: {{ .CLOUDFLARED_ARM64_SHA512 }}
# {{ else if eq .ARCH "x86_64" }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
- url: https://github.com/cloudflare/cloudflared/releases/download/{{ .CLOUDFLARED_VERSION }}/cloudflared-linux-amd64
destination: cloudflared
sha256: {{ .CLOUDFLARED_AMD64_SHA256 }}
sha512: {{ .CLOUDFLARED_AMD64_SHA512 }}
# {{ end }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
install:
- |
mkdir -p /rootfs/usr/local/lib/containers/cloudflared/usr/local/bin
mv cloudflared /rootfs/usr/local/lib/containers/cloudflared/usr/local/bin
chmod +x /rootfs/usr/local/lib/containers/cloudflared/usr/local/bin/cloudflared
- |
mkdir -p /rootfs/usr/local/etc/containers
cp /pkg/cloudflared.yaml /rootfs/usr/local/etc/containers/
test:
- |
mkdir -p /extensions-validator-rootfs
cp -r /rootfs/ /extensions-validator-rootfs/rootfs
cp /pkg/manifest.yaml /extensions-validator-rootfs/manifest.yaml
/extensions-validator validate --rootfs=/extensions-validator-rootfs --pkg-name="${PKG_NAME}"
- |
[[ $(/rootfs/usr/local/lib/containers/cloudflared/usr/local/bin/cloudflared version) == *{{ .CLOUDFLARED_VERSION }}* ]]
sbom:
outputPath: /rootfs/usr/local/share/spdx/cloudflared.spdx.json
version: {{ .CLOUDFLARED_VERSION }}
cpes:
- cpe:2.3:a:cloudflare:cloudflared:{{ .CLOUDFLARED_VERSION }}:*:*:*:*:*:*:*
licenses:
- Apache-2.0
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /