From 99ab6e89529f199a125be4e6526306b0d3751b84 Mon Sep 17 00:00:00 2001 From: Luca Bello Date: Thu, 5 Mar 2026 12:28:21 +0100 Subject: [PATCH 1/4] feat: spread tests and centralized justfile --- .github/workflows/pull-request.yaml | 12 +- ...rock-release-dev.yaml => release-dev.yaml} | 15 +- ...-factory.yaml => release-oci-factory.yaml} | 7 +- .github/workflows/rock-update.yaml | 21 --- .github/workflows/update.yaml | 14 ++ .gitignore | 14 ++ 4.6.0/rockcraft.yaml | 1 + justfile | 50 +++--- rocks.just | 166 ++++++++++++++++++ spread.yaml | 41 +++++ 10 files changed, 273 insertions(+), 68 deletions(-) rename .github/workflows/{rock-release-dev.yaml => release-dev.yaml} (75%) rename .github/workflows/{rock-release-oci-factory.yaml => release-oci-factory.yaml} (61%) delete mode 100644 .github/workflows/rock-update.yaml create mode 100644 .github/workflows/update.yaml create mode 100644 .gitignore create mode 100644 rocks.just create mode 100644 spread.yaml diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index ece52d4..bdcb5e7 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -1,16 +1,16 @@ name: Pull Requests -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - on: pull_request: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: pull-request: - name: PR - uses: canonical/observability/.github/workflows/rock-pull-request.yaml@v1 + name: Pull Requests + uses: canonical/observability/.github/workflows/rock-pull-request.yaml@224c92a71bb24f4c67969c331c29b46876178a81 secrets: inherit diff --git a/.github/workflows/rock-release-dev.yaml b/.github/workflows/release-dev.yaml similarity index 75% rename from .github/workflows/rock-release-dev.yaml rename to .github/workflows/release-dev.yaml index 56523d3..26c0d42 100644 --- a/.github/workflows/rock-release-dev.yaml +++ b/.github/workflows/release-dev.yaml @@ -1,18 +1,17 @@ name: "Publish rock to GHCR:dev" -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - on: workflow_dispatch: {} push: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: - build: - uses: canonical/observability/.github/workflows/rock-release-dev.yaml@v1 + release-dev: + name: Release to GHCR + uses: canonical/observability/.github/workflows/rock-release-dev.yaml@224c92a71bb24f4c67969c331c29b46876178a81 secrets: inherit - with: - rock-name: git-sync diff --git a/.github/workflows/rock-release-oci-factory.yaml b/.github/workflows/release-oci-factory.yaml similarity index 61% rename from .github/workflows/rock-release-oci-factory.yaml rename to .github/workflows/release-oci-factory.yaml index 1442d03..3a52d12 100644 --- a/.github/workflows/rock-release-oci-factory.yaml +++ b/.github/workflows/release-oci-factory.yaml @@ -7,8 +7,7 @@ on: - main jobs: - build: - uses: canonical/observability/.github/workflows/rock-release-oci-factory.yaml@v1 + release-oci-factory: + name: Release to OCI Factory + uses: canonical/observability/.github/workflows/rock-release-oci-factory.yaml@224c92a71bb24f4c67969c331c29b46876178a81 secrets: inherit - with: - rock-name: git-sync diff --git a/.github/workflows/rock-update.yaml b/.github/workflows/rock-update.yaml deleted file mode 100644 index fe47208..0000000 --- a/.github/workflows/rock-update.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: Update rock - -on: - workflow_dispatch: {} - schedule: - - cron: '0 0 * * *' - -jobs: - build: - uses: canonical/observability/.github/workflows/rock-update.yaml@v1 - secrets: inherit - with: - rock-name: git-sync - source-repo: kubernetes/git-sync - check-go: true - update-script: | - # At this point, the reusable workflow already replaced the versions in the yaml - # and set the envvar VERSION for us to use here. - # All that's left is to update the `version.VERSION=...` string - sed -i "s|version.VERSION=[^']*|version.VERSION=$VERSION|g" "$rockcraft_yaml" - diff --git a/.github/workflows/update.yaml b/.github/workflows/update.yaml new file mode 100644 index 0000000..3eb7045 --- /dev/null +++ b/.github/workflows/update.yaml @@ -0,0 +1,14 @@ +name: Update rock + +on: + workflow_dispatch: {} + schedule: + - cron: '0 0 * * 1' + +jobs: + update: + name: Update rock + uses: canonical/observability/.github/workflows/rock-update.yaml@224c92a71bb24f4c67969c331c29b46876178a81 + secrets: inherit + with: + source-repo: kubernetes/git-sync diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..905c81d --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# Ignore all spread.yaml files +*/*/spread.yaml + +# Except the one in the top-level directory +!/spread.yaml + +# Ignore copied goss.yaml files in component version directories +*/*/goss.yaml + +# Ignore rocks +*.rock + +# Ignore sboms +*.sbom.json diff --git a/4.6.0/rockcraft.yaml b/4.6.0/rockcraft.yaml index 8c23449..94e610f 100644 --- a/4.6.0/rockcraft.yaml +++ b/4.6.0/rockcraft.yaml @@ -29,6 +29,7 @@ parts: source-tag: "v4.6.0" source-depth: 1 build-snaps: + - go/1.25/stable - go/1.23/stable build-environment: - CGO_ENABLED: 0 diff --git a/justfile b/justfile index d013312..7767d9d 100644 --- a/justfile +++ b/justfile @@ -1,33 +1,25 @@ -# set quiet # Recipes are silent by default -set export # Just variables are exported to environment variables - -rock_name := `echo ${PWD##*/} | sed 's/-rock//'` -latest_version := `find . -maxdepth 1 -type d | sort -V | tail -n1 | sed 's@./@@'` +set allow-duplicate-recipes +set allow-duplicate-variables +import? 'rocks.just' [private] -default: +@default: just --list + echo "" + echo "For help with a specific recipe, run: just --usage " -# Push an OCI image to a local registry -[private] -push-to-registry version: - echo "Pushing $rock_name $version to local registry" - rockcraft.skopeo --insecure-policy copy --dest-tls-verify=false \ - "oci-archive:${version}/${rock_name}_${version}_amd64.rock" \ - "docker://localhost:32000/${rock_name}-dev:${version}" - -# Pack a rock of a specific version -pack version: - cd "$version" && rockcraft pack - -# `rockcraft clean` for a specific version -clean version: - cd "$version" && rockcraft clean - -# Run a rock and open a shell into it with `kgoss` -run version=latest_version: (push-to-registry version) - kgoss edit -i localhost:32000/${rock_name}-dev:${version} - -# Test the rock with `kgoss` -test version=latest_version: (push-to-registry version) - GOSS_OPTS="--retry-timeout 60s" kgoss run -i localhost:32000/${rock_name}-dev:${version} +# Generate a rock for the latest version of the upstream project +[arg("source_repo", help="Repository of the upstream project in 'org/repo' form")] +[group("maintenance")] +update source_repo: + #!/usr/bin/env bash + just --justfile rocks.just update {{source_repo}} + # Additional update steps + latest_release="$(gh release list --repo {{source_repo}} --exclude-pre-releases --limit=1 --json tagName --jq '.[0].tagName')" + # Explicitly filter out prefixes for known rocks, so we can notice if a new rock has a different schema + version="${latest_release}" + version="${version#mimir-}" # mimir + version="${version#cmd/builder/v}" # opentelemetry-collector + version="${version#v}" # Generic v- prefix + # Substitute the additional version reference + sed -i "s|version.VERSION=[^']*|version.VERSION=${version}|g" "${version}/rockcraft.yaml" diff --git a/rocks.just b/rocks.just new file mode 100644 index 0000000..792da12 --- /dev/null +++ b/rocks.just @@ -0,0 +1,166 @@ +# Centralized justfile for the Canonical Observability rocks +set shell := ["bash", "-uc"] + +rock_name := `echo ${PWD##*/} | sed 's/-rock$//'` # Get the rock name from the folder name +latest_version := `find . -name rockcraft.yaml -printf '%h\n' | sort -V | tail -n1 | sed 's@./@@'` + +[private] +@default: + just --list + echo "{{rock_name}}" + echo "For help with a specific recipe, run: just --usage " + +# Push an OCI image to a local registry +[private] +@push-to-registry version=latest_version: + which -s docker || { echo "docker not found"; exit 1; } + test -f "{{version}}/{{rock_name}}_{{version}}_amd64.rock" || rockcraft pack + echo "Pushing {{version}} to local docker registry" + cd {{version}}; sudo rockcraft.skopeo --insecure-policy copy --dest-tls-verify=false "oci-archive:{{rock_name}}_{{version}}_amd64.rock" docker-daemon:rockcraft-test:latest + echo "✓ Rock pushed to local registry under 'rockcraft-test:latest'" + +# Print the rock name +[group("info")] +@name: + echo "{{rock_name}}" + +# Print the latest rock version +[group("info")] +@latest-version: + echo "{{latest_version}}" + +# Pack a rock of a specific component and version +[group("dev")] +pack version=latest_version: + cd "{{version}}" && rockcraft pack + +# `rockcraft clean` for a specific component and version +[group("dev")] +clean version=latest_version: + cd "{{version}}" && rockcraft clean + +# Run a rock and open a shell into it with `docker` +[group("dev")] +run version=latest_version: (push-to-registry version) + which -s dgoss || { echo "dgoss not found"; exit 1; } + dgoss edit rockcraft-test:latest || true + +# Test a rock with `rockcraft test` +[group("dev")] +test version=latest_version: + #!/usr/bin/env bash + set -e + cp spread.yaml "{{version}}/spread.yaml" + if [ -f goss.yaml ]; then cp goss.yaml "{{version}}/goss.yaml"; fi + test_exit=0; (cd "{{version}}" && rockcraft test) || test_exit=$? + rm -f "{{version}}/spread.yaml" "{{version}}/goss.yaml" + if [ "$test_exit" -ne 0 ]; then echo "× rockcraft test failed"; exit "$test_exit"; fi + echo "✓ 'rockcraft test' passed." + +# Generate SBOM for the rock +[group("security")] +sbom version=latest_version: + syft {{version}}/*.rock -o "spdx-json={{version}}/rock.sbom.json" + +# Generate a rock for the latest version of the upstream project +[arg("source_repo", help="Repository of the upstream project in 'org/repo' form")] +[group("maintenance")] +update source_repo: + #!/usr/bin/env bash + set -e + latest_release="$(gh release list --repo {{source_repo}} --exclude-pre-releases --limit=1 --json tagName --jq '.[0].tagName')" + echo "Latest release for {{source_repo}} is $latest_release" + # Explicitly filter out prefixes for known rocks, so we can notice if a new rock has a different schema + version="${latest_release}" + version="${version#mimir-}" # mimir + version="${version#cmd/builder/v}" # opentelemetry-collector + version="${version#v}" # Generic v- prefix + # If the version already exists as a rock, exit here + if [[ -d "$version" ]]; then echo "Folder $version already exists, nothing to do" && exit 0; fi + # Create the folder for the new version and update the rockcraft.yaml + cp -r "{{latest_version}}" "$version" + latest_release="$latest_release" version="$version" yq -i \ + '.version = strenv(version) | .parts.{{rock_name}}["source-tag"] = strenv(latest_release)' \ + "./$version/rockcraft.yaml" + # Automatically update build tools (go) from the upstream repository + TMP_DIR="$(mktemp -d)" + gh repo clone "{{source_repo}}" "$TMP_DIR/{{source_repo}}" -- --branch "$latest_release" --depth 1 + # If it's a Go project, update the Go version + if [[ -f "$TMP_DIR/{{source_repo}}/go.mod" ]]; then + go_snap_version="$(grep -Po '^go \K(\S+)' "$TMP_DIR/{{source_repo}}/go.mod" | sed -E 's/([0-9]+\.[0-9]+).*/\1/')" + go_snap_version="$go_snap_version" yq -i \ + '.parts.{{rock_name}}.build-snaps += "go/"+strenv(go_snap_version)+"/stable"' \ + "./$version/rockcraft.yaml" + fi + rm -rf "$TMP_DIR" + echo "✓ Created rock for version $version" + +# Fetch centralized files from canonical/observability +[group("maintenance")] +refresh: + #!/usr/bin/env bash + refresh_folder="blueprints/rocks" + api_path="repos/canonical/observability/contents/$refresh_folder" + for file in rocks.just spread.yaml; do + echo "Fetching latest '$file' from canonical/observability ..." + gh api "$api_path/$file" --jq '.content' | base64 --decode > "$file" + echo "✓ $file updated" + done + +# Release rock to GHCR with tag `:dev` +[group("release")] +release-ghcr version=latest_version github_user="observability-noctua-bot": + #!/usr/bin/env bash + set -e + if [[ -z "$GITHUB_TOKEN" ]]; then echo "× Please export GITHUB_TOKEN for the user {{github_user}}"; exit 1; fi + if [ ! -e {{version}}/*.rock ]; then echo "× Error: rock not found. Please run 'just pack {{version}}' first."; exit 2; fi + sudo rockcraft.skopeo --insecure-policy copy \ + "oci-archive:$(realpath ./{{version}}/*.rock)" \ + "docker://ghcr.io/canonical/{{rock_name}}:dev" \ + --dest-creds "{{github_user}}:${GITHUB_TOKEN}" + echo "✓ {{rock_name}} {{version}} pushed to GHCR with tag ':dev'" + +# Open a PR to OCI Factory +[group("release")] +[arg("support",pattern="major|minor|patch")] +[arg("risk", pattern="stable|candidate|beta|edge")] +release-oci-factory version=latest_version support="minor" risk="stable": + #!/usr/bin/env bash + set -e + if [[ -z "$GITHUB_TOKEN" ]]; then echo "× Please export GITHUB_TOKEN for the user observability-noctua-bot"; exit 1; fi + if [ ! -e {{version}}/*.rock ]; then echo "× Error: rock not found. Please run 'just pack {{version}}' first."; exit 2; fi + repository="$(git remote get-url origin | sed -E 's#(git@[^:]+:|https?://[^/]+/)##; s/\.git$//')" + # Clone the oci-factory and push data to it + gh repo sync --force observability-noctua-bot/oci-factory + TMP_DIR="$(mktemp -d)" + git clone https://github.com/observability-noctua-bot/oci-factory "$TMP_DIR/oci-factory" + echo "✓ Cloned observability-noctua-bot/oci-factory" + # Build the OCI Factory manifest + echo "Building the OCI Factory manifest..."; echo + uvx --from=git+https://github.com/lucabello/noctua noctua rock manifest \ + "$repository" \ + --commit="$(git rev-parse HEAD)" \ + --base=24.04 \ + --support="{{support}}" \ + --risk="{{risk}}" \ + --version="{{version}}" \ + | tee "$TMP_DIR/oci-factory/oci/{{rock_name}}/image.yaml" + echo; echo "✓ OCI Factory manifest generated" + # Commit the changes and create a PR + pushd "$TMP_DIR/oci-factory" >/dev/null + git config user.name observability-noctua-bot + git config user.email webops+observability-noctua-bot@canonical.com + git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/observability-noctua-bot/oci-factory.git" + branch_name="update-$(date -d now +%s)" + git checkout -b "$branch_name" + git add oci/{{rock_name}}/image.yaml + git commit -m "chore: Add new {{rock_name}} releases" + git push -u origin "$branch_name" --force + echo "✓ Changes have been pushed to ${branch_name}" + gh pr create --repo canonical/oci-factory \ + --head "observability-noctua-bot:${branch_name}" \ + --title "chore: Add new {{rock_name}} releases" \ + --body "This is an automatic PR opened by the Observability Noctua bot." + popd >/dev/null + rm -rf "$TMP_DIR" + echo "✓ Release to OCI Factory completed" diff --git a/spread.yaml b/spread.yaml new file mode 100644 index 0000000..eb891d5 --- /dev/null +++ b/spread.yaml @@ -0,0 +1,41 @@ +project: rock + +backends: + craft: + type: craft + systems: + - ubuntu-24.04: + #- ubuntu-22.04: + +suites: + spread/general/: + summary: General integration tests + environment: + # Goss environment + GOSS_OPTS: "--retry-timeout=60s" + GOSS_FILES_STRATEGY: cp + DGOSS_TEMP_DIR: "$HOME" + + prepare: | + # Install dependencies + sudo snap install docker + curl -fsSL https://goss.rocks/install | sh + + # For 'rockcraft.skopeo' + sudo snap install --classic rockcraft + + # Wait for docker daemon to come online + sudo apt install --yes retry + retry --times=10 --delay 2 -- docker run hello-world + sudo apt remove --yes retry + + # Load the rock into docker + sudo rockcraft.skopeo --insecure-policy copy "oci-archive:$CRAFT_ARTIFACT" docker-daemon:rockcraft-test:latest + + restore: | + docker image rm --force rockcraft-test:latest + +exclude: + - .git + +kill-timeout: 1h From 3e9c53deca768e0a7654ac11ca0d58ef8b896c07 Mon Sep 17 00:00:00 2001 From: Luca Bello Date: Thu, 5 Mar 2026 12:46:55 +0100 Subject: [PATCH 2/4] feat: spread tests and centralized justfile --- 4.6.0/rockcraft.yaml | 1 - rocks.just | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/4.6.0/rockcraft.yaml b/4.6.0/rockcraft.yaml index 94e610f..8c23449 100644 --- a/4.6.0/rockcraft.yaml +++ b/4.6.0/rockcraft.yaml @@ -29,7 +29,6 @@ parts: source-tag: "v4.6.0" source-depth: 1 build-snaps: - - go/1.25/stable - go/1.23/stable build-environment: - CGO_ENABLED: 0 diff --git a/rocks.just b/rocks.just index 792da12..9da5489 100644 --- a/rocks.just +++ b/rocks.just @@ -89,7 +89,7 @@ update source_repo: if [[ -f "$TMP_DIR/{{source_repo}}/go.mod" ]]; then go_snap_version="$(grep -Po '^go \K(\S+)' "$TMP_DIR/{{source_repo}}/go.mod" | sed -E 's/([0-9]+\.[0-9]+).*/\1/')" go_snap_version="$go_snap_version" yq -i \ - '.parts.{{rock_name}}.build-snaps += "go/"+strenv(go_snap_version)+"/stable"' \ + '(.parts.{{rock_name}}.build-snaps[] | select(test("^go/"))) = "go/"+strenv(go_snap_version)+"/stable"' \ "./$version/rockcraft.yaml" fi rm -rf "$TMP_DIR" From e9f9389f6d5323f706e66261cc2245d5b133b3ff Mon Sep 17 00:00:00 2001 From: Luca Bello Date: Thu, 5 Mar 2026 12:50:54 +0100 Subject: [PATCH 3/4] add spread --- 4.6.0/spread/.extension | 195 +++++++++++++++++++++++++++ 4.6.0/spread/general/ready/task.yaml | 7 + 2 files changed, 202 insertions(+) create mode 100755 4.6.0/spread/.extension create mode 100644 4.6.0/spread/general/ready/task.yaml diff --git a/4.6.0/spread/.extension b/4.6.0/spread/.extension new file mode 100755 index 0000000..81e7082 --- /dev/null +++ b/4.6.0/spread/.extension @@ -0,0 +1,195 @@ +#!/bin/bash + +usage() { + echo "usage: $(basename "$0") [command]" + echo "valid commands:" + echo " allocate Create a backend instance to run tests on" + echo " discard Destroy a backend instance used to run tests" + echo " backend-prepare Set up the system to run tests" + echo " backend-restore Restore the system after the tests ran" + echo " backend-prepare-each Prepare the system before each test" + echo " backend-restore-each Restore the system after each test run" +} + +prepare() { + case "$SPREAD_SYSTEM" in + fedora*) + dnf update -y + dnf install -y snapd + while ! snap install snapd; do + echo "waiting for snapd..." + sleep 2 + done + ;; + debian*) + apt update + apt install -y snapd + while ! snap install snapd; do + echo "waiting for snapd..." + sleep 2 + done + ;; + ubuntu*) + apt update + ;; + esac + + snap wait system seed.loaded + snap refresh --hold + + if systemctl is-enabled unattended-upgrades.service; then + systemctl stop unattended-upgrades.service + systemctl mask unattended-upgrades.service + fi +} + +restore() { + case "$SPREAD_SYSTEM" in + ubuntu* | debian*) + apt autoremove -y --purge + ;; + esac + + rm -Rf "$PROJECT_PATH" + mkdir -p "$PROJECT_PATH" +} + +prepare_each() { + true +} + +restore_each() { + true +} + +allocate_lxdvm() { + name=$(echo "$SPREAD_SYSTEM" | tr '[:punct:]' -) + system=$(echo "$SPREAD_SYSTEM" | tr / -) + if [[ "$system" =~ ^ubuntu- ]]; then + image="ubuntu:${system#ubuntu-}" + else + image="images:$(echo "$system" | tr - /)" + fi + + VM_NAME="${VM_NAME:-spread-${name}-${RANDOM}}" + DISK="${DISK:-20}" + CPU="${CPU:-4}" + MEM="${MEM:-8}" + + lxc launch --vm \ + "${image}" \ + "${VM_NAME}" \ + -c limits.cpu="${CPU}" \ + -c limits.memory="${MEM}GiB" \ + -d root,size="${DISK}GiB" + + while ! lxc exec "${VM_NAME}" -- true &>/dev/null; do sleep 0.5; done + lxc exec "${VM_NAME}" -- sed -i 's/^\s*#\?\s*\(PermitRootLogin\|PasswordAuthentication\)\>.*/\1 yes/' /etc/ssh/sshd_config + lxc exec "${VM_NAME}" -- bash -c "if [ -d /etc/ssh/sshd_config.d ]; then echo -e 'PermitRootLogin yes\nPasswordAuthentication yes' > /etc/ssh/sshd_config.d/00-spread.conf; fi" + lxc exec "${VM_NAME}" -- bash -c "echo root:${SPREAD_PASSWORD} | sudo chpasswd || true" + + # Print the instance address to stdout + ADDR="" + while [ -z "$ADDR" ]; do ADDR=$(lxc ls -f csv | grep "^${VM_NAME}" | cut -d"," -f3 | cut -d" " -f1); done + echo "$ADDR" 1>&3 +} + +discard_lxdvm() { + instance_name="$(lxc ls -f csv | sed ':a;N;$!ba;s/(docker0)\n/(docker0) /' | grep "$SPREAD_SYSTEM_ADDRESS " | cut -f1 -d",")" + lxc delete -f "$instance_name" +} + +allocate_ci() { + if [ -z "$CI" ]; then + echo "This backend is intended to be used only in CI systems." + exit 1 + fi + sudo sed -i 's/^\s*#\?\s*\(PermitRootLogin\|PasswordAuthentication\)\>.*/\1 yes/' /etc/ssh/sshd_config + if [ -d /etc/ssh/sshd_config.d ]; then echo -e 'PermitRootLogin yes\nPasswordAuthentication yes' | sudo tee /etc/ssh/sshd_config.d/00-spread.conf; fi + sudo systemctl daemon-reload + sudo systemctl restart ssh + + echo "root:${SPREAD_PASSWORD}" | sudo chpasswd || true + + # Print the instance address to stdout + echo localhost >&3 +} + +discard_ci() { + true +} + +allocate() { + exec 3>&1 + exec 1>&2 + + case "$1" in + lxd-vm) + allocate_lxdvm + ;; + ci) + allocate_ci + ;; + *) + echo "unsupported backend $1" 2>&1 + ;; + esac +} + +discard() { + case "$1" in + lxd-vm) + discard_lxdvm + ;; + ci) + discard_ci + ;; + *) + echo "unsupported backend $1" 2>&1 + ;; + esac +} + +set -e + +while getopts "" o; do + case "${o}" in + *) + usage + exit 1 + ;; + esac +done +shift $((OPTIND - 1)) + +CMD="$1" +PARM="$2" + +if [ -z "$CMD" ]; then + usage + exit 0 +fi + +case "$CMD" in +allocate) + allocate "$PARM" + ;; +discard) + discard "$PARM" + ;; +backend-prepare) + prepare + ;; +backend-restore) + restore + ;; +backend-prepare-each) + prepare_each + ;; +backend-restore-each) + restore_each + ;; +*) + echo "unknown command $CMD" >&2 + ;; +esac diff --git a/4.6.0/spread/general/ready/task.yaml b/4.6.0/spread/general/ready/task.yaml new file mode 100644 index 0000000..069f7d1 --- /dev/null +++ b/4.6.0/spread/general/ready/task.yaml @@ -0,0 +1,7 @@ +summary: Run goss tests + +environment: + GOSS_FILE: "../../../goss.yaml" + +execute: | + dgoss run rockcraft-test:latest From 21256f797649eee33f2f429814ab25cfa5f772d5 Mon Sep 17 00:00:00 2001 From: Luca Bello Date: Thu, 5 Mar 2026 13:19:54 +0100 Subject: [PATCH 4/4] update readme badges --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1bf12c9..8c12240 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # git-sync-rock -[![Open a PR to OCI Factory](https://github.com/canonical/git-sync-rock/actions/workflows/rock-release-oci-factory.yaml/badge.svg)](https://github.com/canonical/git-sync-rock/actions/workflows/rock-release-oci-factory.yaml) -[![Publish to GHCR:dev](https://github.com/canonical/git-sync-rock/actions/workflows/rock-release-dev.yaml/badge.svg)](https://github.com/canonical/git-sync-rock/actions/workflows/rock-release-dev.yaml) -[![Update Rock](https://github.com/canonical/git-sync-rock/actions/workflows/rock-update.yaml/badge.svg)](https://github.com/canonical/git-sync-rock/actions/workflows/rock-update.yaml) +[![Open a PR to OCI Factory](https://github.com/canonical/git-sync-rock/actions/workflows/release-oci-factory.yaml/badge.svg)](https://github.com/canonical/git-sync-rock/actions/workflows/release-oci-factory.yaml) +[![Publish to GHCR:dev](https://github.com/canonical/git-sync-rock/actions/workflows/release-dev.yaml/badge.svg)](https://github.com/canonical/git-sync-rock/actions/workflows/release-dev.yaml) +[![Update Rock](https://github.com/canonical/git-sync-rock/actions/workflows/update.yaml/badge.svg)](https://github.com/canonical/git-sync-rock/actions/workflows/update.yaml) [Rocks](https://canonical-rockcraft.readthedocs-hosted.com/en/latest/) for [git-sync](https://github.com/kubernetes/git-sync). This repository holds all the necessary files to build rocks for the upstream versions we support. The git-sync rock can