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: /